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

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Florian Laws
Dátum:  
Címzett: Florian Laws, 'exim-users@exim.org'
Tárgy: Re: [exim] How to invoke an Exim Filter from an alias file?
I wrote:
>
> Oh, I meant that the redirect router should pull it from the
> alias file. :)


Like this:

special_aliases:
  driver = redirect
  allow_fail
  allow_defer
  allow_filter
  data = ${if eq \
                 {:filter:} \


{${substr_0_8:${lookup{$local_part}lsearch{/export/mail/special_aliases}}}}
\

{${readfile{${substr_8:${lookup{$local_part}lsearch{/export/mail/special_ali
ases}}}}}} \
              {${lookup{$local_part}lsearch{/export/mail/special_aliases}}}
\
           } 
  file_transport = address_file
  pipe_transport = address_pipe
  reply_transport = address_reply
  user = mail



This will match on alias file entries of the form

user:    :filter:/path/to/filterfile


and execute the filter in /path/to/filterfile.

All other forms of alias file right hand sides should be processed
normally.

However, I don't really like that I do the lookup twice
(and have to write it even three times).

Is there a possibility to save the result of the lookup in some variable
I missed in the documentation?

Regards,

Florian