On Tue, Jul 20, 2004 at 12:13:21PM -0300, Fabio Gomes wrote:
> Fabio Gomes wrote:
> >Fabio Gomes wrote:
> >
> >>Hi again,
> >>
> >> I have some problems with M$ Outlook and SMTP AUTH. Some users
> >>that do not save the password are getting error messages and they are
> >>unable to send mail.
> >>
> >> There go the 2 relevants lines of my qmail-smtpd log:
> >>
> >>2004-07-13 13:44:43.806922500 warning: auth_error: authorization
> >>failed (needed value is missing)
> >>2004-07-13 13:44:43.806971500 warning: auth_error: authorization
> >>failed (broken pipe)
> >>
> >> It seems th outlook is requesting the authentication but it is
> >>not suplying the user and password. I'm going to sniff the
> >>"conversation" to see what is wrong.
> >>
> >> But I will appretiate any help at this time.
> >>
The following patch should fix this issue.
With this the server will return a normal error for empty passwords:
auth login
334 VXNlcm5hbWU6
enp0ZXN0ZQ==
334 UGFzc3dvcmQ6
535 authentication failure
--
:wq Claudio
Index: qmail-smtpd.c
===================================================================
RCS file: /home/cvs-djbware/CVS/qmail-ldap/qmail-smtpd.c,v
retrieving revision 1.111
diff -u -p -r1.111 qmail-smtpd.c
--- qmail-smtpd.c 2 Jul 2004 16:00:35 -0000 1.111
+++ qmail-smtpd.c 27 Jul 2004 16:59:50 -0000
@@ -1518,11 +1518,11 @@ void smtp_auth(char *arg)
call_puts(&cct, arg); call_put(&cct, "", 1);
} else {
out("334 VXNlcm5hbWU6\r\n"); flush(); /* base64 for 'Username:' */
- if (call_getln(&ssin, &line) <= 0) die_read();
+ if (call_getln(&ssin, &line) == -1) die_read();
call_puts(&cct, line.s); call_put(&cct, "", 1);
}
out("334 UGFzc3dvcmQ6\r\n"); flush(); /* base64 for 'Password:' */
- if (call_getln(&ssin, &line) <= 0) die_read();
+ if (call_getln(&ssin, &line) == -1) die_read();
call_puts(&cct, line.s); call_putflush(&cct, "", 1);
} else if (case_diffs(type, "plain") == 0) {
logline(4,"auth plain");
@@ -1532,7 +1532,7 @@ void smtp_auth(char *arg)
call_puts(&cct, arg); call_putflush(&cct, "", 1);
} else {
out("334 \r\n"); flush();
- if (call_getln(&ssin, &line) <= 0) die_read();
+ if (call_getln(&ssin, &line) == -1) die_read();
call_puts(&cct, line.s); call_putflush(&cct, "", 1);
}
} else {