From 67c1e178e1f1d171181e574186468b68a810ee25 Mon Sep 17 00:00:00 2001 From: John Denker Date: Fri, 1 Jan 2016 11:54:31 -0700 Subject: unrevert earlier local improvements --- qmail-smtpd.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'qmail-smtpd.c') diff --git a/qmail-smtpd.c b/qmail-smtpd.c index b545760..4a35fa1 100644 --- a/qmail-smtpd.c +++ b/qmail-smtpd.c @@ -310,11 +310,22 @@ void smtp_ehlo(arg) char *arg; struct stat st; #endif smtp_greet("250-"); + out("\r\n"); #ifdef TLS - if (!ssl && (stat("control/servercert.pem",&st) == 0)) - out("\r\n250-STARTTLS"); + if (!ssl && (stat("control/servercert.pem", &st) == 0)) + out("250-STARTTLS\r\n"); +#endif + if (hostname && childargs) { +#ifdef AUTHCRAM + out("250-AUTH LOGIN CRAM-MD5 PLAIN\r\n"); + out("250-AUTH=LOGIN CRAM-MD5 PLAIN\r\n"); +#else + out("250-AUTH LOGIN PLAIN\r\n"); + out("250-AUTH=LOGIN PLAIN\r\n"); #endif - out("\r\n250-PIPELINING\r\n250 8BITMIME\r\n"); + } + out("250-PIPELINING\r\n"); + out("250 8BITMIME\r\n"); /* last one has a space, not a dash */ seenmail = 0; dohelo(arg); } void smtp_rset(arg) char *arg; @@ -473,7 +484,7 @@ void smtp_data(arg) char *arg; { if (qmail_open(&qqt) == -1) { err_qqt(); return; } qp = qmail_qp(&qqt); out("354 go ahead\r\n"); - + received(&qqt,protocol,local,remoteip,remotehost,remoteinfo,fakehelo); blast(&hops); hops = (hops >= MAXHOPS); -- cgit v1.2.3