-3

I want the postfix agent to bybass the amavis scanner for all mails from and to a specific domain.

So, i added the following line to /etc/postfix/main.cf

header_checks = pcre:/etc/postfix/whitelist.pcre

and in the /etc/postfix/whitelist.pcre file i have a single line

[email protected] FILTER  SMTP:[127.0.0.1]:10025

where SMTP:[127.0.0.1]:10025 is (AT LEAST I THINK IT IS!) the transport everything returns to after amavis, so emails are delivered.

The problem is (obviously) with the pcre file, because on the error log i get the following error:

postfix/cleanup[10870]: warning: pcre map /etc/postfix/whitelist.pcre, line 1: ignoring unrecognized request

2 Answers 2

1

See man 5 pcre_table especially in TABLE FORMAT section. Also, check man 5 header_checks to get right behavior of header_checks feature.

Your PCRE syntax is wrong. It should wrapped in /.../. And you must escape some special characters. For example

/info@example\.com/ FILTER  smtp:[127.0.0.1]:10025
1

I think it is easier to do the following:

Include in /etc/postfix/main.cf

smtpd_recipient_restrictions =
#
    check_sender_access hash:/etc/postfix/exempt_senders,
    check_policy_service inet:127.0.0.1:10023,

The file /etc/postfix/exempt/senders contains:

[email protected] FILTER smtp:[127.0.0.1]:10025
anotherdomain.com FILTER smtp:[127.0.0.1]:10025

then a

postmap /etc/postfix/exempt_senders

reload or restart postfix

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .