Closed Bug 1917074 Opened 1 month ago Closed 12 days ago

TB 128 New Account Wizard Fails to add SMTP Server (when useGlobalPreferredServer is set, but no default server existed)

Categories

(Thunderbird :: Account Manager, defect)

Thunderbird 128
defect

Tracking

(thunderbird_esr128 affected, thunderbird131 affected)

RESOLVED FIXED
132 Branch
Tracking Status
thunderbird_esr128 --- affected
thunderbird131 --- affected

People

(Reporter: ohbobva, Assigned: mkmelin)

Details

(Keywords: regression)

Attachments

(5 files, 2 obsolete files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0

Steps to reproduce:

  • Install TB
  • New Account Wizard detects correct IMAP and SMTP settings - Continue/Finish
  • New account Inbox appears and downloads messages
  • Try to send mail or just check list of SMTP servers in Settings

Actual results:

  • The attempt to send mail never completes.
  • Checking the SMTP server list in Settings shows no SMTP servers are listed. The box is blank.

Expected results:

  • The SMTP server should have been added.

Notes...

The account's settings were correctly detected/displayed by the wizard via autoconfiguration from email provider (https://autoconfig.example.com/mail/config-v1.1.xml?emailaddress=example@example.com).

I went back and tried the account setup wizard on TB 102. That works correctly and it added the SMTP server. However, TB 128 does not. I haven't checked other versions after 102. All on Windows.

This works in general.
Try Help | Troubleshoot mode. If still a problem, can you try in a new Thunderbird profile? (Start with thunderbird.exe -P)
Also check the Error Console (Ctrl+Shift+J) for errors.

Component: Untriaged → Account Manager
Keywords: regression

(In reply to Magnus Melin [:mkmelin] from comment #1)

This works in general.
Try Help | Troubleshoot mode. If still a problem, can you try in a new Thunderbird profile? (Start with thunderbird.exe -P)
Also check the Error Console (Ctrl+Shift+J) for errors.

I don't see anything pertinent in the console. I will try to attach some screenshots.

I have created a restricted temporary email account to use for testing. Please have TB add the following account. Settings should be automatically discovered by TB. The wizard will display the detected and correct IMAP and SMTP settings, but will not actually add the SMTP server.

u: buckaroo@widomaker.com
p: overthruster

Best,
Bob

Attached image Console messages

Thanks, I can reproduce. The server is discovered using Exchange autodiscover, and a non-exchange server is used.
https://searchfox.org/comm-central/rev/7648cf48f0b702a00e547feb56b352c32f0dd464/mail/components/accountcreation/modules/ExchangeAutoDiscover.sys.mjs#399,448
But I think the whole addThisServer should be removed.

Assignee: nobody → mkmelin+mozilla
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: TB 128 New Account Wizard Fails to add SMTP Server → TB 128 New Account Wizard Fails to add SMTP Server (for SMTP discovered through Exchange autodiscover)

Remove addThisServer, which gets wrong defaults for Exchange autodiscover.
Where needed, replace with <incoming>.handlesOutgoing which is what this really is about. I don't think that had any business being in the xml.

There as aslo a second bug - since this setup had an autoconfig.xml as well. (Set mailnews.auto_config.fetchFromISP.enabled false to test only Exchange autodiscover.)
The autoconfig had

   <addThisServer>true</addThisServer>
   <useGlobalPreferredServer>true</useGlobalPreferredServer>

... but out code didn't check we had any default server to use as default.

I apologize, I may not be fully understanding all of these comments. What I have gathered is...

At some point, after TB 102, TB started using Outlook Autodiscover, in addition to Thunderbird's own Autoconfig to detect new account settings.

Why is it now preferring Outlook Autodiscover over Thunderbird's Autoconfig (config-v1.1.xml)? Shouldn't that be the other way around?

I assume that when Outlook Autodiscover support was added to TB, that is when this issue began, since TB used to properly set up new accounts using our Autoconfig XML (https://autoconfig.widomaker.com/mail/config-v1.1.xml?emailaddress=buckaroo@widomaker.com).

We set up TB's config-v1.1.xml for Thunderbird clients, and Outlook Autodiscover for Outlook clients (although newer Outlook clients don't appear to support this version of Autodiscover for IMAP accounts any longer). We used a PHP script to serve both of these (https://github.com/Thorarin/MailClientAutoConfig).

Why should these conflict? Shouldn't TB use/prefer config-v1.1.xml if available?

Thanks for your time and consideration.

Yes, the config-v1.1.xml version is preferred and will be used.
There was an issue with the outlook autodiscover handling, but also an issue with the config-v1.1.xml handling, in that it didn't add the server when the xml said to use global preferred server but there was no server set up already.

Status: NEW → ASSIGNED

Thanks for the clarification. I can't find any documentation on useGlobalPreferredServer.

It sounds we actually want useGlobalPreferredServer to be false, if "false" means that the SMTP server (found via autoconfig) will be added AND applied to the newly created IMAP or POP account, REGARDLESS of if there is an existing default SMTP account set up in Thunderbird.

Thank you,
Bob

Attachment #9423771 - Attachment is obsolete: true

We got useGlobalPreferredServer from autoconfig, but with no server set up that's a no-go.

For an SMTP discovered through Exchange autodiscover, make sure it is added.
The default for exchange was set to config.outgoing.addThisServer = false resulting in not adding the STMP even if it was found.

There seems little reason the config file should be able to decide on whether the server should be added or not.
This is an internal flag to opt out in certain situations.

Attachment #9427442 - Attachment is obsolete: true
Summary: TB 128 New Account Wizard Fails to add SMTP Server (for SMTP discovered through Exchange autodiscover) → TB 128 New Account Wizard Fails to add SMTP Server (when useGlobalPreferredServer is set, but no default server existed)
Target Milestone: --- → 132 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/25a34c44a626
Account setup: ignore useGlobalPreferredServer if there is no global server set up. r=babolivier
https://hg.mozilla.org/comm-central/rev/951b371c3929
disregard addServer from config file. r=babolivier

Status: ASSIGNED → RESOLVED
Closed: 12 days ago
Resolution: --- → FIXED

Comment on attachment 9427441 [details]
Bug 1917074 - Account setup: ignore useGlobalPreferredServer if there is no global server set up. r=babolivier

[Approval Request Comment] (both patches)
Regression caused by (bug #): unknown
User impact if declined: found smtp may not be added in all cases even if showing up in the UI to confirm
Testing completed (on c-c, etc.): c-c, beta
Risk to taking this patch (and alternatives if risky): pretty safe

Attachment #9427441 - Flags: approval-comm-esr128?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: