aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvil2000 <evil.zweitausend@gmail.com>2018-09-26 18:09:32 +0200
committerMatthias Andree <matthias.andree@gmx.de>2018-11-25 12:25:25 +0100
commitc0a2ad5168d0e3b08082f14283d718acad869da6 (patch)
tree788a5dce29c3aef76144b1f9d3ef768b1385b253
parent8c57ec38ae327fcd648569acc915f47f0eb2547d (diff)
downloadfetchmail-c0a2ad5168d0e3b08082f14283d718acad869da6.tar.gz
fetchmail-c0a2ad5168d0e3b08082f14283d718acad869da6.tar.bz2
fetchmail-c0a2ad5168d0e3b08082f14283d718acad869da6.zip
Added mapping to to PS_TRANSIENT or PS_REFUSED of LMTP response.
(patch re-indented)
-rw-r--r--sink.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sink.c b/sink.c
index e025a412..e8dd8355 100644
--- a/sink.c
+++ b/sink.c
@@ -1491,8 +1491,16 @@ int close_sink(struct query *ctl, struct msgblk *msg, flag forward)
}
if (smtp_err != SM_OK)
{
- responses[errors] = xstrdup(smtp_response);
- errors++;
+ /*
+ * amavis returns the SMTP code from the recieving
+ * host after the DATA-DOT. So we need to compare the
+ * response to the antispam option here instead.
+ */
+ if (handle_smtp_report(ctl, msg) != PS_REFUSED) {
+ /* Only count an error if the message was not refused */
+ responses[errors] = xstrdup(smtp_response);
+ errors++;
+ }
}
}