User Tools

Site Tools


qmail

Qmail

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 sbl-xbl.spamhaus.org"
else
   rblsmtpd="/usr/local/bin/rblsmtpd -r cbl.abuseat.org -r dul.dnsbl.sorbs.net -r http.dnsbl.sorbs.net -r misc.dnsbl.sorbs.net -r smtp.dnsbl.s
orbs.net -r socks.dnsbl.sorbs.net \
      -r spam.dnsbl.sorbs.net -r web.dnsbl.sorbs.net -r zombie.dnsbl.sorbs.net"
fi

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 xyz.com 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 "@xyz.com$"'

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/pqr.com/info/Maildir/”

qmail.txt · Last modified: 2010/03/10 03:24 by k2patel