zone-eu / zone-mta

📤 Modern outbound MTA cross platform and extendable server application
European Union Public License 1.2
602 stars 96 forks source link

Is the postfix feature "smtp_fallback_relay" available? #300

Closed DeadlyBug closed 2 years ago

DeadlyBug commented 2 years ago

In Postfix it is possible to offload messages that "soft bounce" to another MTA using the smtp_fallback_relay parameter. From the man page of smtp_fallback_relay: Optional list of relay hosts for SMTP destinations that can't be found or that are unreachable. By default, mail is returned to the sender when a destination is not found, and delivery is deferred when a destination is unreachable. The fallback relays must be SMTP destinations. Specify a domain, host, host:port, [host]:port, [address] or [address]:port; the form [host] turns off MX lookups. If you specify multiple SMTP destinations, Postfix will try them in the specified order.

This allows to have all messages which cannot be delivered straight away to a specific MTA, without polluting the "main MTA" queue & workload.

Is this behavior achievable in ZoneMTA out of the box? https://github.com/zone-eu/zone-mta/issues/295 is closely related, and based on the reply it seems that specific development would be needed to replicate the smtp_fallback_relay feature.

louis-lau commented 2 years ago

I wrote a plugin that does this for a business I worked at. I no longer have the code but it basically did what's described in the issue you linked. Worked fine and no changes to the zonemta code were needed.

Note that your "main" ip will never get whitelisted by servers that do greylisting, because you never try enough times. You could write a check for that in your plugin, I did back then.

dazoot commented 2 years ago

This is not something out of the box. You need to write a plugin for it which should be pretty trivial and more flexible than Postfix smtp_fallback_relay.

Luskan777 commented 2 years ago

Hi,

I developed a fallback plugin, it is available in issue #295 , it has helped me a lot, check if this plugin can also help you