Re: [Exim] Partial matching for (e-mail) address lookups?

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Andreas J Mueller
Dátum:  
Címzett: Ralf G. R. Bergs
Tárgy: Re: [Exim] Partial matching for (e-mail) address lookups?
Hi Ralf!

>   accept  senders       = ${if exists{EXIM_VIRT_DOM_DIR/$domain/whitelist} \
>                             {${lookup {$sender_address} partial-lsearch*@ \
>                                 {EXIM_VIRT_DOM_DIR/$domain/whitelist} \
>                                 {$sender_address} {}}} {}}
>           domains       = +local_domains


> I thought I could have whitelist entries like the above by using this construct,
> but it doesn't work. I have to remove "partial-" in order to make the above
> expression do ANYTHING useful, but then I can only use patterns like
> "*@subdomain.my.domain" of course.


> Any ideas?


Apart from using wildlsearch, you could rewrite the ACL to read the
whitelist directly from a file, which would allow patterns like
*@*.my.domain:

    accept  domains   = +local_domains
            condition = ${if exists{EXIM_VIRT_DOM_DIR/$domain/whitelist}{yes}{no}}
            senders   = EXIM_VIRT_DOM_DIR/$domain/whitelist


I have put the test for +local_domains first, because it is probably
less expensive than testing for the existence of a file.

Andy

--
Andreas J. Mueller                            email: <andy@???>