I have a postfix installation with amavis and postfwd. I'd like to block a single sender only for a single receiver. I tried with header_checks but multiline checking I was thinking something like
id=BLOCKIT
[email protected]; [email protected]; action=REJECT no sender
on postfwd but I can't find the proper syntax... Has anyone some suggestions?
I don't know how to do this in
postfwd
, but within Postfix, you can use Restriction Classes for this. If you e.g. want to prevent[email protected]
to send mail to your user[email protected]
:The file
special_recipients
would contain a line likeAnd
mail_for_alice
would contain:That said, you are probably better of with doing all of this in
postfwd
;-)I have accomplished similar tasks using Postgrey. You could install postgrey and disable the greylisting feature, but retain the whitelist and blacklist features. Many people find Postgrey intrusive, I find it to be a nearly perfect spam filter.