Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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