This commit allows the mailer to treat a SMTP 421 err as an event that should produce a reconnect attempt. Issue #2249 describes a case where we see this SMTP error code from the remote server when our connection has been idle for too long. We now reconnect when this happens rather than failing ungracefully. The logic in the `mail-test-srv` used to force a number of initial connections to be disconnected is changed such that half of these forced disconnects are the normal clean connection close and half are a SMTP 421. This allows the existing integration test for server disconnects to be reused to test the 421 reconnect logic. |
||
|---|---|---|
| .. | ||
| mailer.go | ||
| mailer_test.go | ||