From 8de6e0db2523d68161799dd5cbaf1d05b7dc40a2 Mon Sep 17 00:00:00 2001 From: manuel Date: Mon, 21 Mar 2016 14:05:48 +0100 Subject: don't announce SMTP AUTH commands if not available --- qmail-smtpd.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'qmail-smtpd.c') diff --git a/qmail-smtpd.c b/qmail-smtpd.c index 1c462b4..dac1b52 100644 --- a/qmail-smtpd.c +++ b/qmail-smtpd.c @@ -577,13 +577,7 @@ void smtp_helo(arg) char *arg; seenmail = 0; dohelo(arg); if (bhelook) flagbarfbhelo = bmcheck(BMCHECK_BHELO); } -void smtp_authout() { -#ifdef CRAM_MD5 - out("250-AUTH LOGIN PLAIN CRAM-MD5\r\n"); -#else - out("250-AUTH LOGIN PLAIN\r\n"); -#endif -} +void smtp_authout(); /* ESMTP extensions are published here */ void smtp_ehlo(arg) char *arg; { @@ -868,6 +862,15 @@ char ssauth2buf[512]; substdio ssauth = SUBSTDIO_FDBUF(safewrite,3,ssauthbuf,sizeof(ssauthbuf)); substdio ssauth2 = SUBSTDIO_FDBUF(saferead,4,ssauth2buf,sizeof(ssauth2buf)); +void smtp_authout() { + if (!*childargs) return; +#ifdef CRAM_MD5 + out("250-AUTH LOGIN PLAIN CRAM-MD5\r\n"); +#else + out("250-AUTH LOGIN PLAIN\r\n"); +#endif +} + int authgetl(void) { int i; -- cgit v1.2.3