Fix logging for all PRDR defer/deny.
authorJeremy Harris <jgh146exb@wizmail.org>
Sat, 19 Jan 2013 20:50:30 +0000 (20:50 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Sat, 19 Jan 2013 20:50:30 +0000 (20:50 +0000)
src/src/receive.c
test/log/5500
test/scripts/5500-PRDR/5500
test/stdout/5500

index 4f259923c265d45045df56b761fb27481241a8d5..7b0a22f5c5c4dd39e04228e53d3b60f15f4631e6 100644 (file)
@@ -3288,6 +3288,11 @@ else
                         : all_pass == OK
                           ? US"accepted"
                           : US"accepted for some recipients");
+        if (recipients_count == 0)
+         {
+          message_id[0] = 0;       /* Indicate no message accepted */
+         goto TIDYUP;
+         }
       }
     else
       prdr_requested = FALSE;
index 7d128c06f8716c4a16cebb0af2c184d6e88f43c9..ef5372cd145800390dba2e7090640d4a8e18c1e2 100644 (file)
@@ -11,3 +11,7 @@
 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= <> H=(rhu.barb) [127.0.0.1] P=esmtp S=sss
 1999-03-02 09:44:33 10HmaZ-0005vi-00 => user1 <user1@test.ex> R=r0 T=t1
 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 10HmbA-0005vi-00 PRDR R=<usery@test.ex> temporary refusal
+1999-03-02 09:44:33 10HmbA-0005vi-00 PRDR R=<usery@test.ex> temporary refusal
+1999-03-02 09:44:33 10HmbB-0005vi-00 PRDR R=<userz@test.ex> refusal
+1999-03-02 09:44:33 10HmbB-0005vi-00 PRDR R=<userz@test.ex> refusal
index 3090fa5edbccbcd72ffc9c30ad3ccc5741083f40..567b0008596467213a2c2204fffba6a04fec1506 100644 (file)
@@ -93,5 +93,63 @@ quit
 ****
 sleep 1
 #
+# 4: double temp-reject
+client 127.0.0.1 PORT_D
+??? 220
+ehlo rhu.barb
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250-PRDR
+??? 250
+mail from:<> PRDR
+??? 250
+rcpt to:<usery@test.ex>
+??? 250
+rcpt to:<usery@test.ex>
+??? 250
+data
+??? 354
+Sender: sender@some.where
+.
+??? 353
+??? 450
+??? 450
+??? 250
+quit
+??? 221
+****
+sleep 1
+#
+# 5: double reject
+client 127.0.0.1 PORT_D
+??? 220
+ehlo rhu.barb
+??? 250-
+??? 250-
+??? 250-
+??? 250-
+??? 250-PRDR
+??? 250
+mail from:<> PRDR
+??? 250
+rcpt to:<userz@test.ex>
+??? 250
+rcpt to:<userz@test.ex>
+??? 250
+data
+??? 354
+Sender: sender@some.where
+.
+??? 353
+??? 550
+??? 550
+??? 550
+quit
+??? 221
+****
+sleep 1
+#
 killdaemon
 #
index 7732787ef3970593b9229bd5f0f7fd4b81117057..d5efef741a2995a2fdce5d201327ef05ef0fbdcb 100644 (file)
@@ -120,3 +120,87 @@ Connecting to 127.0.0.1 port 1225 ... connected
 ??? 221
 <<< 221 myhost.test.ex closing connection
 End of script
+Connecting to 127.0.0.1 port 1225 ... connected
+??? 220
+<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> ehlo rhu.barb
+??? 250-
+<<< 250-myhost.test.ex Hello rhu.barb [127.0.0.1]
+??? 250-
+<<< 250-SIZE 52428800
+??? 250-
+<<< 250-8BITMIME
+??? 250-
+<<< 250-PIPELINING
+??? 250-PRDR
+<<< 250-PRDR
+??? 250
+<<< 250 HELP
+>>> mail from:<> PRDR
+??? 250
+<<< 250 OK, PRDR Requested
+>>> rcpt to:<usery@test.ex>
+??? 250
+<<< 250 Accepted
+>>> rcpt to:<usery@test.ex>
+??? 250
+<<< 250 Accepted
+>>> data
+??? 354
+<<< 354 Enter message, ending with "." on a line by itself
+>>> Sender: sender@some.where
+>>> .
+??? 353
+<<< 353 PRDR content analysis beginning
+??? 450
+<<< 450 PRDR R=<usery@test.ex> temporary refusal
+??? 450
+<<< 450 PRDR R=<usery@test.ex> temporary refusal
+??? 250
+<<< 250 id=10HmbA-0005vi-00 message accepted for some recipients
+>>> quit
+??? 221
+<<< 221 myhost.test.ex closing connection
+End of script
+Connecting to 127.0.0.1 port 1225 ... connected
+??? 220
+<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+>>> ehlo rhu.barb
+??? 250-
+<<< 250-myhost.test.ex Hello rhu.barb [127.0.0.1]
+??? 250-
+<<< 250-SIZE 52428800
+??? 250-
+<<< 250-8BITMIME
+??? 250-
+<<< 250-PIPELINING
+??? 250-PRDR
+<<< 250-PRDR
+??? 250
+<<< 250 HELP
+>>> mail from:<> PRDR
+??? 250
+<<< 250 OK, PRDR Requested
+>>> rcpt to:<userz@test.ex>
+??? 250
+<<< 250 Accepted
+>>> rcpt to:<userz@test.ex>
+??? 250
+<<< 250 Accepted
+>>> data
+??? 354
+<<< 354 Enter message, ending with "." on a line by itself
+>>> Sender: sender@some.where
+>>> .
+??? 353
+<<< 353 PRDR content analysis beginning
+??? 550
+<<< 550 PRDR R=<userz@test.ex> refusal
+??? 550
+<<< 550 PRDR R=<userz@test.ex> refusal
+??? 550
+<<< 550 id=10HmbB-0005vi-00 message rejected for all recipients
+>>> quit
+??? 221
+<<< 221 myhost.test.ex closing connection
+End of script