RE: [Exim] Use of wildcards

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Pete Horn
Fecha:  
A: exim-users
Asunto: RE: [Exim] Use of wildcards
Thanks for the previous advice, now I have supplementary questions:

1) My filter file contains several matching condition E.G.

if
$message_body matches "pen.s" or
$message_body matches "tr.ck" or
$message_body matches "n.geria"
then
save $home/.mail/junkmail
logwrite "$tod_log / ***JUNK Msg Body <some variable?> / $header_from /
$header_subject \n"
finish

Can I get the actual match, i.e. "penns" "trick" or nigeria", as <some
variable?> written to the logfile?

I could do it by

if
$message_body matches "pen.s"
then
save $home/.mail/junkmail
logwrite "$tod_log / ***JUNK Msg Body pen?s / $header_from /
$header_subject \n"
finish
elif
$message_body matches "tr.ck" or
then
save $home/.mail/junkmail
logwrite "$tod_log / ***JUNK Msg Body tr?ck / $header_from /
$header_subject \n"
finish
elif... etc.

but that's long winded.

2) Anyone know an easy way of filtering on the message body when it is full
of false html tags?

E.G. match "find this test" when the message body is:

<html>
fin<rubishh>d th<just to>is te<break filters hgjhglgh464>st
</html>


thanks,

Pete Horn




> -----Original Message-----
> From: exim-users-admin@??? [mailto:exim-users-admin@exim.org]On
> Behalf Of Kirill Miazine
> Sent: 09 July 2003 09:07
> To: Pete Horn
> Cc: exim-users@???
> Subject: Re: [Exim] Use of wildcards
>
>
> Pete Horn wrote:
> > I use a shared server which runs Exim 3.16 (out of date but out of my
> > hands).
>
> Guess what? I have an account on a system running Exim 2.12!
>
> > I use the .forward file as a spam filter for my incoming mail
> but recently
> > more spam has been getting through due to the use of various substitute
> > characters for "i".
> >
> > Is there a way I can use wildcards when I'm checking the headers, as in:
> >
> >   if
> >     $header_subject: contains "str?ng conta?n?ng w?ldcards"
> >   then
> >     save $home/.mail/junkmail
> >     finish

> >
> > where the question mark is a wildcard character?
>
> You can use regular expression matching. A period (dot, ".") will act as
> a wildcard character:
>
>     if $header_subject: matches "str.ng conta.n.ng w.ldcards" then ...

>
> --
> Kirill Miazine
> mailto:km@krot.org
> http://km.krot.org/
>
>
> --
>
> ## List details at

http://www.exim.org/mailman/listinfo/exim-users Exim details at
http://www.exim.org/ ##