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

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Florian Laws
Datum:  
To: 'exim-users@exim.org'
Betreff: Re: [exim] How to invoke an Exim Filter from an alias file?
Philip Hazel 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.


Oh, I meant that the redirect router should pull it from the alias file. :)

> > 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

[...]
> 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 = ????


I'd like to have it compatible with all the other entries in the alias
file. For an entry like

foo:    fl@???


your suggestion gives the error
R=test_filter defer (-1): "fl@???" is not an absolute path

Also, and that would be a bigger problem, it is syntactically identical
to the

user:        /path/to/mailbox


syntax for direct delivery into a mailbox, so that would break too.

Something like:

user:        ":include:/path/to/filterfile" 


would be perfect, but the manual explicitly says that this doesn't
work for filter files. What's the reason for this?

Kind regards,

Florian