Re: [exim] address rewrite not working

Góra strony
Delete this message
Reply to this message
Autor: Graeme Fowler
Data:  
Dla: exim-users
Temat: Re: [exim] address rewrite not working
On Wed, 2010-12-22 at 14:33 +0000, Always Learning wrote:
> Why not ?


Well... because it's using a sledgehammer to crack a nut, it's
inflexible, and it works at the wrong point in the mail flow.

> Exim has been designed, programmed and released to the world to do
> exactly that ......


To be utterly pedantic about it, the design of Exim is to do
significantly more than just run the system filter.

> ... please will you kindly enlighten me why it might be advantageous to
> Exim admins to ignore the system filter facilities (which use a
> noticeably different syntax from the rest of Exim).


Because using a specific router is more flexible and can be put in an
appropriate place in the mail flow. The key to this is in the
documentation:

http://www.exim.org/exim-html-current/doc/html/spec_html/ch43.html

"The system filter operates in a similar manner to users’ filter files,
but it is run just once per message (however many recipients the message
has). It should not normally be used as a substitute for routing,
because deliver commands in a system router provide new envelope
recipient addresses."

So there you have it - use a redirect router instead.

> Would this forward mail for
> user1@??? to new.box@??? ?
>
>     divert_mail
>         driver = redirect
>         domains = old-domain.com
>         local_part = user1
>         data = new.box@???


That looks sane and reasonable, yes. For extra points, save yourself the
legwork of having additional routers in future by abstracting the
domains/local_part/data parts out into a lookup. Then next time you need
to divert mail, you can add an entry to your lookup table.

Graeme