Thunderbird does not connect to mailbox

Discussion in 'Installation/Configuration' started by DrMartinus, Jul 12, 2025.

  1. DrMartinus

    DrMartinus Member HowtoForge Supporter

    I have a user who has set up his mailbox exactly as it should be, yet Thunderbird says either "Could not find settings for the mail account" or "Failed login. Maybe the configuration, username or password are incorrect".
    Username (email-address) and password are correct. Then there is only the configuration left. But what could be wrong there? It's pop3 for receiving, SSL/TLS, port 995, and smtp for sending, SSL/TLS, port 465. Everything matches my own settings (besides username and password, of course), and my account has absolutely no problems.
    The user has a VPN installed, but he disabled it for testing, which didn't change anything.
    What am I missing?
     
  2. remkoh

    remkoh Active Member HowtoForge Supporter

    Thunderbird looks for domains' mailsettings on the internet, I think in a few different ways.
    One of them is looking for https://autoconfig.domain.tld/mail/[email protected]
    This is completely separate from ISPC and Dovecot!
    What I did myself is create a vhost <autoconfig.mymaindomain.tld> and in there /mail/config-v1.1.xml which actually is a php-script that builds the xml data based on hostheader used and returns it to the client.
    Client domains I proxypass with separate vhosts so I don't have all my clients in my main domain certificate.

    I do the same for Outlook, which looks for https://autodiscover.domain.tld/autodiscover/autodiscover.xml among other url's.
     
    Last edited: Jul 13, 2025
  3. remkoh

    remkoh Active Member HowtoForge Supporter

    https://autoconfig.domain.tld/mail/[email protected]

    XML generated by PHP, prefering STARTTLS over SSL, IMAP over POP and SUBMISSION over SMTP.

    Code:
    <clientConfig version="1.1">
        <emailProvider id="domain.tld">
            <domain>domain.tld</domain>
            <displayName>%EMAILADDRESS%</displayName>
            <incomingServer type="imap">
                <hostname>hostname mailserver</hostname>
                <port>143</port>
                <socketType>STARTTLS</socketType>
                <username>%EMAILADDRESS%</username>
                <authentication>password-cleartext</authentication>
            </incomingServer>
            <incomingServer type="imap">
                <hostname>hostname mailserver</hostname>
                <port>993</port>
                <socketType>SSL</socketType>
                <username>%EMAILADDRESS%</username>
                <authentication>password-cleartext</authentication>
            </incomingServer>
            <incomingServer type="pop3">
                <hostname>hostname mailserver</hostname>
                <port>110</port>
                <socketType>STARTTLS</socketType>
                <username>%EMAILADDRESS%</username>
                <authentication>password-cleartext</authentication>
                <pop3>
                    <leaveMessagesOnServer>true</leaveMessagesOnServer>
                    <downloadOnBiff>true</downloadOnBiff>
                    <daysToLeaveMessagesOnServer>30</daysToLeaveMessagesOnServer>
                </pop3>
            </incomingServer>
            <incomingServer type="pop3">
                <hostname>hostname mailserver</hostname>
                <port>995</port>
                <socketType>SSL</socketType>
                <username>%EMAILADDRESS%</username>
                <authentication>password-cleartext</authentication>
                <pop3>
                    <leaveMessagesOnServer>true</leaveMessagesOnServer>
                    <downloadOnBiff>true</downloadOnBiff>
                    <daysToLeaveMessagesOnServer>30</daysToLeaveMessagesOnServer>
                </pop3>
            </incomingServer>
            <outgoingServer type="smtp">
                <hostname>hostname mailserver</hostname>
                <port>587</port>
                <socketType>STARTTLS</socketType>
                <username>%EMAILADDRESS%</username>
                <authentication>password-cleartext</authentication>
            </outgoingServer>
            <outgoingServer type="smtp">
                <hostname>hostname mailserver</hostname>
                <port>25</port>
                <socketType>STARTTLS</socketType>
                <username>%EMAILADDRESS%</username>
                <authentication>password-cleartext</authentication>
            </outgoingServer>
            <outgoingServer type="smtp">
                <hostname>hostname mailserver</hostname>
                <port>465</port>
                <socketType>SSL</socketType>
                <username>%EMAILADDRESS%</username>
                <authentication>password-cleartext</authentication>
            </outgoingServer>
        </emailProvider>
    </clientConfig>
    
     
    Last edited: Jul 13, 2025
  4. remkoh

    remkoh Active Member HowtoForge Supporter

    https://autodiscover.domain.tld/autodiscover/autodiscover.xml

    XML generated by PHP, prefering STARTTLS over SSL, IMAP over POP and SUBMISSION over SMTP.

    Code:
    <Autodiscover>
        <Response>
            <Account>
                <AccountType>email</AccountType>
                <Action>settings</Action>
                <Protocol>
                    <Type>IMAP</Type>
                    <Server>hostname mailserver</Server>
                    <Port>143</Port>
                    <DomainRequired>off</DomainRequired>
                    <LoginName>%EMAILADDRESS%</LoginName>'
                    <SPA>off</SPA>
                    <SSL>on</SSL>
                    <Encryption>TLS</Encryption>
                    <AuthRequired>on</AuthRequired>
                </Protocol>
                <Protocol>
                    <Type>IMAP</Type>
                    <Server>hostname mailserver</Server>
                    <Port>993</Port>
                    <DomainRequired>off</DomainRequired>
                    <LoginName>%EMAILADDRESS%</LoginName>'
                    <SPA>off</SPA>
                    <SSL>on</SSL>
                    <Encryption>SSL</Encryption>
                    <AuthRequired>on</AuthRequired>
                </Protocol>
                <Protocol>
                    <Type>POP3</Type>
                    <Server>hostname mailserver</Server>
                    <Port>110</Port>
                    <DomainRequired>off</DomainRequired>
                    <LoginName>%EMAILADDRESS%</LoginName>'
                    <SPA>off</SPA>
                    <SSL>on</SSL>
                    <Encryption>TLS</Encryption>
                    <AuthRequired>on</AuthRequired>
                </Protocol>
                <Protocol>
                    <Type>POP3</Type>
                    <Server>hostname mailserver</Server>
                    <Port>995</Port>
                    <DomainRequired>off</DomainRequired>
                    <LoginName>%EMAILADDRESS%</LoginName>'
                    <SPA>off</SPA>
                    <SSL>on</SSL>
                    <Encryption>SSL</Encryption>
                    <AuthRequired>on</AuthRequired>
                </Protocol>
                <Protocol>
                    <Type>SMTP</Type>
                    <Server>hostname mailserver</Server>
                    <Port>587</Port>
                    <DomainRequired>off</DomainRequired>
                    <LoginName>%EMAILADDRESS%</LoginName>'
                    <SPA>off</SPA>
                    <SSL>on</SSL>
                    <Encryption>TLS</Encryption>
                    <AuthRequired>on</AuthRequired>
                    <UsePOPAuth>on</UsePOPAuth>
                    <SMTPLast>off</SMTPLast>
                </Protocol>
                <Protocol>
                    <Type>SMTP</Type>
                    <Server>hostname mailserver</Server>
                    <Port>25</Port>
                    <DomainRequired>off</DomainRequired>
                    <SPA>off</SPA>
                    <SSL>on</SSL>
                    <Encryption>TLS</Encryption>
                    <AuthRequired>on</AuthRequired>
                    <UsePOPAuth>on</UsePOPAuth>
                    <SMTPLast>off</SMTPLast>
                </Protocol>
                <Protocol>
                    <Type>SMTP</Type>
                    <Server>hostname mailserver</Server>
                    <Port>465</Port>
                    <DomainRequired>off</DomainRequired>
                    <LoginName>%EMAILADDRESS%</LoginName>'
                    <SPA>off</SPA>
                    <SSL>on</SSL>
                    <Encryption>SSL</Encryption>
                    <AuthRequired>on</AuthRequired>
                    <UsePOPAuth>on</UsePOPAuth>
                    <SMTPLast>off</SMTPLast>
                </Protocol>
            </Account>
        </Response>
    </Autodiscover>
    
     
    Last edited: Jul 16, 2025 at 11:16 AM

Share This Page