[Mimedefang] Block mail by subject

Andrew Jayes andrew.jayes at visitheartofengland.com
Wed Mar 24 05:20:55 EST 2004


Hi,
	In filter_begin I have the following code:

if (($msgSubject =~ /RE: [A-Z] {2,},(?: [A-Z]+!?)+/) ||
        ($msgSubject =~ /\bparis hilton\b/ )) {
 

    #Bounce the mail!
    action_bounce("Forbiden subject matter - Rejected");
    }


As already pointed out this is gona cause you problems if you list all
virus subjects! However just for stopping spam that always has the same
subject it's a good temporary measure.

By the way anyone reading this, can you tell me how I mite modify this
chunk of code to block subjects where one word is rejectable e.g.

Buy your Viagra
Get your Viagra
Viagra cheap

Different subjects with a common word

\ [*] Viagra [*] / or something like that

Cheers

andrew 

-----Original Message-----
From: WBrown at e1b.org [mailto:WBrown at e1b.org] 
Sent: 23 March 2004 18:44
To: mimedefang at lists.roaringpenguin.com
Subject: Re: [Mimedefang] Block mail by subject

mimedefang-bounces at lists.roaringpenguin.com wrote on 03/23/2004 12:33:20

PM:

> How can I block a mail depending of the subject ?? This is for
blocking 
> messages with viruses, for example a message with the subjet: "Re:
Your 
> files" belong to a virus, I have a list of all the posibles subjects, 
> how can I block this subjects ???? one by one or all once ?

I wouldnt recommend blocking on all of the known virus email subjects. 
Many of them could be legitimately used.  My director (Boss 3x removed) 
had emails blocked by a filter based strictly on the subject.  He was
not 
a happy camper.

Why not block the known unsafe extensions, and then virus scan the rest?

Clam AV is doing a good job of picking off the inbound viruses for me.
_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
MIMEDefang at lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang



More information about the MIMEDefang mailing list