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

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: W B Hacker
Ημερομηνία:  
Προς: exim users
Αντικείμενο: Re: [exim] How to invoke an Exim Filter from an alias file?
Florian Laws wrote:

> 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. :)


*snip*

No need to set up a 'filter'.

What you want to do works fine in an ordinary router/transport 'set'
that seeks info from <wherever Exim has been told to look for it>

Here is an 'in production' example that might be more easily adapted.

We use it where an ordinary-looking $local_part *happens* to actually be a
mailing list for which the MLM needs a kick-start from a script.

Note that this happens to use an 'accept' in the router and a 'pipe' in the
transport, neither a filter nor a redirect. There are usually several ways to
get to Rome with Exim.

+ml_domains is a 'dsearch-built' adaptable domainlist of the form:

domainlist ml_domains = dsearch;/usr/local/ecartis/domains/

====

# ROUTE_3A ECARTIS: Handle Ecartis 'master/catchall'.
#
ecartis:
driver = accept
domains = <specific domain> : +ml_domains
# some flexibility here... could also be a lookup or an SQL select
local_parts = ecartis
transport = ecartis_pipe

# ROUTE_3B ECARTIS LISTS: Handle specifc lists per-domain
#
ecartis_lists:
driver = accept
local_part_suffix = -requests : -repost : -admins : -moderators : -bounce
local_part_suffix_optional
require_files = /usr/local/ecartis/domains/$domain/$local_part
domains = +ml_domains
transport = ecartis_pipe

# one transport fits both here, may not for your needs...
=====

The transport:

# TRANSPORT_5B Ecartis pipe (for MLM's etc.)
#
ecartis_pipe:
driver = pipe
user = ecartis
group = mail
return_output
command = /usr/local/ecartis/virtual_ecartis.sh

HTH,

Bill