Re: [exim] How to invoke an Exim Filter from an alias file?

Top Page
Delete this message
Reply to this message
Author: Florian Laws
Date:  
To: 'exim-users@exim.org'
Subject: Re: [exim] How to invoke an Exim Filter from an alias file?
Marc Sherman wrote:

> And, of course, there's an even simpler way to do it that I
> realized as
> soon as I hit send, using match and $value:
>
> special_aliases:
>     driver = redirect
>     allow_fail
>     allow_defer
>     allow_filter
>     data = 
> ${lookup{$local_part}lsearch{/export/mail/special_aliases} \
>       {${if match{$value}{\N^:filter:(.*)$\N}{$1}{$value}}}fail}
>     file_transport = address_file
>     pipe_transport = address_pipe
>     reply_transport = address_reply
>     user = mail


Very nice.
However, the readfile call is still needed, so it would read:

data = ${lookup{$localpart}lsearch{/export/mail/special_aliases} \
          {${if
match{$value}{\N^:filter:(.*)$\N}{${readfile{$1}}}{$value}}}fail}


Kind Regards,

Florian