diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-18 15:15:18 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-18 15:15:18 +0200 |
commit | 7b4d3ab22988d021d5f12b81aec746f7e486fa52 (patch) | |
tree | 651e78e316411a39baadadb1cfaca450e1351c7f /src/qmail-smtpam.c | |
parent | 25f74781424d5e13f0211c08cce8c2a1d60b9aec (diff) |
update to 4.3.09
Diffstat (limited to 'src/qmail-smtpam.c')
-rw-r--r-- | src/qmail-smtpam.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/qmail-smtpam.c b/src/qmail-smtpam.c index f5247dc..0cb8b3b 100644 --- a/src/qmail-smtpam.c +++ b/src/qmail-smtpam.c @@ -325,13 +325,14 @@ void tls_init() temp_tlserr(); } -int starttls_peer() +int ehlo_starttls() { int i = 0; - while ( (i += str_chr(smtptext.s + i,'\n') + 1) && - (i < smtptext.len - 8) ) { - if (!str_diffn(smtptext.s + i + 4,"STARTTLS",8)) return 1; } + do { + if (case_starts(smtptext.s + i + 4,"STARTTLS")) return 1; + } while ((i += str_chr(smtptext.s + i,'\n') + 1) && + (i - 12 < smtptext.len)); return 0; } @@ -430,7 +431,7 @@ void smtp() if (flagutf8mail) buffer_puts(&bo," SMTPUTF8"); if (flagtls > 0 && flagtls < 10) /* STARTTLS */ - if (starttls_peer()) { + if (ehlo_starttls()) { smtp_starttls(); } else if (flagtls > 2) { temp_tlshost(); |