Re: [Exim] Bug/Improvement in Readfile - Exim 4

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Marc Perkel
CC: exim-users
Sujet: Re: [Exim] Bug/Improvement in Readfile - Exim 4
On Wed, 18 Dec 2002, Marc Perkel wrote:

> In an ACL I can say:
>
> deny    senders = /etc/exim/blockfrom

>
> And in my blockfrom file I can use regular expressions. What I want to
> do is the same thing in a filter.


There is this item on the Wish List

(73) 17-Jul-02 M Match a list from within a condition

which would presumably do what you want. This is a much more general
feature than the very specialized "read a file and treat each line as an
alternative part of a regular expression" that you suggested.

> By doing it in a filter, I am also not
> limited to testing the limited number of things that ACLs test for. I
> can not only test the From address but also the Reply-to address.


The Wish List item suggests syntax like

${if matchaddress{$h_reply_to:}{... an address list ...}...

However, there are problems here. What if there is more than one address
in the Reply-To: header line? That can probably be handled with the
"foranyaddress" feature, now that I think about it.

The Wish List item also notes that this might be difficult to specify
cleanly for host lists (because a host has both an IP address and a
name), which is one reason why I haven't yet tried to tackle it.

> How specialized can that be? It would really be a nice feature.


Maybe I didn't understand exactly what you were asking for. It looked to
me like "read a file and treat each line as an alternative part of a
regular expression", as I said above, because that's what you were doing
before. [Incidentally, it occurred to me that if you were to put the |
on the end of each line in the file yourself, you wouldn't have a
problem with the "readfile" approach. You could just get it to remove
the newlines. Or use (?x) to make it ignore white space in the regex.]

Philip

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.