El 18/08/15 a las 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
If you plan blocking incoming e-mails based on the "From" header,
probably check_sender_access is more suitable in this case:
main.cf:
smtpd_sender_restrictions =
...
check_sender_access hash:/etc/postfix/bad_senders
...
/etc/postfix/bad_senders:
[email protected] REJECT
(don't forget the postmap bad_senders command)
Check http://www.postfix.org/SMTPD_ACCESS_README.html, especially
http://www.postfix.org/SMTPD_ACCESS_README.html#danger
Regards,
Nicolás