SysAdmin EM:
> Thanks Wietse and Matus.
>
> I understand that I must work this way, examples:
>
> if /^Subject:/
> /^Subject: Invest once and get passive income(.*)/
> DISCARD SUBJECTSPAM2293
> /^Subject: Earnings on a trading robot(.*)/ DISCARD
> SUBJECTSPAM2294
> /^Subject: Working Online At Home(.*)/ DISCARD
> SUBJECTSPAM2295
> /^Subject: Netflix Je account(.*)/ DISCARD
> SUBJECTSPAM2296
> /^Subject: Mailbox Size Warning(.*)/ DISCARD
> SUBJECTSPAM2297
> /^Subject:(.*)Sunrise ritual(.*)/ DISCARD SUBJECTSPAM2298
> /^Subject:(.*)pending messages on hold(.*)/ DISCARD
> SUBJECTSPAM2299
> endif
DELETE the (.*) at the end.
Instead of
/^Subject:(.*)pending messages on hold(.*)/ /
use
/^Subject:.*pending messages on hold/
> /usr/sbin/postmap -v -h -q - pcre:/etc/postfix/header_checks <
> /etc/postfix/header_checks
If you want to test the patterns againt one email message, use this:
postmap -h -q - pcre:/etc/postfix/header_checks < email-message
If you want to test the patterns against a file with only headers:
postmap -q - pcre:/etc/postfix/header_checks < file-with-headers
Wietse