Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbmail-imapd TLS error when connecting with Mozilla Thunderbird #270

Open
owldance opened this issue Mar 24, 2024 · 6 comments
Open

dbmail-imapd TLS error when connecting with Mozilla Thunderbird #270

owldance opened this issue Mar 24, 2024 · 6 comments

Comments

@owldance
Copy link

Hi

I'm no security expert, so I'm not sure whether it's Mozilla Thunderbird client, dbmail-imapd or me who is at fault here:

In dbmail.conf I have set file_logging_levels = 128 and tls_ciphers = HIGH. Then I connect with Thunderbird with security STARTTLS and authentication Normal password:

Debug:[clientbase] ci_starttls(+228): [0x7feb00775500] ssl_state [-1]
Debug:[imap] dbmail_imap_session_new(+159): imap session [0x7feb066afd80] created
Debug:[clientbase] ci_cork(+203): [0x7feb00775500] [17] [17]
Debug:[clientbase] ci_write(+335): ssl write error SSL_ERROR_WANT_READ
Debug:[clientbase] ci_write(+338): SSL Retry [1/4000] t[-1]
... then 3999 more retries

However connecting with:

openssl s_client -connect my-imap-server:993

I'm able to complete a successful IMAP session.

DBMail 3.4.1 as systemd service on ubuntu 22.04.1 with PostgreSQL 14.11. Mozilla Thunderbird 115.8.1

@CozC
Copy link
Member

CozC commented Mar 24, 2024 via email

@owldance
Copy link
Author

Hi CozC

Thank you for your reply, which I don´t understand in full. Except that it's probably a problem with openssl, and I should use a proxy which can handle the request.

Both client and server are ubuntu 22.04.1. the default openssl only supports ciphers 128 bit or higher, so I can't lower the cipher requirement.

@alan-hicks
Copy link
Member

STARTTLS is for port 143.
Port 993 is already encrypted for SSL/TLS.

@owldance
Copy link
Author

owldance commented Mar 24, 2024

Hi alan-hicks

Thank you.

dbmail-imapd announces STARTTLS on both port 143 and 993, so that's probably what's been confusing Thunderbird and me.

* OK [CAPABILITY IMAP4rev1 STARTTLS ID LOGINDISABLED LITERAL+] dbmail 3.4.1 ready.

I assume that means if I want SSL/TLS on 993 I can't have have STARTTLS on 143, and would have to override the default capability string in dmail.conf.

@owldance
Copy link
Author

Uncommenting the supplied capability string in dbmail.conf, Thunderbird can now connect with both STARTTLS on 143 and SSL/TLS on 993. Problem solved, thank you.

capability = IMAP4 IMAP4rev1 AUTH=LOGIN ACL RIGHTS=texk NAMESPACE CHILDREN SORT QUOTA THREAD=ORDEREDSUBJECT UNSELECT IDLE

@alan-hicks
Copy link
Member

It's normal to run DBMail on ports 143 and 993 at the same time. It's the MUA that should be configured to use the right one, changing TLS/STARTTLS does the right thing and changes the port on Thunderbird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants