Hi Wietse,

Thanks very much for your advise; the solution you proposed worked 
straight-away!

Regards,
John
________________________________________
From: [email protected] [[email protected]] on 
behalf of Wietse Venema [[email protected]]
Sent: Tuesday, May 20, 2014 11:18 AM
To: Postfix users
Subject: Re: re-routing invalid/rejected mail requests

John Donath:
> Hi,
>
> I am currently working on an outgoing SMTP relay.
>
> Nothing magic about that but what I like to achieve is a way to
> reroute rejected mail to another SMTP relay.

You want to send mail "direct to the internet" and when that fails
you want to relay it via the provider? That may be done with
soft_bounce plus smtp_fallback_relay.

master.cf:
    smtp ... ... ... smtp
        -o soft_bounce=yes -o smtp_fallback_relay=[mail.provider.example]

The [] suppress MX lookups.

It's not a perfect solution: if the provider rejects mail then
it is soft-bounced, too.

References:
http://www.postfix.org/master.5.html
http://www.postfix.org/postconf.5.html#soft_bounce
http://www.postfix.org/postconf.5.html#smtp_fallback_relay

        Wietse



Reply via email to