given two lines in header_checks, both work when testing with postmap, but only
one works when processing actual mail. it's my sense that it's related to the
fact that the non working header check has to do with mail submitted via
sendmail(1), but i can't figure out what i'm doing wrong.
cat message
Delivered-To: [email protected]
Return-Path:<[email protected]>
Received: from mta.example.com ([127.0.0.1])
by localhost (mta.example.com [127.0.0.1]) (amavisd-maia, port 10024)
with LMTP id 15153-02 for<[email protected]>;
Sun, 24 Apr 2011 21:24:37 -0400 (EDT)
Received: by mta.example.com (Postfix, from userid 2000)
id C359241692; Sun, 24 Apr 2011 21:24:37 -0400 (EDT)
From: "[email protected]"<[email protected]>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: meeting
Date: Thu, 21 Apr 2011 21.47.30 -0400
To: "[email protected]"<[email protected]>
Mime-Version: 1.0
X-Mailer: mail client
meeting will be today
cat header_checks-ignored
/^Received:\s+by\s+mta\.example\.com\s+\(Postfix, from userid \d+\)\s+id/
warn
/^Received:\s+from\s+mta\.example\.com\s+\(\[127\.0\.0\.1\]\)\s+by\s+localhost\s+\(mta\.example\.com\s+\[127\.0\.0\.1\]\)\s+\(amavisd-maia\,\s+port
10024\)*/ warn
postmap -hq - pcre:./header_checks-ignored< message
Received: from mta.example.com ([127.0.0.1])
by localhost (mta.example.com [127.0.0.1]) (amavisd-maia, port 10024)
with LMTP id 15153-02 for<[email protected]>;
Sun, 24 Apr 2011 21:24:37 -0400 (EDT) warn
Received: by mta.example.com (Postfix, from userid 2000)
id C359241692; Sun, 24 Apr 2011 21:24:37 -0400 (EDT) warn
postconf header_checks
header_checks = regexp:$config_directory/tables/header_checks-spam,
regexp:$config_directory/tables/header_checks-ignored
when processing actual mail:
Apr 24 21:56:16 flip postfix/pickup[17425]: E1056416B5: uid=2000
from=<[email protected]>
Apr 24 21:56:16 flip postfix/cleanup[17561]: E1056416B5:
message-id=<[email protected]>
Apr 24 21:56:16 flip postfix/qmgr[17424]: E1056416B5: from=<[email protected]>,
size=501, nrcpt=1 (queue active)
Apr 24 21:56:17 flip postfix/reinject[17572]: connect from localhost[127.0.0.1]
Apr 24 21:56:17 flip postfix/reinject[17572]: 79270416B4:
client=localhost[127.0.0.1]
Apr 24 21:56:17 flip postfix/cleanup[17561]: 79270416B4: warning: header Received: from mta.example.com
([127.0.0.1])? by localhost (mta.example.com [127.0.0.1]) (amavisd-maia, port 10024)? with LMTP id
15177-04 for<[email protected]>;? Sun, 24 Apr 2011 21:56:16 -040 from localhost[127.0.0.1];
from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<localhost>
Apr 24 21:56:17 flip postfix/cleanup[17561]: 79270416B4:
message-id=<[email protected]>
Apr 24 21:56:17 flip dkim-filter[3488]: 79270416B4 mode select: signing
Apr 24 21:56:17 flip dkim-filter[3488]: 79270416B4 "DKIM-Signature" header added
Apr 24 21:56:17 flip postfix/qmgr[17424]: 79270416B4: from=<[email protected]>,
size=971, nrcpt=1 (queue active)
Apr 24 21:56:17 flip postfix/reinject[17572]: disconnect from
localhost[127.0.0.1]
Apr 24 21:56:17 flip postfix/lmtp[17568]: E1056416B5: to=<[email protected]>,
relay=127.0.0.1[127.0.0.1]:10024, delay=0.79, delays=0.09/0/0/0.69, dsn=2.6.0,
status=sent (250 2.6.0 Ok, id=15177-04, from MTA: 250 2.0.0 Ok: queued as 79270416B4)
Apr 24 21:56:17 flip postfix/qmgr[17424]: E1056416B5: removed
Apr 24 21:56:19 flip postfix/smtp[17573]: 79270416B4: to=<[email protected]>,
relay=gmail-smtp-in.l.google.com[74.125.95.27]:25, delay=1.9, delays=0.13/0/0.34/1.4,
dsn=2.0.0, status=sent (250 2.0.0 OK 1303696579 uf9si11930211icb.7)
Apr 24 21:56:19 flip postfix/qmgr[17424]: 79270416B4: removed
the header in question, taken from the message after arriving @gmail.com:
Received: by mta.example.com (Postfix, from userid 2000)
id E1056416B5; Sun, 24 Apr 2011 21:56:16 -0400 (EDT)
-ben