1

Topic: Postfix: multiple relay options on failure

==== Required information ====
- iRedMail version (check /etc/iredmail-release):    0.9.6
- Linux/BSD distribution name and version:    Ubuntu 16.04.2
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):     MySQL
- Web server (Apache or Nginx):    Apache
- Manage mail accounts with iRedAdmin-Pro?    No
====

Hi,

I have iRedMail up and running well (thanks for the software!). Outgoing email goes via direct SMTP submission to the external destination server. All works fine over 99% of the time but, rarely, the user gets a blacklist bounce (generally because my IP on Dream Ocean is sharing an IP range with another user whose behavior is poor).

When my user tells me of the problem, I can engage with the destination server abuse admin but this takes time. I do have access to relaying via ISP and the setup instructions on http://www.iredmail.org/docs/relayhost.html works well.

However, I would prefer to first send emails directly (as it permits more control and I can be more sure I get error messages back) and then only automatically fallback to the ISP relayhost if this attempt fails.

Is this even possible?

Cheers,

Martin

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Postfix: multiple relay options on failure

Try postfix parameter "smtp_fallback_relay":
http://www.postfix.org/postconf.5.html# … back_relay

3 (edited by martinveasey 2017-05-22 18:12:41)

Re: Postfix: multiple relay options on failure

Thanks Zhang, I can't figure out how my Google searches didn't uncover that setting ... it seems clear enough ...

Anyhow, I've put it in and am awaiting my next problem delivery to see if it fixes it.

EDIT:

smtp_fallback_relay = [smtp.server] does seem to work but also needs to be combined with:

soft_bounce = yes  (which requeues bounces rather than immediately send them back to the email client) and also bounce_queue_lifetime should probably be reduced from the default of 5d (I'm running at 1h) to ensure that real bounces come back to the user in a sensible time period.

4

Re: Postfix: multiple relay options on failure

Thanks for sharing. smile