I've had excellent success with this Procmail recipe (thanks to your
previous help!), but I'm finding on this one particular message, I don't
understand why Procmail matches on it. I'll post:
1. The relevant *parts* of the recipe
2. The message headers
3. The verbose log
4. the 'from' pattern file (where it matches from)
I have munged it to help protect my privacy. If you can help I would be
grateful.
Many thanks,
Steve :)
--
===================================== The recipe
WS=" " # whitespace in procmail: space + tab
RCPT_WHITELIST=$PMDIR/rcpt_whitelist_ryb
FROM_BLACKLIST=$PMDIR/from_blacklist_ryb
:0
* ^X-Original-To:(_dot_)*(_at_)mydomain(_dot_)tld
{
# If the recipient is NOT in the recipient whitelist,
# AND the sender matches a REGEX from FROMJUNK, treat
# as junk. This is predominantly to detect "joe jobbing"
:0:
* ^X-Original-To:["$WS"]*\/.*
* $! ? grep -i -x $MATCH $RCPT_WHITELIST
* $? formail -xFrom: |\
grep -i \"`grep -v '^[$WS]*$' $FROM_BLACKLIST`\"
junk-from
}
===================================== The message headers
From customer(_dot_)service(_at_)me(_dot_)co(_dot_)uk Fri Dec 8 00:51:09 2006
Return-Path: <customer(_dot_)service(_at_)me(_dot_)co(_dot_)uk>
X-Original-To: me(_at_)mydomain(_dot_)tld
Delivered-To: user(_at_)beaujolais(_dot_)domain(_dot_)tld
Received: from localhost (localhost [127.0.0.1])
by beaujolais.domain.tld (Postfix) with ESMTP id 8BDB27253F
for <me(_at_)mydomain(_dot_)tld>; Fri, 8 Dec 2006 00:51:09 +0000 (UTC)
X-Spam-Score: -1.216
X-Spam-Level:
X-Spam-Status: No, score=-1.216 tagged_above=-1000 required=4.1
tests=[AWL=-0.009, BAYES_00=-2.599, MSGID_FROM_MTA_ID=1.393,
SPF_PASS=-0.001]
Received: from beaujolais.domain.tld ([195.22.128.145])
by localhost (beaujolais.domain.tld [127.0.0.1]) (amavisd-new,
port 10
024)
with ESMTP id On-rklSid3mp for <me(_at_)mydomain(_dot_)tld>;
Fri, 8 Dec 2006 00:51:03 +0000 (UTC)
Received: from gateway.game.net (smtpuk.game.net [213.221.170.15])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(No client certificate requested)
by beaujolais.domain.tld (Postfix) with ESMTP id 5CC497254B
for <me(_at_)mydomain(_dot_)tld>; Fri, 8 Dec 2006 00:51:03 +0000 (UTC)
Received: from [213.221.163.20] (helo=AspEmail)
by gateway.game.net with smtp (Exim 4.51)
id 1GsTww-0003RN-7y
for me(_at_)mydomain(_dot_)tld; Fri, 08 Dec 2006 00:50:53 +0000
From: "me Customer Services" <customer(_dot_)service(_at_)me(_dot_)co(_dot_)uk>
To: me(_at_)mydomain(_dot_)tld
Reply-To: customer(_dot_)service(_at_)me(_dot_)co(_dot_)uk
Subject: Reminder of your details.
Date: Fri, 08 Dec 2006 00:46:08 -0000
MIME-Version: 1.0
X-Virus-Scan: gateway.game.net virus scan clean.
Message-Id:
<20061208005103(_dot_)5CC497254B(_at_)beaujolais(_dot_)domain(_dot_)tld>
Status:
X-Status:
X-Keywords:
===================================== The verbose log
procmail: Assigning "WS= "
procmail: Assigning "MAILDIR=/home/user/mail"
procmail: Assigning "INCLUDERC=/home/user/.procmail/rc.spamassassin"
procmail: Assigning "JUNK=junk"
procmail: No match on "^X-Spam-Level: \*\*\*\*\*\*\*"
procmail: Assigning "INCLUDERC=/home/user/.procmail/rc.junk.ryb"
procmail: Assigning "WS= "
procmail: Assigning "RCPT_WHITELIST=/home/user/.procmail/rcpt_whitelist_ryb"
procmail: Assigning "FROM_BLACKLIST=/home/user/.procmail/from_blacklist_ryb"
procmail: Assigning "SUBJ_BLACKLIST=/home/user/.procmail/subj_blacklist_ryb"
procmail: Assigning "FROMJUNK=junk_from"
procmail: Assigning "SUBJECTJUNK=junk_subject"
procmail: Match on "^X-Original-To:(_dot_)*(_at_)mydomain(_dot_)tld"
procmail: Assigning "MATCH="
procmail: Matched " me(_at_)mydomain(_dot_)tld"
procmail: Match on "^X-Original-To:["$WS"]*\/.*"
procmail: Executing
"grep,-i,-x,me(_at_)mydomain(_dot_)tld,/home/user/.procmail/rcpt_whitelist_ryb"
procmail: Non-zero exitcode (1) from "grep"
procmail: Match on ! "grep -i -x me(_at_)mydomain(_dot_)tld
/home/user/.procmail/rcpt_whitelist_ryb"
procmail: Executing "grep -v '^[$WS]*$' $FROM_BLACKLIST"
procmail: Executing " formail -xFrom: |grep -i "=\?
^\*\*
amavis
challenge
daemon
do not reply
mail delivery \(sub\|\)system
mailer-daemon
no[ -]*reply""
procmail: Match on " formail -xFrom: |grep -i "=\?
^\*\*
amavis
challenge
daemon
do not reply
mail delivery \(sub\|\)system
mailer-daemon
no[ -]*reply""
procmail: Locking "junk-from.lock"
procmail: Assigning "LASTFOLDER=junk-from"
procmail: Opening "junk-from"
procmail: Acquiring kernel-lock
procmail: [54118] Fri Dec 8 00:51:10 2006
procmail: Unlocking "junk-from.lock"
procmail: Notified comsat: "user(_at_)0:/home/user/mail/junk-from"
From customer(_dot_)service(_at_)me(_dot_)co(_dot_)uk Fri Dec 8 00:51:09 2006
Subject: Reminder of your details.
Folder: junk-from
2140
===================================== The pattern file
=\?
^\*\*
amavis
challenge
daemon
do not reply
mail delivery \(sub\|\)system
mailer-daemon
no[ -]*reply
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail