Saturday, April 6, 2024
Cpanel/WHM

Limit receiving message size using filter

Edit file /etc/vfilters/yourdomain.com and paste the following rule :

Code:
# Exim filter
#Rule1
if
 $message_body_size is above 3M then
mail
to $sender_address
from bounce@yourdomain.com
subject \"RE: $header_subject:\"
fail \"Your message was over 3MB size limit and so it was not delivered.\"
seen finish
endif

Save changes and exit.

Now edit /home/username/.cpanel/filter.yaml and paste the following rule :

Code:
---
filter:
  -
    actions:
      -
        action: fail
        dest: Your message was over 3MB size limit and so it was not delivered.
    filtername: Rule1
    rules:
      -
        match: is
        opt: or
        part: \"$message_body_size:\"
        val: 3M

Save changes and exit.

(Visited 25 times, 1 visits today)
Baca Juga :  Solusi Jika Email dari inbox auto masuk ke spam/junk di salah satu user cpanel , padahal spamassasin disable dan ga ada email filter

Similar Posts