From: Jeremy Harris Date: Sat, 29 Jun 2019 18:37:57 +0000 (+0100) Subject: Fix bounce generation under RFC 3461 request. Bug 2411 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/ee2d305425037fc3bc00e6e44e990a88a92433ab Fix bounce generation under RFC 3461 request. Bug 2411 Broken-by: ea97267cea (cherry picked from commit df98a6ff2e70887890690ffbf8a8ad583d7d7e38) (cherry picked from commit b4a37a77271a8f6efc887d68265eb7867eff6170) (cherry picked from commit 145416c70b2e4422f0ff03f402da33a4a4db29e2) --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 3b36c87b9..497d91707 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -87,6 +87,10 @@ JH/29 Fix DSN Final-Recipient: field. Previously it was the post-routing forwarding. Change to the original envelope recipient address, per standards. +JH/30 Bug 2411: Fix DSN generation when RFC 3461 failure notification is + requested. Previously not bounce was generated and a log entry of + error ignored was made. + Exim version 4.92 ----------------- diff --git a/src/src/deliver.c b/src/src/deliver.c index 53562dd5c..d4ed8af08 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -7519,7 +7519,8 @@ while (addr_failed) mark the recipient done. */ if ( addr_failed->prop.ignore_error - || addr_failed->dsn_flags & (rf_dsnflags & ~rf_notify_failure) + || addr_failed->dsn_flags & rf_dsnflags + && !(addr_failed->dsn_flags & rf_notify_failure) ) { addr = addr_failed; diff --git a/test/log/0618 b/test/log/0618 index 25ef4e76c..0babf77c1 100644 --- a/test/log/0618 +++ b/test/log/0618 @@ -66,6 +66,33 @@ 1999-03-02 09:44:33 10HmbC-0005vi-00 event tcp:close 1999-03-02 09:44:33 10HmbC-0005vi-00 == rmt_defer@test.ex R=r2 T=smtp defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 451 Temporary local problem - please try later 1999-03-02 09:44:33 End queue run: pid=pppp +1999-03-02 09:44:33 10HmbB-0005vi-00 event msg:fail:internal +1999-03-02 09:44:33 10HmbB-0005vi-00 event msg:complete +1999-03-02 09:44:33 10HmbB-0005vi-00 removed by CALLER +1999-03-02 09:44:33 10HmbB-0005vi-00 Completed +1999-03-02 09:44:33 10HmbC-0005vi-00 event msg:fail:internal +1999-03-02 09:44:33 10HmbC-0005vi-00 event msg:complete +1999-03-02 09:44:33 10HmbC-0005vi-00 removed by CALLER +1999-03-02 09:44:33 10HmbC-0005vi-00 Completed +1999-03-02 09:44:33 rej/failure+delay +1999-03-02 09:44:33 Start queue run: pid=pppp +1999-03-02 09:44:33 10HmbD-0005vi-00 => :blackhole: R=r_dump +1999-03-02 09:44:33 10HmbD-0005vi-00 Completed +1999-03-02 09:44:33 10HmbD-0005vi-00 event msg:complete +1999-03-02 09:44:33 10HmbE-0005vi-00 event tcp:connect +1999-03-02 09:44:33 10HmbE-0005vi-00 event smtp:connect +1999-03-02 09:44:33 10HmbE-0005vi-00 event tcp:close +1999-03-02 09:44:33 10HmbE-0005vi-00 ** rmt_reject@test.ex R=r2 T=smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 550 Administrative prohibition +1999-03-02 09:44:33 10HmbF-0005vi-00 <= <> R=10HmbE-0005vi-00 U=EXIMUSER P=local S=sss for e@dump.ex +1999-03-02 09:44:33 10HmbE-0005vi-00 Completed +1999-03-02 09:44:33 10HmbE-0005vi-00 event msg:complete +1999-03-02 09:44:33 End queue run: pid=pppp +1999-03-02 09:44:33 deliver DSN +1999-03-02 09:44:33 Start queue run: pid=pppp +1999-03-02 09:44:33 10HmbF-0005vi-00 => :blackhole: R=r_dump +1999-03-02 09:44:33 10HmbF-0005vi-00 Completed +1999-03-02 09:44:33 10HmbF-0005vi-00 event msg:complete +1999-03-02 09:44:33 End queue run: pid=pppp ******** SERVER ******** 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 @@ -80,3 +107,5 @@ 1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F= temporarily rejected RCPT 1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F= temporarily rejected RCPT 1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F= temporarily rejected RCPT +1999-03-02 09:44:33 10HmbE-0005vi-00 <= e@dump.ex H=(testclient) [ip4.ip4.ip4.ip4] P=esmtp S=sss for rmt_reject@test.ex +1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F= rejected RCPT diff --git a/test/rejectlog/0618 b/test/rejectlog/0618 index 4c495d0e0..3b9bea1a0 100644 --- a/test/rejectlog/0618 +++ b/test/rejectlog/0618 @@ -5,3 +5,4 @@ 1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F= temporarily rejected RCPT 1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F= temporarily rejected RCPT 1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F= temporarily rejected RCPT +1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F= rejected RCPT diff --git a/test/scripts/0000-Basic/0618 b/test/scripts/0000-Basic/0618 index f841177a0..13d395f02 100644 --- a/test/scripts/0000-Basic/0618 +++ b/test/scripts/0000-Basic/0618 @@ -136,6 +136,44 @@ exim -z playout **** exim -q **** +sleep 1 +exim -Mrm $msg1 $msg2 +**** +# +# +# +# +# Client requests bounce+delay notification; bounce happens +exim -z rej/failure+delay +**** +client HOSTIPV4 PORT_D +??? 220 +EHLO testclient +??? 250- +??? 250-SIZE +??? 250-DSN +??? 250 HELP +MAIL FROM: +??? 250 +RCPT TO: NOTIFY=fAiLuRe,DELAY +??? 250 +DATA +??? 354 +Subject: test +. +??? 250 +QUIT +??? 221 +**** +# MSA send msg to MDA +exim -q +**** +# deliver notification from MDA +exim -z 'deliver DSN' +**** +exim -q +**** +sleep 1 killdaemon # # diff --git a/test/stdout/0618 b/test/stdout/0618 index 0fbac17d9..6bb2ca97f 100644 --- a/test/stdout/0618 +++ b/test/stdout/0618 @@ -128,3 +128,34 @@ Connecting to ip4.ip4.ip4.ip4 port 1225 ... connected ??? 221 <<< 221 myhost.test.ex closing connection End of script +Message 10HmbB-0005vi-00 has been removed +Message 10HmbC-0005vi-00 has been removed +Connecting to ip4.ip4.ip4.ip4 port 1225 ... connected +??? 220 +<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> EHLO testclient +??? 250- +<<< 250-myhost.test.ex Hello testclient [ip4.ip4.ip4.ip4] +??? 250-SIZE +<<< 250-SIZE 52428800 +??? 250-DSN +<<< 250-DSN +??? 250 HELP +<<< 250 HELP +>>> MAIL FROM: +??? 250 +<<< 250 OK +>>> RCPT TO: NOTIFY=fAiLuRe,DELAY +??? 250 +<<< 250 Accepted +>>> DATA +??? 354 +<<< 354 Enter message, ending with "." on a line by itself +>>> Subject: test +>>> . +??? 250 +<<< 250 OK id=10HmbE-0005vi-00 +>>> QUIT +??? 221 +<<< 221 myhost.test.ex closing connection +End of script