----- Original Message ----- 
From: "Doug Monroe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 15, 2003 12:39 PM
Subject: Re: [Qmail-scanner-general]blocking certain words


> [EMAIL PROTECTED] wrote:
>
> > I've found in /var/spool/qmailscan/quarantine-attachements.txt I can
block
> > certain words in the subject.  Here's what I have.
> >
> > cum     Virus-Subject:  cum
> >
> > Unfortunately we get spam with all sorts of variation like Cum cUm cUM
etc.
> > etc.  Is there some sort of trick or reg expression you can use there to
> > make it case in-sensitive?
>
> Firstly- your example "rule" (without wildcards) will not match
>   Subject: Welcum to xyz
>   or
>   Subject: Please cum here
> I think you want something like:
>    .*cum.*     Virus-Subject:  cum
> or
>    .* cum .*     Virus-Subject:  cum
>
> Secondly, the test is a simple pattern match:
>     if ($headers{$type} =~ /^$var$/) {
> no way to make your -rule- be case insensitive, but you're free to
> modify that line in qmail-scanner-queue.pl above as you see fit, e.g.:
>     if ($headers{$type} =~ /^$var$/i) {
>
> I've often wondered why the "i" flag was not set by default myself.

Doug,

Thanks for the pointers.  I used
.* cum .*
I just hadn't done enough testing yet.  What does the lower case "i" do that
you added to that line?  I added it to my /var/qmail/bin/qmail-scanner.pl
file and after doing "/var/qmail/bin/qmail-scanner.pl -g"  gave it another
test and it seems to have made no difference.  It's still not case
in-sensitive.

Thanks
Malcolm



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Qmail-scanner-general mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general

Reply via email to