deltachat / deltachat-core-rust

Delta Chat Rust Core library, used by Android/iOS/desktop apps, bindings and bots 📧
https://delta.chat/en/contribute
Other
657 stars 83 forks source link

Reconsider treating 450 4.1.2 SMTP error as permanent #5642

Open link2xt opened 3 months ago

link2xt commented 3 months ago

We currently treat such transient error as permanent for the reason described here: https://github.com/deltachat/deltachat-core-rust/blob/42a7cd3eea38a6ee04a9463c81df2f41157db4bc/src/smtp.rs#L427-L432

However it seems Postfix is capable of returning such incorrect errors when there is a transient DNS failure. Delta Chat better keep retrying the message in this case.

This workaround seems to have been introduced in 93ba6c1ce83a7f7e3afa207fddbf3e226e936521, PR #2126

The problem is reported to be happening with nauta.cu recipients and flaky DNS resolution of nauta.cu.

link2xt commented 3 months ago

There is some discussion at https://mailing.postfix.users.narkive.com/oj84RsQn/recipient-address-rejected-domain-not-found I did not find how to change 4.1.2 code to something else in the documentation: http://www.postfix.org/ADDRESS_VERIFICATION_README.html It is however possible to overwrite it later: http://www.postfix.org/postconf.5.html#default_delivery_status_filter

link2xt commented 3 months ago

I have checked all NS servers of nauta.cu (ns3.etecsa.net., ns4.etecsa.net., ns5.etecsa.net.cu., ns4.etecsa.net.cu., ns5.etecsa.net., ns3.etecsa.net.cu.), they all can resolve MX records into mail2.etecsa.net and mail3.etecsa.net. They all also resolve mail2.etecsa.net into 181.225.231.40 So it does not look like a misconfiguration of NS servers on nauta.cu.