[Users] failed SMTP auth does not ask for new password
Olaf Hering
olaf at aepfle.de
Thu Aug 10 08:10:46 CEST 2017
On Fri, Apr 07, Olaf Hering wrote:
> While trying to send an email I entered the wrong SMTP password. In the logs I see the 501 response from the server. When I try to send the message again CM will reuse the existing password, instead of asking for a new one. Is there any code in CM which would ask for a new password? If so, perhaps the "failed auth" response is not parsed properly.
> [07:53:04] SMTP< 220 host GroupWise Internet Agent 14.2.1 Copyright 1993-2016 Novell, Inc., a Micro Focus Company. All rights reserved. Ready
> [07:53:08] ESMTP< 501 Authentication failed
This (untested) patch will likely fix this bug.
Wiping all passwords is not an option, because it does just that.
Olaf
Signed-off-by: Olaf Hering <olaf at aepfle.de>
---
--- a/src/common/smtp.c
+++ b/src/common/smtp.c
@@ -522,7 +522,7 @@ static gint smtp_session_recv_msg(Sessio
return session_recv_msg(session);
if (msg[0] == '5' && msg[1] == '0' &&
- (msg[2] == '4' || msg[2] == '3' || msg[2] == '1')) {
+ (msg[2] == '4' || msg[2] == '3')) {
log_warning(LOG_PROTOCOL, _("error occurred on SMTP session\n"));
smtp_session->state = SMTP_ERROR;
smtp_session->error_val = SM_ERROR;
@@ -531,7 +531,7 @@ static gint smtp_session_recv_msg(Sessio
return -1;
}
- if (!strncmp(msg, "535", 3)) {
+ if (!strncmp(msg, "535", 3) || !strncmp(msg, "501", 3)) {
log_warning(LOG_PROTOCOL, _("error occurred on authentication\n"));
smtp_session->state = SMTP_ERROR;
smtp_session->error_val = SM_AUTHFAIL;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.claws-mail.org/pipermail/users/attachments/20170810/a93232f8/attachment.sig>
More information about the Users
mailing list