Re: [Exim] Use of wildcards

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Kirill Miazine
Dátum:  
Címzett: Pete Horn
CC: exim-users
Tárgy: Re: [Exim] Use of wildcards
Pete Horn wrote:
> 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?


RTFM about how regular expressions work.

if $message_body matches "(pen.s|tr.ck|n.geria)" then
    save $home/.mail/junkmail
    logwrite "$tod_log / ***JUNK Msg Body $1 / $header_from / $header_subject \n"
finish


> 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>


Why do not you simply use SpamAssassin?

--
Kirill Miazine
mailto:km@krot.org
http://km.krot.org/