Hello StR, mikeone and Kostya,
Thank you very much for your replies and apologies for my late follow-up.
The problem is not isolated to sending emails. It is also happening when receiving emails (IMAP). If I then hit refresh on that account multiple times, then it normally works again after 2-3-4 attempts. I see that the error message I posted refers to the SMTP error. At the bottom is an error message from IMAP.
Answers to the (appreciated) suggestions:
* I'm not using SSL hardening. I tried to enable it for some time but I still got errors. It is disabled and has been some weeks.
* I've tried (and still have enabled) "accept any" for SSL certificate, but it did not help. (Note that the error is not persistent)
* I've tried SASL PLAIN for authentication, did not help.
* Regarding the server name (Certificate Domain Mismatch Error), I'm already using the dreamhost mail server domain names, I needed to fix that to even get SSL.
* I also tried to toggle SSLv3 and restart, which was described in some other thread, although I don't know if that was the same error.
Relevant settings as I have them now:
* IMAP: SSL (accept any), port 993, Prefer compatability
* SMTP: SSL (accept any), port 465, SASL PLAIN
* Settings -> Network: SSL hardening not selected, SSL validation selected.
Edit: I should also note, for what it's worth, that I don't see any errors like this in Thunderbird.
An IMAP error from today:
2015.09.20 10:29:03.993 +0200 [TASKS.3256] ***** ERROR: IOException caught in processTask for [org.kman.AquaMail.mail.imap.ImapTask_Sync@29548782, content://org.kman.AquaMail.data/accounts/1/ops/1442737743381, org.kman.AquaMail.mail.MailAccount@38bb352d: id = 1, username = My Full Name, email = my email address, name = Account name]
javax.net.ssl.SSLHandshakeException: Handshake failed
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:390)
at com.android.org.conscrypt.OpenSSLSocketImpl.waitForHandshake(OpenSSLSocketImpl.java:623)
at com.android.org.conscrypt.OpenSSLSocketImpl.getInputStream(OpenSSLSocketImpl.java:585)
at org.kman.AquaMail.net.MailSocketConnection.doConnectImpl(MailSocketConnection.java:165)
at org.kman.AquaMail.net.MailConnectionManager.acquire(MailConnectionManager.java:267)
at org.kman.AquaMail.net.MailConnectionManager.acquire(MailConnectionManager.java:152)
at org.kman.AquaMail.mail.imap.ImapTask_ConnectLogin.initConnection(ImapTask_ConnectLogin.java:192)
at org.kman.AquaMail.mail.imap.ImapTask_ConnectLogin.ensureConnectLogin(ImapTask_ConnectLogin.java:42)
at org.kman.AquaMail.mail.imap.ImapTask_Sync.process(ImapTask_Sync.java:116)
at org.kman.AquaMail.core.MailTaskBaseExecutor.execute(MailTaskBaseExecutor.java:76)
at org.kman.AquaMail.core.MailTaskQueueExecutor$MailTaskQueue.run(MailTaskQueueExecutor.java:610)
at java.lang.Thread.run(Thread.java:818)
Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb85ba9d8: Failure in SSL library, usually a protocol error
error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number (external/openssl/ssl/s3_pkt.c:345 0xac5e4c4d:0x00000000)
at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:318)
... 11 more