aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS6
-rw-r--r--smtp.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 63810f45..a164fd71 100644
--- a/NEWS
+++ b/NEWS
@@ -49,6 +49,12 @@ removed from a 6.4.0 or newer release.)
fetchmail 6.3.13 (not yet released):
+# REGRESSION FIXES
+* The multiline SMTP error fix in release 6.3.12 caused fetchmail to lose
+ message codes 400..599 and treat all of these as temporary error. This would
+ cause messages to be left on the server even if softbounce was turned off.
+ Reported by Thomas Jarosch.
+
# TRANSLATION UPDATES
* [cs] Czech, by Petr Pisar
* [zh_CN] Chinese (simplified), by Ji ZhengYu
diff --git a/smtp.c b/smtp.c
index e6047f8f..ef6cdb2d 100644
--- a/smtp.c
+++ b/smtp.c
@@ -352,16 +352,16 @@ int SMTP_ok(int sock, char smtp_mode, int mintimeout)
last_smtp_ok = time((time_t *) NULL);
+ strlcat(smtp_response, reply, sizeof(smtp_response));
+
if (strchr("123", reply[0])
&& isdigit((unsigned char)reply[1])
&& isdigit((unsigned char)reply[2])
&& strchr(" ", reply[3])) /* matches space and \0 */ {
- strlcat(smtp_response, reply, sizeof(smtp_response));
return SM_OK;
} else if (reply[3] != '-')
return SM_ERROR;
- strlcat(smtp_response, reply, sizeof(smtp_response));
strlcat(smtp_response, "\r\n", sizeof(smtp_response));
/* set an alarm for smtp ok */