User Tools

Site Tools



Setting up RBL for qmail

Add this code to qmail service startup file.

if [ -f /var/qmail/control/spamhaus ]; then
   rblsmtpd="/usr/local/bin/rblsmtpd -r"
   rblsmtpd="/usr/local/bin/rblsmtpd -r -r -r -r -r smtp.dnsbl.s -r \
      -r -r -r"

Block sender based .qmail (Bouncesaying)

Here is the quick work around to block sender / domain using .qmail for user OR domain.

To block sender :
| if [ "${SENDER}" = "[email protected]" ]; then /var/qmail/bin/bouncesaying 'RESTRICTED: Domain policy disallows sending email to our domain.'; fi;
To block Domain :

Blocking to send email to [email protected]

| /var/qmail/bin/bouncesaying 'RESTRICTED: Domain policy disallows sending email to our domain.' sh -c 'echo $SENDER | grep -qi "$"'
To forward if outgoing match
|if [ "$SENDER" = "[email protected]" ]; then /var/qmail/bin/forward; fi

NOTE : - This line must be appear first in file - when you restrict for user you must add user Maildir line after this line. e.g. “/usr/local/vpopmail/domains/9/W/”

qmail.txt · Last modified: 2019/09/20 22:01 by k2patel