Skip to content

Fix STARTTLS implementation#23838

Open
LewpyUK wants to merge 2 commits intoqbittorrent:masterfrom
LewpyUK:StartTLS
Open

Fix STARTTLS implementation#23838
LewpyUK wants to merge 2 commits intoqbittorrent:masterfrom
LewpyUK:StartTLS

Conversation

@LewpyUK
Copy link

@LewpyUK LewpyUK commented Feb 14, 2026

Closes #21611.

Need to properly implement STARTTLS for secure SMTP transfer
Current implementation ties STARTTLS to enabling SMTPS which is incorrect
Implemented new option for enabling STARTTLS, to allow user control in case of compatibility issues with SMTP servers
Altered SMTP state logic to link STARTTLS to new option for enabling it
Support for SMTPS is unaffected and still the same

Background

STARTTLS is used to elevate an unencrypted SMTP session to an encrypted SMTP session after it is established, whereas SMTPS is used to establish an encrypted SMTP session from the beginning.
Different SMTP systems offer different support for each SMTP encryption option.

GUI Changes

Client Preferences
image
Web Preferences
image

Expected Behaviour

The SMTP header of the email should look similar to the following
Without STARTTLS
Received: from <qBittorrent client name> (x.x.x.x) by <outgoing SMTP server> (x.x.x.x) with SMTP Server id x.y.z via Frontend Transport; Fri, 13 Feb 2026 17:45:31 +0000
With STARTTLS
Received: from <qBittorrent client name> (x.x.x.x) by <outgoing SMTP server> (x.x.x.x) with SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id x.y.z via Frontend Transport; Fri, 13 Feb 2026 08:43:18 +0000
Note: exact TLS version and ciphers will vary between clients and servers

@glassez glassez changed the title SMTP: Fix STARTTLS implementation Fix STARTTLS implementation Feb 14, 2026
@LewpyUK
Copy link
Author

LewpyUK commented Feb 14, 2026

Potentially closes #20226 as well

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

Successfully merging this pull request may close these issues.

Must issue a STARTTLS command first

1 participant