k9mail/k-9 — pull request #453 by zjw (2014-02-25 20:42:40+00:00)
Title: Authentication changes

Broad summary of changes:

Implement the SASL PLAIN authentication mechanism for IMAP and POP3.

Implement the POP3 APOP authentication method.

Fix CRAM-MD5 authentication for IMAP.

Improve the handling of non-ASCII user names and passwords.

Avoid a "Username or password incorrect" error message in cases where the error is likely due to other causes.

Improve parsing of SMTP extension keywords.

Use localized strings for a server's authentication options. There are now only two options available for all protocols (IMAP, POP3, & SMTP): "Normal password" (which uses one of these available methods, listed in decreasing order of preference: SASL PLAIN, SASL LOGIN (for SMTP only), IMAP LOGIN, or POP3 USER/PASS) and "Encrypted password" (which uses one of these available methods, listed in decreasing order of preference: SASL CRAM-MD5 or POP3 APOP). In cases where the connection security setting is something other than "SSL/TLS (always)" or "STARTTLS (always)", then the "Normal password" option is relabeled as "Password, transmitted insecurely".

For security reasons, the AUTOMATIC SMTP authentication option is no longer available for selection. While backward compatibility has been implemented for a pre-existing setting carried forward from earlier versions, users should be encouraged to review and update their SMTP authentication options after upgrade. Attempting to send email over a non-encrypted connection using a pre-existing AUTOMATIC setting will result in a "Failed to send some messages" notification if the SMTP server doesn't support CRAM-MD5. This is done in order to prevent unintended plain-text password transmission with the AUTOMATIC setting, possibly coerced by a MITM attack.

Further details about these and other changes can be found in the individual commit messages.