Add the following line to you sendmail.mc file use SpamCop’s email blacklist filter on your sendmail email server:
FEATURE(`dnsbl', `bl.spamcop.net', `"Spam blocked see: http://spamcop.net/bl.shtml?"$&{client_addr}')dnl
Regenerate your sendmail config with:
m4 sendmail.mc > sendmail.cf
then restart your sendmail server with
. /etc/init.d/sendmail restart
To block individual domains:
- Edit /etc/mail/access
<code> ... exmapledomain1.com REJECT exampledomain2.com REJECT ...
- Convert access to access.db
<code> makemap hash /etc/mail/access.db < /etc/mail/access </code>
- Restart sendmail
<code> # /etc/init.d/sendmail restart </code>