Re: [exim] Different local domain for bounces

Top Page
Delete this message
Reply to this message
Author: Chris Knadle
Date:  
To: exim-users
Subject: Re: [exim] Different local domain for bounces
On Thursday, January 30, 2014 20:31:30 George wrote:
> Thanks Chris for your answer.
>
> What I wanted to achieve with this is that in case the external SMTP
> is down, the user inmediately gets the bounce notification, regardless
> if the mail is queued.


I think you're not talking about a "bounce" per se then, as I believe that
implies a permanent sending failure -- instead I think you're talking about
the Exim temporary failure notifications.

> If this happens, I want to be able to quickly change the relay server
> to another one.


That seems unusual but... okay.

At some point you might want to look into setting up "alternate relayhosts"
which I think you might be able to do by using manualroute for your "foo.com"
domain.

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

... or some other way of "automatically" detecting that the smarthost is down
and having the computer do this work for you, because detecting the problem,
and shutting down mail to switch smarthosts sounds like it could get a bit
tedious. Try to set things up so you can take a week's vacation when you get
the chance to. ;-)

> Let me tell you (and everybody), that I figured out a way to achieve
> it: I set "errors_to = $sender_address_local_part" on the router
> options, and "return_path = $sender_address" on the transport options.
> That way if a delivery error occurs at router time (locally), the
> bounce is delivered to the local mailbox, but if the message
> sucessfully goes through the external SMTP it will have its return
> path corretly set to the original address (handled by the transport
> setting).


I think I see. So by setting "errors_to = $sender_address_local_part", you're
removing the domain name associated with only mail that gets returned so it
ends up being local (which works if it's a user account or a known local
alias), but if it gets transported successfully then you're setting the
return_path back to the normal email address.

That sounds like it should work okay.

-- Chris

--
Chris Knadle
Chris.Knadle@???