From c0a2ad5168d0e3b08082f14283d718acad869da6 Mon Sep 17 00:00:00 2001 From: Evil2000 Date: Wed, 26 Sep 2018 18:09:32 +0200 Subject: Added mapping to to PS_TRANSIENT or PS_REFUSED of LMTP response. (patch re-indented) --- sink.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'sink.c') 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++; + } } } -- cgit v1.2.3