I have postfix 3.1.0 running as a mail gateway/filter for internal SMTP servers each serving their own respective domains. I have postscreen/spammassassin/amavisd etc running on this email gateway/filter. This is successful in blocking 99% of spam but I find a lot of spam coming in from spoofed local domain addresses. I would like to block these prior to any virus/spam checking much like the rbl checks in postscreen work. Well at more or the less the same point in the process anyway. Local SMTP sender authentication is disabled - this is just a relay server for internal domains. So I assume that any smtp_sender_restrictions in main.cf would be useless in this case? Do I need to set up a table and refer to it in the " smtpd_relay_restrictions" within main.cf ? Not sure how to tackle this one


I figured this out and implemented this solution: In '/etc/postfix' I created a file 'domain_blacklist' and added the following text to it: 'mylocal-domain.com 550 service unavailable'

in 'main.cf' under 'smtpd_recipient_restrictions' added 'check_sender_access hash:/etc/postfix/domain_blacklist' just before 'reject_unknown_recipient_domain'

run 'postmap domain_blacklist' and reloaded postfix - works just fine now

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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