[email] unable to connect to secure host (dovecot server)



4 years ago
4 years ago


(Reporter: bugzmoz, Unassigned)


Firefox Tracking Flags

(Not tracked)




4 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
Build ID: 20150525141253

Steps to reproduce:

I opened the email app to set up my email account. In the manual setup I configured it correctly (see test data below) and hit "Next".

I tested it in Thunderbird (where it worked fine), Firefox OS 2.0 - 3.0 Simulator and in Firefox OS 2.0 (on GP Revolution)

Email address: test@mailtest.dubhe.uberspace.de
Account type: IMAP+SMTP
Hostname (both, SMTP & IMAP): dubhe.uberspace.de
Username (both): mailtest-test (or the email address)
Password (both): test
Encryption (both): StartTLS
IMAP port: 143 (default)
SMTP port: 587 (default)

Actual results:

I always get the following error message:

Unable to establish a secure connection with "hostname". There may be a problem with your network or the server.

Expected results:

I'd expected that the app connected to the mail server and set up the email account.
Huh, so, uh, after I verified the certificates were good, I decided to try and reproduce locally in case this is a complicated regression.  And I managed to actually create the account; I typed in the obvious password assuming it would fail...

I did this on a current 3.0/trunk build.  I would suggest re-testing and making sure that you enter the hostname "dubhe.uberspace.de" twice: once for IMAP, and once for SMTP.  Note that while we cleverly auto-propagate the password from IMAP to SMTP, we don't do that for the hostname (although a bug has been filed and it makes sense for us to do that so we'll try and get that enhancement in soon).

(NB: It seems likely to me that you might have encountered a real bug related to STARTTLS and then in your diligence to reproduce on various simulators that you forgot to fill in the hostname in the last one.  We did have a bug related to dovecot STARTTLS in bug 1080543.  It should be fixed everywhere, but in the case it's not, I'd suggest using initial-TLS on ports 993/487 since that should be faster anyways and won't encounter our probing failure.)

If you still experience a problem setting up the account, if you could provide a logcat as described at https://wiki.mozilla.org/Gaia/Email/RequiredBugInfo (but beware that the password you use will be exposed in the log currently, you're going to want to redact that, probably).

This is what the log looks like in the success currently (with pw redacted):
[Oauth] credentials-ok  undefined
[SmtpProber] connecting  {"_credentials":{"username":"test@mailtest.dubhe.uberspace.de","password":"REDACTED","outgoingUsername":"test@mailtest.dubhe.uberspace.de","outgoingPassword":"test"},"connInfo":{"emailAddress":"test@mailtest.dubhe.uberspace.de","hostname":"dubhe.uberspace.de","port":"587","crypto":"starttls"}}
[Oauth] credentials-ok  undefined
[SmtpClient] connect  {"_auth":{"user":"test@mailtest.dubhe.uberspace.de","pass":"test","xoauth2":null},"usingOauth2":false,"connInfo":{"emailAddress":"test@mailtest.dubhe.uberspace.de","hostname":"dubhe.uberspace.de","port":"587","crypto":"starttls"}}
[ImapClient] connected  {"connInfo":{"hostname":"dubhe.uberspace.de","port":"143","crypto":"starttls"}}
WWAR: Killing stale IMAP connection.
[SmtpClient] connected  {"emailAddress":"test@mailtest.dubhe.uberspace.de","hostname":"dubhe.uberspace.de","port":"587","crypto":"starttls"}
[SmtpProber] checking-address-validity  {"ns":"SmtpProber","_address":"test@mailtest.dubhe.uberspace.de"}
[SmtpProber] success  undefined

I'm going to resolve this WORKSFORME right now since it does work for me, but I'll still see any response you make, and you or I can re-open as needed.
Last Resolved: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.