Skip to content

Fix modern TLS - #71

Open
mikhailnov wants to merge 2 commits into
deanproxy:masterfrom
mikhailnov:fix/yandex-smtp-tls-openssl3
Open

mikhailnov wants to merge 2 commits into
deanproxy:masterfrom
mikhailnov:fix/yandex-smtp-tls-openssl3

Conversation

@mikhailnov

Copy link
Copy Markdown
Contributor
  • Fix building with modern GCC without adding -fcommon
  • Fix working with modern smtp.yandex.ru and other modern servers

mikhailnov and others added 2 commits September 11, 2026 20:18
GCC 10+ defaults to -fno-common, so the tentative definitions of
table, conf_file and Mopts in email.h (included by every .c file)
now collide at link time ("multiple definition of ...").

Declare them extern in the header and define them once in email.c.

Co-authored-by: Z.AI GLM <[email protected]>
dnetUseTls() can fail (e.g. SSL_CTX_new() error on OpenSSL 3.x, or a
failed handshake), and its return value was ignored.  The code then
sent EHLO in plaintext right after STARTTLS, the server dropped the
connection, and the user saw a confusing "Lost connection with SMTP
server" instead of the real TLS error.

Check the return value and report the OpenSSL error text via
dnetGetErr() before aborting the send.

Co-authored-by: Z.AI GLM <[email protected]>
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.

1 participant