Re: [Exim] Filters.conf question

Pàgina inicial
Delete this message
Reply to this message
Autor: Nico Erfurth
Data:  
A: Kurt White
CC: exim-users@exim.org
Assumpte: Re: [Exim] Filters.conf question
On Fri, 28 Feb 2003, Kurt White wrote:

> This is a multi-part message in MIME format.
> --
> [ Picked text/plain from multipart/alternative ]
> I am having trouble figuring out how many escapes are needed to
> make my "Band-Aid and bubblegum on the dam" filter work.
> I am trying to match the ".' and the country code.
> I am also trying to match the end of the string, but
> when I add the (regex) "$" I have to escape it with so many backslashes!
> Looking for the hot tip.
> Thanks,
>
>      if "$sender_address:" matches "(\.tw|\.ru|\.pt|\.cn)"


$sender_address is no header, so you shouldn't use the : here :)

Try this one:

if "$sender_address" matches "\N(\.tw|\.ru|\.pt|\.cn)$\N"

or for exim3 (I think it didn't had \N)

if "$sender_address" matches "(\\.tw|\\.ru|\\.pt|\\.cn)\$"

Nico