Re: [exim] Find a string in a header subject

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Magnus Holmgren
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Find a string in a header subject
On Thursday 23 November 2006 17:36, Emilio Campos Martín wrote:
> hellow, I am a question:

Oh dear, let's hope we can turn you back into a human somehow... :-)

> I would like to know can I have to make a configuration for find a
> string (for example SPAM) in a Subject header?.
>
> If my header subject contain SPAM then $acl_c0=1. I made configurations
> with lookup but always are problems with sintax or not run the exim
> because there are bad configuration.


If I interpret you correctly, you want to set $acl_c0 to 1 if there is a
certain string in the subject of a message as it arrives from a foreign host?

In the DATA ACL:

  warn   condition = ${if match{h_Subject:}{SPAM}}
         set acl_c0 = 1


Note that there is no $ when you set an ACL variable.

Some comments: You know that acl_c0 persists through SMTP sessions, so if
another message arrives in the same connection it will also have acl_c0 set?
So you assume that if someone sends something your rules regard as spam, then
following messages are also regarded as spam.

You say "my header subject". That may be interpreted as meaning that you added
that header (or the "SPAM" string) yourself, perhaps on another machine. If
so, there may exist straighter ways of achieving what you want.

-- 
Magnus Holmgren        holmgren@???
                       (No Cc of list mail needed, thanks)