Page 1 of 1

header_checks postfix help!

Posted: 2018/07/10 18:55:27
by ant2ne
I want to block all email sent to a certain domain, but allow emails to a few users in that domain. For example I want to be able to recieve emails, but no other users withing the How would I do this with header_checks?

This is what I have, but everything gets discarded.

/^To: PASS
/^To: .**/ DISCARD

Re: header_checks postfix help!

Posted: 2018/07/11 04:58:23
by Whoever
"PASS" isn't a valid action for the version of Postfix that comes with CentOS 6 (and 7)

Re: header_checks postfix help!

Posted: 2018/07/12 18:27:35
by jscarville
Try using something like this in smtpd_recipient_restrictions of

Code: Select all

  check_recipient_access pcre:/etc/postfix/access_list

Code: Select all

/\               DISCARD

/foo\            OK
/bar\            OK will be tried ahead of @drop-this