El 2015-08-18 16:15, Alex escribió:
Hi,
I'm trying to match a pattern in a header_checks pcre file and can't
figure out why it's not matching. In /etc/postfix/header_checks.pcre,
I have:

/^From:.*exampleuser@gmail\.com$/ REJECT

# postmap -q 'exampleuser' pcre:/etc/postfix/header_checks.pcre
#

postconf -m shows pcre among the available types.

I'd really appreciate some direction on what I'm doing wrong. Is it
the pattern? I'm not very experienced with regexes.

Thanks,
Alex

I assume that you have configured the following in your main.cf file:

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

You should provide the real example of headers to help you better. Still, looking at the examples on pcre_table(5) [1], this should work:

/^From: exampleuser@gmail\.com/       REJECT

Regards,

Nicolás

[1] http://www.postfix.org/pcre_table.5.html

Reply via email to