From 27a9b53363ff44df5b9b5acd17e64c77ec6ede53 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 10 Feb 2026 07:51:49 +0000 Subject: Keep the MX name and use it as SNI servername --- src/qmail-remote/tls.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/qmail-remote/tls.c') diff --git a/src/qmail-remote/tls.c b/src/qmail-remote/tls.c index 77be6f8..a679467 100644 --- a/src/qmail-remote/tls.c +++ b/src/qmail-remote/tls.c @@ -31,7 +31,7 @@ So instead of execing, we spawn it and stick around to translate the exit code and the error message back to qmail-rspawn. */ -void run_tls (int fdr, char const *fmtip, unsigned int timeoutconnect, unsigned int timeoutremote, qmailr_tls const *qtls, size_t helopos, size_t const *eaddrpos, unsigned int n, char const *storage) +void run_tls (int fdr, char const *fmtip, unsigned int timeoutconnect, unsigned int timeoutremote, qmailr_tls const *qtls, size_t helopos, size_t const *eaddrpos, unsigned int n, size_t mxnamepos, char const *storage) { int wstat ; pid_t pid ; @@ -48,7 +48,7 @@ void run_tls (int fdr, char const *fmtip, unsigned int timeoutconnect, unsigned char fmtw[UINT_FMT] ; char fmtt[UINT_FMT] ; char fmtk[UINT_FMT] ; - char const *argv[20 + n] ; + char const *argv[22 + n] ; if (fdw == -1) qmailr_tempusys("duplicate file descriptor") ; if (pipe(p) == -1) qmailr_tempusys("pipe") ; @@ -76,6 +76,8 @@ void run_tls (int fdr, char const *fmtip, unsigned int timeoutconnect, unsigned argv[m++] = fmtr ; argv[m++] = "-7" ; argv[m++] = fmtw ; + argv[m++] = "-k" ; + argv[m++] = storage + mxnamepos ; argv[m++] = "--" ; argv[m++] = SMTPD_STARTTLS_PROXY_LIBEXECPREFIX "qmail-remote-io" ; -- cgit v1.3.1