Re: [Exim] Exim 4: Opinions sought

Pàgina inicial
Delete this message
Reply to this message
Autor: Jim Knoble
Data:  
A: exim-users
Assumpte: Re: [Exim] Exim 4: Opinions sought
Circa 2001-Sep-07 09:32:25 +0100 dixit Philip Hazel:

: On Thu, 6 Sep 2001, Sheldon Hearn wrote:
: 
: > Can't regular expressions be identified in a way that's similar to
: > scheme used for lookups?  I.e.
: >
: >    hold_domains = pcre;^\d+.*\.com$
: >
: > Would that help?
: 
: No. The point is that the expansion is happening *before* interpretation
: of the string as a list. This is so that you do cunning things. For
: example, in the new ACL for policy checking, you can do things like
: this:
: 
:     deny  senders = ${lookup{$local_part}dbm{/some/file}}
: 
: which gets a list of blocked senders for the current local part.[1] The
: contents of such a list could include a regular expression, no problem.
: The difficulty is if you want to write
: 
:     deny  senders = ^.*@.*\.bad\.domain$
: 
: because Exim will first expand that before interpreting it, and I've got
: myself into a mess by using $ and \ as special characters in expansions.


Then why not an expanded syntax which identifies a "non-expandable"
regular expression? For example:

    deny senders = ${regex{"^.*@.*\.bad\.domain$"}}


That would help keep the line noise in the configuration file to a
suitably minimal level.

--
jim knoble | jmknoble@??? | http://www.pobox.com/~jmknoble/
(GnuPG fingerprint: 31C4:8AAC:F24E:A70C:4000::BBF4:289F:EAA8:1381:1491)