Daily noted many mails are moving to the mail_undeliverable folder and seeing the same pattern of errors in maileater_nxd.log:
ERROR [mailNxdActorSystem-akka.actor.default-dispatcher-69] c.c.S.m.c.JavaMailSMTPClient - The transport is not connected or is dead. Reason: {} javax.mail.MessagingException: IOException while sending message at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1350).
Caused by: java.net.SocketException: Connection reset by peer: socket write error
DEBUG [mailNxdActorSystem-akka.actor.default-dispatcher-69] c.c.S.m.c.JavaMailSMTPClient - Updating the Connection Name to available: 868103972
ERROR [mailNxdActorSystem-akka.actor.default-dispatcher-69] c.c.S.m.NXJavaMailMailer - The transport is not connected or is dead.
javax.mail.MessagingException: IOException while sending message
ERROR 05:12:21.730UTC [mailNxdActorSystem-akka.actor.default-dispatcher-69] c.c.S.m.NXMailMailerActor - Mail sending failed. Reason: javax.mail.SendFailedException: Failed to send the mail after trying with all the mail hosts.
Release : 17.3 RU17
The connection reset is being done by Mailserver for some unknown reasons. Whenever an email is to be processed, we open a connection from the SDM Mail process connection pool and check if the transport (communication between the SDM Mail process & Mailserver) is connected. If connected, It means a socket is opened for communication and we send it to the Mailserver for processing.
Mailserver can close out the socket connections for some unknown reasons. Before 17.3RU23, Any mail that fails with socket exception (Connection Reset) will be treated as an undeliverable file and moved to the mail_undeliverable folder.
The behavior is fixed RU23 wherein any email that fails with socket exception (Connection Reset) will be moved back to the mail_queue folder for a retry.
Kindly apply RU23 or above to address this reported issue.