Re: [exim] regex confusion

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Miguel Telleria de Esteban
Date:  
À: exim-users
Sujet: Re: [exim] regex confusion
On Tue, 27 Sep 2005 11:50:06 +0200, Mark wrote:
> I know this is a simple question, but there is something fundamental
> that I am just not getting by reading the docs regarding regex in
> exim. I put the following in my data ACL:
>
> acl_check_content:
>
>    accept regex = (To|Cc):.*nospam-.*(\n|\r)

>
> which is intended to match addresses with a nospam- prefix in To or
> Cc lines, to bypass spam filtering and absolutely get a message
> accepted. The above string seems to match everything, however, and
> effectively disables my filtering.
>
> [...]
> What basic fact of using regex am I missing here?


I think you are missing the fact that regex applies only to the message
BODY and not to the headers (as explained in Sect 40.4, although in
39.20 it is not 100% accurate).

I guess that the way to do your check would be using the header
expansion items (Sect 11.5) with something like:

accept condition = ${if match{$h_to:}{\N.*nospam-.*(\n|\r\N)}{yes}{no}
accept condition = ${if match{$h_cc:}{\N.*nospam-.*(\n|\r\N)}{yes}{no}

[I am not sure of the answer because I don't have any means to
test it now]

    Miguel


>
> Thanks!
>
> --
> Mark Edwards
> mark@???
> cell: +46704070332



--
|     (O-O)

---oOO-(_)-OOo-----------------------------------------------------
 Miguel TELLERIA DE ESTEBAN               Personal Homepage:
 Email: Miguel at mtelleria.com           http://www.mtelleria.com


 Miembro de http://www.linuca.org         Tel home: +32 2 280 1614
 Membre de  http://www.bxlug.be           GSM:      +32 497 038804
-------------------------------------------------------------------