Re: [exim] setting local_part_suffix globaly

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Philip Hazel
Datum:  
To: Jason_Meers
CC: exim-users
Betreff: Re: [exim] setting local_part_suffix globaly
On Wed, 31 Jan 2007, Jason_Meers wrote:

> I would like to be able to set the following globally after my ACL
> checks, but before any of my other routers are run:
>
> local_part_suffix = +*
> local_part_suffix_optional


This is not possible, as those options are per-router options. There is
no global way of adding a specific option to all routers. The best I can
suggest is to make use of macros or .include to add the same text to
all routers, if that is really what you want to do.

In any case, are you sure you want to add those to *all* routers,
including those that route addresses to remote servers about whose email
addresses you know nothing? (I suppose it might do no harm, but it
doesn't look sensible to me.)

> 2) If I use a redirect router I need to specify redirect data (not all
> addresses need redirecting and will match a rule, and I also have specif
> redirect routers below this that I need to process AFTER the suffix has
> been removed to work correctly)


If what you want to do is to strip suffixes from local parts for
processing by subsequent routers, you can use a redirect router before
those routers (but after the routers that handle remote addresses):

strip_suffixes:
driver = redirect
local_part_suffix = +*
data = ${quote_local_part:$local_part}@$domain

If there is no suffix, the router is skipped; if there is a suffix, it
is stripped. You can also use redirect_router to pass a redirected
address directly to the following router.

> How does everybody else do this?


I suspect that nobody does (totally globally).

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