mail_daemon: ESMTP auth fix (250 AUTH reply)

See RFC 5231 (https://tools.ietf.org/html/rfc5321): "Following the normal
syntax for multiline replies, these keywords follow the code (250) and a
hyphen for all but the last line..."

Change-Id: I1ee533a332d1e18ffddd4ad1520d14f4013b739e
Reviewed-on: https://review.haiku-os.org/670
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Peter Kosyh 2018-11-04 21:45:10 +03:00 committed by waddlesplash
parent b5ecd7c203
commit 1ad1c1c87b

View File

@ -425,7 +425,8 @@ SMTPProtocol::Open(const char *address, int port, bool esmtp)
if (esmtp) {
const char *res = fLog.String();
char *p;
if ((p = ::strstr(res, "250-AUTH")) != NULL) {
if ((p = ::strstr(res, "250-AUTH")) != NULL
|| (p = ::strstr(res, "250 AUTH")) != NULL) {
if(::strstr(p, "LOGIN"))
fAuthType |= LOGIN;
if(::strstr(p, "PLAIN"))