You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by sa...@photoresearchers.com on 2004/04/30 17:55:00 UTC
Scanning for attachment filenames
I have been trying to write a rule to catch any email that has an attachment:
Norton AntiVirus Deleted1.txt
I am using SA2.55 and nothing I write seems to work. I have tried
full, body, rawbody and even header Content-type =~ /deleted1/i.
The emails are multipart. How can I get SA to scan an attachment? I get
a lot of these, so I would really like to fix this.
-Dan
The message:
---------------------------------------------------
Return-Path: <en...@farmcott.co.uk>
X-Original-To: xxxxxxxxxxxx
Delivered-To: xxxxxxxxxxxx
Received: from photoresearchers.com
(spr1-warr2-3-0-cust93.manc.broadband.ntl.com [80.5.46.93])
by mail.photoresearchers.com (Postfix) with ESMTP id D1E3C336644
for <in...@photoresearchers.com>; Thu, 29 Apr 2004 13:15:50 -0400
(EDT)
From: enquiries@farmcott.co.uk
To: xxxxxxxxxxxx
Subject: exception
Date: Thu, 29 Apr 2004 18:15:39 +0100
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0004_000069F5.00002C33"
X-Priority: 3
X-MSMail-Priority: Normal
Message-Id: <20...@mail.photoresearchers.com>
X-Spam-Status: No, hits=1.8 required=5.0
tests=MISSING_MIMEOLE,NO_REAL_NAME,PRIORITY_NO_NAME
version=2.55
X-Spam-Level: *
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
This is a multi-part message in MIME format.
------=_NextPart_000_0004_000069F5.00002C33
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
here is yours!
------=_NextPart_000_0004_000069F5.00002C33
Content-Type: plain/text;
name="Norton AntiVirus Deleted1.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="Norton AntiVirus Deleted1.txt"
Tm9ydG9uIEFudGlWaXJ1cyByZW1vdmVkIHRoZSBhdHRhY2htZW50OiB3b3JrZXIuemlwLg0K
VGhlIGF0dGFjaG1lbnQgd2FzIGluZmVjdGVkIHdpdGggdGhlIFczMi5OZXRza3kuQ0BtbSB2
aXJ1cy4=
------=_NextPart_000_0004_000069F5.00002C33--
..
--------------030305020905080605090007--
Re: Scanning for attachment filenames
Posted by Mark Merchant <mm...@dispatch.com>.
thx. for the info, the first part of the multipart/mixed is in fact
blank, followed by html, jpeg, and attached exe. BTW i'm on 2.70.
will try as you suggest week after next ( vacation ).
thx. again. MM.
On Fri, 2004-04-30 at 13:44, Fred wrote:
> I think it was a parsing problem, it was correct in the 2.6x series. I
> think it was due to an empty content part and SA would not see anything.
>
Re: Scanning for attachment filenames
Posted by Fred <sp...@freddyt.com>.
I think it was a parsing problem, it was correct in the 2.6x series. I
think it was due to an empty content part and SA would not see anything.
A good way to debug what SA is seeing is to add one of the following rules
to your local.cf file and run a message through using -D (for debug).
# full PRINTFULL /(^.*$)(?{ print "Full:\n$^N\nEnd Full\n" })/is
# body PRINTBODY /(^.*$)(?{ print "Body:\n$^N\nEnd Body\n" })/i
# rawbody PRINTRAW /(^.*$)(?{ print "Rawbody:\n$^N\nEnd Rawbody\n" })/i
# uri PRINTURI /(^.*$)(?{ print "URI:\n$^N\nEnd URI\n" })/i
Uncomment one of the above, run your message through SA with -D flag and
examine the output. Make sure to remove or comment the line when done!
Frederic Tarasevicius
Internet Information Services, Inc.
http://www.i-is.com/
810-794-4400
mailto:info@i-is.com
Mark Merchant wrote:
> i saw a similar problem yesterday, see "here's a weird one" for
> details. depending on how the the attachment was encoded SA will skip
> past it.
>
> still haven't got a good explanation as to why, msg length maybe???
>
> was encoded
> On Fri, 2004-04-30 at 11:55, sa@photoresearchers.com wrote:
>> I have been trying to write a rule to catch any email that has an
>> attachment: Norton AntiVirus Deleted1.txt
>>
>> The emails are multipart. How can I get SA to scan an attachment?
>> I get
>> a lot of these, so I would really like to fix this.
>>
>
>
>>> # e-mail that has a deleted attachment(virus)
>>> rawbody DISP_DELETED_ATTACHMENT_RULE /DELETED0\.TXT/i
>>> score DISP_DELETED_ATTACHMENT_RULE 5.0
>>> describe DISP_DELETED_ATTACHMENT_RULE dispatch rule to catch deleted
>>> attachments from the snipers
Re: Scanning for attachment filenames
Posted by Mark Merchant <mm...@dispatch.com>.
i saw a similar problem yesterday, see "here's a weird one" for details.
depending on how the the attachment was encoded SA will skip past it.
still haven't got a good explanation as to why, msg length maybe???
was encoded
On Fri, 2004-04-30 at 11:55, sa@photoresearchers.com wrote:
> I have been trying to write a rule to catch any email that has an attachment:
> Norton AntiVirus Deleted1.txt
>
> The emails are multipart. How can I get SA to scan an attachment? I get
> a lot of these, so I would really like to fix this.
>
>> # e-mail that has a deleted attachment(virus)
>> rawbody DISP_DELETED_ATTACHMENT_RULE /DELETED0\.TXT/i
>> score DISP_DELETED_ATTACHMENT_RULE 5.0
>> describe DISP_DELETED_ATTACHMENT_RULE dispatch rule to catch deleted
>> attachments from the snipers