开发者

postfix relay failover [closed]

开发者 https://www.devze.com 2022-12-12 06:41 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. 开发者_StackOverflow中文版
Closed. This question is off-topic. It is not currently accepting answers. 开发者_StackOverflow中文版

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 9 years ago.

Improve this question

Is there a way to configure postfix to use a relay only if direct delivery is rejected? The case being a web application that has to send notification to subscribers, but some servers reject the connection. I want those cases to be retried using a paid SMTP relay like authsmtp.com. However I don't want to use the relay for everything since it costs per mail.


This is definitely a serverfault.com question. Also, the answer is a somewhat ugly hack and not recommended under normal situations.

You will need to ignore the permanent response error codes. For this, in main.cf: soft_bounce = yes

This converts all 5xx errors to 4xx errors (including nosuchuser responses and all that).

Set authsmtp.com as your relayhost in main.cf: relayhost = [whatever.authsmtp.com]:port

Setup your Postfix to authenticate for relaying via authsmtp.com (via IP if they allow it, or see http://www.postfix.org/SASL_README.html#client_sasl for how to enable SMTP AUTH in the Postfix smtp client).

0

精彩评论

暂无评论...
验证码 换一张
取 消