Is it possible to do sender address filtering within postfix itself? I want to block email where the sender and recipient are both root@domain.com except in the case that the email was sent locally.

I would rather not have to install (bloated) anti-spam software just for one filter.

link|improve this question
feedback

1 Answer

up vote 3 down vote accepted

Yes, you can do this with a policy server. Standard smtpd_receipient_restrictions and smtpd_sender_restrictions can't do this exactly - they can do it separately and you could defer from one to the next but it wouldn't be reliable.

Policy server is the best way to go. The page I linked to even shows an example policy server written in Perl.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.