[exim] Block by Subject with lsearch

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: jojodeparis
Dátum:  
Címzett: exim-users
Tárgy: [exim] Block by Subject with lsearch
On Mon, Oct 23, 2006 at 12:17:24PM -0500, Jess Mooers wrote:
> I have this code added to my configure file.
>
> deny      message = X-Blackhole: Yes
>       log_message = REJECTED - Subject in blocksubject list - $h_Subject
>         condition = ${if exists{/usr/local/exim/blocksubject.txt}\

>

{${lookup{$h_Subject:}wildlsearch{/usr/local/exim/blocksubject.txt}{yes}{no}}}\
>                     {no}}

>
> My blocksubject.txt file has this in it:
> *test987123
>
> It denies the message if this is the subject:
> test987123
> Atest987123
>
> But not with these as subjects:
> test987123B
> Atest987123B
>
> I tried to put an * at the end of th line too, but that allows all of the

test emails through and denies none of the 4 above.
>
> Ideally, I would like to be able to say, if the word test987123 is

anywhere in the subject, deny it. Any help would be so appreciated.

Have a look at the fine manual:

http://www.exim.org/exim-html-4.63/doc/html/spec_html/ch09.html#id2548356

An asterisk is only interpreted as a wildcard pattern at the beginning
of the expression. For more sophisticated search patterns you have to
use regular expressions.

E.g. this line in your file should deny mails with subjects containing
the substring 'test987123' :

^.*test987123

hello,
hello, me i want to block a subject "777$ welcome bonus", please can you
tell me if i write directly in my blocksuject.txt this ligne : ^.*777$
welcome bonus ? or ^.*777$\welcome\bonus.

Best regard.

-- 
Josepha HODE
Informaticien Réseau Télécom
Tél: (227) 95 65 05
Email: jojodeparis@???
          jojodeparis@???