|
/Admin/email/postfix:
Blocking SPAM
For the simple case of blocking/bouncing a particular e-mail address, create a file /etc/postfix/spammer containing something like the following:
spammer@domain.com REJECT
spammer2@spamcentral.net 554 Die Spammer, die!
Note that a full list of possible return codes can be seen in RFC-821[1].
Then run
postmap spammer
to generate a db file for postfix. Add the following line to /etc/postfix/main.cf:
smtpd_sender_restrictions = reject_non_fqdn_sender, check_sender_access hash:/etc/postfix/spammer, permit
Note that "reject_non_fqdn_sender" will bounce any e-mail coming from an address that does not have a fully-qualified domain name.
Restart postfix:
/etc/init.d/postfix restart
That simple.
Some useful resources:
http://www.securityfocus.com/infocus/1593
http://www.postfix.org/SMTPD_ACCESS_README.html
http://www.yolinux.com/TUTORIALS/LinuxTutorialMailMTA.html
http://www.akadia.com/services/postfix_uce.html
[1] http://www.ietf.org/rfc/rfc0821.txt
posted at: 03:04 | path: /Admin/email/postfix | permanent link to this entry