diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2026-02-10 07:51:49 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2026-02-10 07:51:49 +0000 |
| commit | 27a9b53363ff44df5b9b5acd17e64c77ec6ede53 (patch) | |
| tree | b94a71a5942d7a43874b98c5f577efe533cf15d0 /src/qmail-remote/tls.c | |
| parent | 34b8a10af3b6999e8dfbb1ee267bd58c09b27bfd (diff) | |
| download | smtpd-starttls-proxy-27a9b53363ff44df5b9b5acd17e64c77ec6ede53.tar.gz | |
Keep the MX name and use it as SNI servername
Diffstat (limited to 'src/qmail-remote/tls.c')
| -rw-r--r-- | src/qmail-remote/tls.c | 6 |
1 files changed, 4 insertions, 2 deletions
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" ; |
