You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by night duke <ni...@yahoo.es> on 2007/03/05 18:57:04 UTC

Spamassassin filter files?

Hi i wish to know if it's possible to filter on email files like 
  .mp3 .exe .vbs .scr .com .pif etc... with spamassassin?
   
  Thanks

 		
---------------------------------

LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com

Re: Spamassassin filter files? / Oh, i forgot

Posted by night duke <ni...@yahoo.es>.
No i don't have qmail-scanner installed...
  I wish to use http://untroubled.org/qmail-qfilter/
  Anyone has any experience witht qmail-qfilter?
  
Thanks.
  

Mário Gamito <ga...@gmail.com> escribió:
  You have to have qmail-scanner installed.
I suppose you do.

-- Mário Gamito

Mário Gamito wrote:
> night duke wrote:
>> Hi i wish to know if it's possible to filter on email files like
>> .mp3 .exe .vbs .scr .com .pif etc... with spamassassin?
> Yes, it's possible.
> 
> Let's say you want to block .exe files.
> 
> Edit file /var/spool/qmailscan/quarantine-attachments.txt
> and insert the line
> .exe 0
> 
> You van filter for subject:
> I am.*Bad
> 
> Or for RCPT TO and MAIL FROM from the message header:
> virus@badguys.foo Virus-MAILFROM: You're blocked.
> This prevents messages from virus@badguys.foo arriving
> 
> Hope it helps.
> 
> Warm Regards,
> Mário Gamito
> 



 		
---------------------------------

LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com

Re: Spamassassin filter files? / Oh, i forgot

Posted by Mário Gamito <ga...@gmail.com>.
You have to have qmail-scanner installed.
I suppose you do.

-- Mário Gamito

Mário Gamito wrote:
> night duke wrote:
>> Hi i wish to know if it's possible to filter on email files like
>> .mp3 .exe .vbs .scr .com .pif etc... with spamassassin?
> Yes, it's possible.
> 
> Let's say you want to block .exe files.
> 
> Edit file /var/spool/qmailscan/quarantine-attachments.txt
> and insert the line
> .exe 0
> 
> You van filter for subject:
> I am.*Bad
> 
> Or for RCPT TO and MAIL FROM from the message header:
> virus@badguys.foo Virus-MAILFROM: You're blocked.
> This prevents messages from virus@badguys.foo arriving
> 
> Hope it helps.
> 
> Warm Regards,
> Mário Gamito
> 


Re: Spamassassin filter files?

Posted by Mário Gamito <ga...@gmail.com>.
night duke wrote:
> Hi i wish to know if it's possible to filter on email files like
> .mp3 .exe .vbs .scr .com .pif etc... with spamassassin?
Yes, it's possible.

Let's say you want to block .exe files.

Edit file /var/spool/qmailscan/quarantine-attachments.txt
and insert the line
.exe 0

You van filter for subject:
I am.*Bad

Or for RCPT TO and MAIL FROM from the message header:
virus@badguys.foo Virus-MAILFROM: You're blocked.
This prevents messages from virus@badguys.foo arriving

Hope it helps.

Warm Regards,
Mário Gamito

Re: Spamassassin filter files?

Posted by Jim Knuth <jk...@jkart.de>.
Heute (05.03.2007/19:05 Uhr) schrieb Evan Platt,

> At 09:57 AM 3/5/2007, night duke wrote:
>>Hi i wish to know if it's possible to filter on email files like
>>.mp3 .exe .vbs .scr .com .pif etc... with spamassassin?

> I'm far from a spamassassin expert, but sure.. You could write a rule
> that looks at the body of the message and looks at the (I'm not sure
> I have the write wording) "fillename="example.exe" for the 
> attachment, and add points. But a better idea may be something like
> mailscanner or clamav. 


or even with postfix and/or amavisd-new

postfix - mime_header_checks

/name=\"(.*)\.(mp3|wmf|emf|grp|bat|bin|chm|cmd|com|do|exe|hta|jse|lnk|msi|ole)\"$/
   REJECT Unwanted type of attachment $1.$2.

amavisd-new - amavisd.conf

  # banned filename extensions (in declared names) anywhere - basic
  qr'(?# BLOCK COMMON NAME EXENSIONS )
  ^ (.*\t)? N= [^\t\n]* \. (exe|vbs|pif|scr|bat|com|cpl) (\t.*)? $'xmi,

The first is IMHO the better way




-- 
Viele Gruesse, Kind regards,
 Jim Knuth
 jk@jkart.de
 ICQ #277289867
----------
Zufalls-Zitat
----------
Eine Frau in Memphis darf zwar Autofahren....aber laut 
Gesetz nur, wenn ein Mann vor dem Gefährt herläuft und eine 
rote Flagge schwenkt, um entgegenkommende Fußgänger und 
Autos zu warnen.
----------
Der Text hat nichts mit dem Empfaenger der Mail zu tun
----------
Virus free. Checked by NOD32 Version 2096 Build 9206  05.03.2007


Re: Spamassassin filter files?

Posted by Evan Platt <ev...@espphotography.com>.
At 09:57 AM 3/5/2007, night duke wrote:
>Hi i wish to know if it's possible to filter on email files like
>.mp3 .exe .vbs .scr .com .pif etc... with spamassassin?

I'm far from a spamassassin expert, but sure.. You could write a rule 
that looks at the body of the message and looks at the (I'm not sure 
I have the write wording) "fillename="example.exe" for the 
attachment, and add points. But a better idea may be something like 
mailscanner or clamav. 


Re: Spamassassin filter files?

Posted by "John D. Hardin" <jh...@impsec.org>.
On Mon, 5 Mar 2007, night duke wrote:

> Hi i wish to know if it's possible to filter on email files like 
>   .mp3 .exe .vbs .scr .com .pif etc... with spamassassin?

SA isn't a security or A/V tool, don't try to make it one.

<plug type="shameless">
http://www.impsec.org/email-tools/procmail-security.html
</plug>

--
 John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
 jhardin@impsec.org    FALaholic #11174     pgpk -a jhardin@impsec.org
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  News flash: Lowest Common Denominator down 50 points
-----------------------------------------------------------------------
 8 days until Albert Einstein's 128th Birthday