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

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: Florian Laws
Υ/ο: exim-users
Αντικείμενο: Re: [exim] How to invoke an Exim Filter from an alias file?
On Fri, 29 Sep 2006, Florian Laws wrote:

> I there a way to "invoke" an Exim Filter File from an alias file?


No, but you can call it from a redirect router.

> I'd like to have a special directive with the filter file on the
> right hand side of an alias file entry, that causes Exim to read
> in the Filter File and continue as if it was found in a .forward
>
> Something like:
>
> user:        use-filter:/path/to/filterfile

>
> I gather from the manual that the redirect router proceses filter code,
> if that code is the result of an expression in the data option.
> So maybe it can be done with some wicked string expansion?


If your file contains

user: /path/to/filterfile

you could try

special_filter:
driver = redirect
allow_filter
file = ${lookup{$local_part}lsearch{/the/file}{$value}fail}
user = ????

You have to set some user for the filter to run as.    


-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book