Re: [Exim] regexp lookups from a file

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Tony Finch
Ημερομηνία:  
Προς: subs
Υ/ο: exim-users
Αντικείμενο: Re: [Exim] regexp lookups from a file
Rejo Zenger <subs@???> wrote:
>
>What I would like to have for some domains I host is a file like the
>normal aliases file, but with the added functionality of being able to
>use regular expresions to specify addresses. In other words, I would
>like to have a file with, for example:
>
>  bounce-.*:    rejo

>
>This file I would like to consult from within the main configuration
>file, similar to the lsearch lookups. Is there a way to do this?


I use some embedded perl to provide this functionality. I wanted it
for my .forward file which was doing lots of

    if foranyaddress $h_to:,$h_cc:,$h_from:
       ($thisaddress matches something) then
        save Mail/somewhere
        finish
    endif


which gets very boring after a couple of times. I should probably
turn it into a proper lookup, but I suspect Philip will get upset
if I send him another patch :-)

Tony.
--
f.a.n.finch <dot@???> http://dotat.at/
HUMBER THAMES: VARIABLE 4. SHOWERS. GOOD.