How do I blacklist email addresses via Postfix?
I have a spamassassin file:
/etc/mail/spamassassin/blacklist.cf:
blacklist_from *abcd.com.au
blacklist_from *efgh.com.au
blacklist_from *ijkl.com.au
It contains all the from addresses I wish to blacklist. It works well, except I think it would be much more efficient to have postfix discard these messages rather than accepting it and passing it to amavisd -> spamassassin and running through all the spamassassin rules, etc.
My question is, how do I do this with postfix?
I think my solution will be editing these files so:
/etc/postfix/main.cf:
body_checks = regexp:/etc/postfix/body_checks
/etc/postfix/body_checks:
SOMETHING-SOMETHING-SOMETHING
Is this the best way and if so I am having difficulty understanding how the SOMETHING-SOMETHING-SOMETHING above should be formatted?
How would I write the SOMETHING-SOMETHING-SOMETHING above to e.g. check if the From: header contains abcd.com.au?
/etc/mail/spamassassin/blacklist.cf:
blacklist_from *abcd.com.au
blacklist_from *efgh.com.au
blacklist_from *ijkl.com.au
It contains all the from addresses I wish to blacklist. It works well, except I think it would be much more efficient to have postfix discard these messages rather than accepting it and passing it to amavisd -> spamassassin and running through all the spamassassin rules, etc.
My question is, how do I do this with postfix?
I think my solution will be editing these files so:
/etc/postfix/main.cf:
body_checks = regexp:/etc/postfix/body_checks
/etc/postfix/body_checks:
SOMETHING-SOMETHING-SOMETHING
Is this the best way and if so I am having difficulty understanding how the SOMETHING-SOMETHING-SOMETHING above should be formatted?
How would I write the SOMETHING-SOMETHING-SOMETHING above to e.g. check if the From: header contains abcd.com.au?
Mac OS X (10.5.5)