Bug#952853: thunderbird: Account wizard fails to configure server settings using Mozilla's own autoconfig protocol, uses heuristic, fails

2020-03-01 Thread Justus Winter
Package: thunderbird
Version: 1:68.4.1-1~deb10u1
Severity: normal

Dear Maintainer,

I'm trying to improve the account creation for a mail server setup of
mine.  To this end, I setup and configured automx2 on the server, and
now I'm trying to get Thunderbird to use it.  automx2 implements
Mozilla's autoconfiguration protocol:

https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat

Sadly, Thunderbird's account creation wizard fails to use this
information.  I increased the log level on
mail.wizard.logging.{console,dump} to "All", and captured a log of
this interaction (see below).

The curious thing is that the autoconfiguration actually seems to
succeed:

2020-03-01 10:37:43 mail.setup  INFOfound config:
Incoming: imap, harrington.uberspace.de:993, SSL, auth: plain, username: 
(redacted), password: not set
Outgoing: smtp, harrington.uberspace.de:587, STARTTLS, auth: plain, username: 
(redacted), password: not set
2
2020-03-01 10:37:43 mail.setup  INFOCannot contact server
2

This is the right information, I don't understand why it says "Cannot
contact server":

% socat - tcp:harrington.uberspace.de:587
220 harrington.uberspace.de ESMTP
^C
% socat - openssl:harrington.uberspace.de:993
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE 
AUTH=PLAIN] Dovecot ready.
^C

This information is coming from the first source that Thunderbird
tries:

2020-03-01 10:37:42 mail.setup  INFORequesting 

2

% curl 
https://autoconfig.probier.email/mail/config-v1.1.xml?emailaddress=foobar@probier.email
probier.emailprobier.emailprobier.emailharrington.uberspace.de993SSL%EMAILADDRESS%plainharrington.uberspace.de587STARTTLS%EMAILADDRESS%plain

Thunderbird then goes on to try Microsoft's autodiscover protocol,
which should also be implemented by automx2, but that fails (haven't
looked into this deeper).  Finally, it tries some heuristic, which
mistakenly uses "probier.email" as the server name (which kinda works,
modulo TLS cert common name).

Manual configuration of the account works fine.


I expect autoconfiguration to work using Mozilla's own protocol.  If
anything goes wrong with that (maybe automx2 doesn't correctly
implement the protocol?), I'd like to see a more informative error
message in the log.

Feel free to test this with someaddress@probier.email.

*** bugs/thunderbird.all.log
2020-03-01 10:36:59 mail.setup  INFOInitializing setup wizard
2
2020-03-01 10:36:59 mail.setup  INFOEmail account setup dialog 
loaded.
2
2020-03-01 10:36:59 mail.setup  INFOswitching to UI mode start
2
2020-03-01 10:37:42 mail.setup  INFOfindConfig()
2
2020-03-01 10:37:42 mail.setup  INFOswitching to UI mode find-config
2
2020-03-01 10:37:42 mail.setup  WARNspinner start 
looking_up_settings
2
2020-03-01 10:37:42 mail.setup  INFOstatus msg: Looking up 
configuration…
2
2020-03-01 10:37:42 mail.setup  INFORequesting 

2
2020-03-01 10:37:42 mail.setup  INFORequesting 

2
2020-03-01 10:37:42 mail.setup  INFORequesting 

2
2020-03-01 10:37:42 mail.setup  INFORequesting 

2
2020-03-01 10:37:42 mail.setup  INFORequesting 

2
2020-03-01 10:37:42 mail.setup  INFORequesting 

2
2020-03-01 10:37:42 mail.setup  INFORequesting 

2
2020-03-01 10:37:42 mail.setup  INFORequesting 

2
2020-03-01 10:37:42 mail.setup  INFOcall 0 took 19ms and failed 
with local file not found
2
2020-03-01 10:37:42 mail.setup  INFOgetmx took 74ms
2
2020-03-01 10:37:42 mail.setup  INFOcall 3 took 75ms and failed 
with [Exception... "Component returned failure code: 0x804b0050 
(NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS) 
[nsIEffectiveTLDService.getBaseDomainFromHost]"  nsresult: "0x804b0050 
(NS_ERROR_INSUFFICIENT_DOMAIN_LEVELS)"  location: "JS frame :: 
chrome://messenger/content/accountcreation/fetchConfig.js :: 
fetchConfigForMX/sucAbortable.current< :: line 189"  data: no]
2
2020-03-01 10:37:43 mail.setup  INFOcall 1 took 135ms and failed 
with 404 Not Found at 

2
2020-03-01 10:37:43 mail.setup  INFOcall 3 took 136ms and failed 
with 404 Not Found at 

2
Exception { name: "NS_ERROR_INSUFFICIENT_DOMAIN_LEV

Bug#952853: thunderbird: Account wizard fails to configure server settings using Mozilla's own autoconfig protocol, uses heuristic, fails

2020-03-01 Thread Carsten Schoenert
Control: tags -1 upstream

Hello Justus,

Am 01.03.20 um 11:27 schrieb Justus Winter:
> I'm trying to improve the account creation for a mail server setup of
> mine.  To this end, I setup and configured automx2 on the server, and
> now I'm trying to get Thunderbird to use it.  automx2 implements
> Mozilla's autoconfiguration protocol:
> 
> https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat
> 
> Sadly, Thunderbird's account creation wizard fails to use this
> information.

this all isn't a Debian packaging problem so I can't really help out here.

I can only suggest to report your problem against the Mozilla Bugzilla
bug tracking system and give back the URL of this report there to this
bug report here afterwards.

Thanks!

-- 
Regards
Carsten Schoenert