On 5/12/2010 4:44 PM, VR wrote:
> Having read postfix.org/regexp_table.5.html, I'm experimenting to stop
> junk mail to common system accounts with
> check_recipient_access regexp:/etc/postfix/reject_by_recipient_regexp
>
> and trying to learn how to craft regexp's. I've tried many iterations
> similar to:
> /^To: man@/ REJECT  or  /^To: m...@mydomain\.tld/ REJECT
>
> I issue postfix reload after edits but the syntax is wrong so my test
> message still queues for delivery.
>
[snip log]
> What should proper syntax look like?

For a check_recipient_access, this should be (untested):
/^man@/ REJECT

For a header_checks, it should be like you said.

The difference? header_checks looks at the To: "header",
check_recipient_access looks at the "RCPT TO" command.

Brian

Reply via email to