hi,
i'm running vanilla courier-mta 0.75.0 package with integrated maildrop
2.8.3 in delivery mode
i process incoming mail through spamassassin using a courierd's
DEFAULTDELIVERY="|/usr/bin/spamc|/usr/bin/maildrop"
Usually the filter in /etc/courier/maildroprc will prevent the detected
spam arriving in the user's ~/Maildir
(excuse my debugging statements)
echo "ENTER maildroprc"
if ( /^X-Spam-Flag: YES/ )
{
echo "SpamAssassin (maildroprc) declares this email to be FLAG spam"
EXITCODE=0
exit
}
recently mutant spam with missing body and other critical information as
been arriving.
here follows an example AFTER unexpectedly arriving in the user's
~/Maildir/cur directory (i.e. following spamc processing)
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
genzero.davies.com
X-Spam-Level: *****************
X-Spam-Status: Yes, score=17.0 required=3.0 tests=BAYES_60,EMPTY_MESSAGE,
FSL_HELO_BARE_IP_2,INVALID_MSGID,MISSING_DATE,MISSING_FROM,MISSING_SUBJECT,
MSGID_SHORT,RCVD_HELO_IP_MISMATCH,RCVD_NUMERIC_HELO,TT_MSGID_TRUNC,
TVD_RCVD_IP,TVD_RCVD_IP4,UNCLOSED_BRACKET autolearn=no
autolearn_force=no
version=3.4.0
X-Spam-Flag: YES
X-Spam-Report:
* 0.0 MSGID_SHORT Message-ID is unusually short
* 1.5 UNCLOSED_BRACKET Headers contain an unclosed bracket
* 0.0 TVD_RCVD_IP4 Message was received from an IPv4 address
* 0.0 TVD_RCVD_IP Message was received from an IP address
* 1.4 TT_MSGID_TRUNC Scora: Message-Id ends after left-bracket +
digits
* 1.2 RCVD_NUMERIC_HELO Received: contains an IP address used for HELO
* 2.4 RCVD_HELO_IP_MISMATCH Received: HELO and IP do not match,
but should
* 1.5 BAYES_60 BODY: Bayes spam probability is 60 to 80%
* [score: 0.6312]
* 2.3 EMPTY_MESSAGE Message appears to have no textual parts and no
* Subject: text
* 1.4 MISSING_DATE Missing Date: header
* 1.0 MISSING_FROM Missing From: header
* 1.8 MISSING_SUBJECT Missing Subject: header
* 0.6 INVALID_MSGID Message-Id is not valid, according to RFC 2822
* 2.0 FSL_HELO_BARE_IP_2 No description available.
X-Spam-DCC: sonic.net: genzero 1117; Body=0
Received: from 173.13.136.61 (e2e-9-184.e2enetworks.net.in
[::ffff:205.147.96.184])
by davies.com with SMTP; Sat, 21 Nov 2015 18:47:43 -0800
id 0000000000E00009.0000000056512CD7.00002BDF
Received-SPF: pass (Address passes the Sender Policy Framework)
SPF=MAILFROM;
[email protected];
remoteip=::ffff:205.147.96.184;
remotehost=e2e-9-184.e2enetworks.net.in;
helo=173.13.136.61;
receiver=davies.com;
Message-ID: <0[10
To: undisclosed-recipients: ;<<<=== LAST LINE
How can this happen, It is as though maildrop processing was skipped.
So I ran maildrop in a debugging mode to verify:
cat testmsg | maildrop -V9 -d
||
and my suspicion turns out to be true. After further messing around I
found that maildrop does work as expected if i append one empty line to
the testmsg (captured spam example)
I searched the mailing list and the closest query I could find resulted
in mr.sam pointing out that something had corrupted the mail message
prior to arrival at maildrop. Adding or subtracting a blank line at the
end of a message is mild corruption indeed.
.......
Tokenized exit
Tokenized ;
Tokenized }
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized eof
ENTER maildroprc
/etc/courier/maildroprc(3): Evaluating IF condition.
/etc/courier/maildroprc(3): Search of ^X-Spam-Flag: YES = 0
/etc/courier/maildroprc(3): IF evaluated, result=0
maildrop: Attempting .mailfilter
Tokenized echo
Tokenized string: "arrived at $HOME/mailfilter"
Tokenized ;
Tokenized eof
arrived at /home/peter/mailfilter
maildrop: Delivery complete.
Add a blank line to the spam and the same debug line and..
Tokenized exit
Tokenized ;
Tokenized }
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized eof
ENTER maildroprc
/etc/courier/maildroprc(3): Evaluating IF condition.
Matching /^X-Spam-Flag: YES/ against X-Spam-Checker-Version:
SpamAssassin 3.4.0 (2014-02-07) on genzero.davies.com
Not matched.
Matching /^X-Spam-Flag: YES/ against X-Spam-Level: *****************
Not matched.
Matching /^X-Spam-Flag: YES/ against X-Spam-Status: Yes, score=17.0
required=3.0 tests=BAYES_60,EMPTY_MESSAGE,
FSL_HELO_BARE_IP_2,INVALID_MSGID,MISSING_DATE,MISSING_FROM,MISSING_SUBJECT,
MSGID_SHORT,RCVD_HELO_IP_MISMATCH,RCVD_NUMERIC_HELO,TT_MSGID_TRUNC,
TVD_RCVD_IP,TVD_RCVD_IP4,UNCLOSED_BRACKET autolearn=no
autolearn_force=no version=3.4.0
Not matched.
Matching /^X-Spam-Flag: YES/ against X-Spam-Flag: YES
/etc/courier/maildroprc(3): Search of ^X-Spam-Flag: YES = 1
/etc/courier/maildroprc(3): IF evaluated, result=1
SpamAssassin (maildroprc) declares this email to be FLAG spam
/etc/courier/maildroprc(6): EXITCODE="0"
Can we modify maildrop to handle messages that lack a body (the blank
being the separator between header and body). according to RFC822, the
body of a message is optional. The technical syntax used in RFC822 is
"message = fields *( CRLF *text )"
thanks
apeterd
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users