Re: [exim] Different local domain for bounces

Top Page
Delete this message
Reply to this message
Author: George
Date:  
To: exim-users
Subject: Re: [exim] Different local domain for bounces
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. If this happens, I want to be able to quickly
change the relay server to another one.

> > If I don't set foo.com as a local domain, mail reaches the external SMTP
> > and gets back properly, but if the external SMTP is down then the bounce
> > goes nowhere (it is obvious since it doesn't know it is a local mailbox)
>
> I don't understand what you mean here. In this setup samba4.foo.com would
> accept mail going to foo.com and remained queued until the mail times out,
> which by default takes 5 days. You're saying the relayhost (i.e. external
> SMTP) server can be down for > 5 days? That is settable to be a longer period
> if you need longer. You also have the option of moving out the frozen
> messages so that they don't time out and cause bounces, setting exim for
> "queueonly" if you know the external SMTP is down... etc. There are options.
>
> Once a bounce happens, it still has the box has had to give up on delivery,
> and I think you're saying you'd like the user on the local box to get the
> delivery failure notification. That sounds like you want to rewrite the
> domain foo.com to be e.g. samba4.foo.com so that the failure notification goes
> to the user on the local machine.
>
> Is that correct? If so I think that's doable (though at the moment I'm not
> yet thinking about how).


That's exactly what I meant! The bounce was not being routed back to
the local user.

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

Hope this helps anybody else.

Best regards

George