GNOME Bugzilla – Bug 552425
[SMTP] Try to reconnect on connection lost during AUTH command
Last modified: 2015-09-30 00:46:16 UTC
Please describe the problem: If Evolution tries to connect to a SMTP server to send mail, and the remote server closes the connection while Evolution is busy (for example, if Evolution prompts the user for a password and the server times out), then Evolution treats the disconnection as an AUTH failure and will keep prompting the user for a password even though there's nothing listening at the other end. The only way of getting the mail sent is to press CANCEL and then try again with Send & Receive. (Related issue: this workaround only works because Evolution retries with the last password the user entered --- except Evolution knows that the password is not valid because it thinks (incorrectly) that the remote server rejected it. Should it retry at all or simply forget the password?) In this situation, Evolution should notice that the connection has been lost and reestablish it. (It would also be polite to prompt the user for the password *before* opening the connection, to avoid holding the connection open for long periods of time --- a lot of SMTP servers these days use very short timeouts as an antispam measure; the one I found this bug on is set to five seconds.) Steps to reproduce: Set up an email server with AUTH. Try to send mail. While Evolution is prompting the user for the password, disconnect the session. Watch Evolution get very confused. Actual results: Expected results: Does this happen every time? Other information:
This is also bug 254199 on Ubuntu Launchpad.
This is already partially fixed by bug #532472.
I made the SMTP transport re-try up to three times when the AUTH command fails with an EOF/EOS (End Of File/Stream) state. User is asked for the password up to three times, then he/she can re-try again. The limit to try up to three times is there to not get into an end-less loop (and a server flood), when using other than password prompt authentication method. Created commit 0fb0be0 in eds master (3.19.1+) Created commit 3fc24c8 in eds gnome-3-18 (3.18.1+)