diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2026-02-09 12:50:45 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2026-02-09 12:50:45 +0000 |
| commit | 38976bbe295bb85305dc4de01c9688f835d35299 (patch) | |
| tree | e2f4172dd2d303572e27f2919e9dad3efe0c592e /src/qmail-remote | |
| parent | 62fea3d36392d90c12f614ca09fdde0ed21063b1 (diff) | |
| download | smtpd-starttls-proxy-38976bbe295bb85305dc4de01c9688f835d35299.tar.gz | |
bugfix!
Diffstat (limited to 'src/qmail-remote')
| -rw-r--r-- | src/qmail-remote/qmail-remote.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qmail-remote/qmail-remote.c b/src/qmail-remote/qmail-remote.c index 1f4983b..057f6f1 100644 --- a/src/qmail-remote/qmail-remote.c +++ b/src/qmail-remote/qmail-remote.c @@ -262,6 +262,7 @@ int main (int argc, char const *const *argv) mxip const *mxs ; size_t eaddrpos[argc] ; size_t ntot = 0 ; + unsigned int pass = 1 + (qtls.flagwanttls && qtls.strictness == 1) ; unsigned int mxn = dns_stuff(hostpos ? storage.s + hostpos : host, argv, argc, eaddrpos, &mxipind, &storage, timeoutdns, ipme4.s, ipme4.len >> 2, ipme6.s, ipme6.len >> 4, !hostpos) ; if (!mxn) qmailr_perm("No suitable MX found for remote host") ; stralloc_free(&ipme4) ; @@ -274,8 +275,9 @@ int main (int argc, char const *const *argv) for (unsigned int i = 0 ; i < mxn ; i++) ntot += mxs[i].n4 + mxs[i].n6 ; if (!ntot) qmailr_perm("No suitable IP addresses for the MX") ; - for (; qtls.flagwanttls && qtls.strictness == 1 ; qtls.flagwanttls = 0) + while (pass--) { + if (!pass && qtls.strictness == 1) qtls.flagwanttls = 0 ; for (unsigned int i = 0 ; i < mxn ; i++) { #ifdef SKALIBS_IPV6_ENABLED |
