Docs: remove claim that -Mg causes specific wording in bounce. Bug 3026
authorJeremy Harris <jgh146exb@wizmail.org>
Sun, 24 Sep 2023 16:02:52 +0000 (17:02 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Sun, 24 Sep 2023 18:20:49 +0000 (19:20 +0100)
While investigating, ensure EXPERIMENTAL_DSN_INFO matches

21 files changed:
doc/doc-docbook/spec.xfpt
src/src/deliver.c
test/mail/0032.CALLER
test/mail/0037.CALLER
test/mail/0051.CALLER
test/mail/0103.CALLER
test/mail/0136.forwarder
test/mail/0174.CALLER
test/mail/0177.CALLER
test/mail/0296.CALLER
test/mail/0298.CALLER
test/mail/0306.anyone
test/mail/0307.anyone
test/mail/0385.CALLER
test/mail/0461.CALLER
test/mail/0536.oksender
test/mail/4620.CALLER
test/mail/4620.fred[
test/mail/5101.copied
test/mail/5204.CALLER
test/stdout/3412

index 13991d5cd630bc4bc66a1cde2a2834980ef3a9c1..85c6d3b3b5f3616f3d662e4d93a015433f0bcf80 100644 (file)
@@ -4020,7 +4020,7 @@ user.
 This option requests Exim to give up trying to deliver the listed messages,
 including any that are frozen. However, if any of the messages are active,
 their status is not altered. For non-bounce messages, a delivery error message
-is sent to the sender, containing the text &"cancelled by administrator"&.
+is sent to the sender.
 Bounce messages are just discarded. This option can be used only by an admin
 user.
 
index c9a1d074b311bebc0bc0b1d81bf115ea864e6d29..fa624f9de79136bfffbe37dceca70b5ac14f2977 100644 (file)
@@ -5743,7 +5743,7 @@ wording. */
 
     if (addr->return_file >= 0)
       {
-      paddr = &(addr->next);
+      paddr = &addr->next;
       filecount++;
       }
 
@@ -5850,6 +5850,9 @@ wording. */
   for (address_item * addr = handled_addr; addr; addr = addr->next)
     {
     host_item * hu;
+#ifdef EXPERIMENTAL_DSN_INFO
+    const uschar * s;
+#endif
 
     print_dsn_addr_action(fp, addr, US"failed", US"5.0.0");
 
@@ -5857,8 +5860,6 @@ wording. */
       {
       fprintf(fp, "Remote-MTA: dns; %s\n", hu->name);
 #ifdef EXPERIMENTAL_DSN_INFO
-      {
-      const uschar * s;
       if (hu->address)
        {
        uschar * p = hu->port == 25
@@ -5869,12 +5870,15 @@ wording. */
        dsn_put_wrapped(fp, US"X-Remote-MTA-smtp-greeting: X-str; ", s);
       if ((s = addr->helo_response) && *s)
        dsn_put_wrapped(fp, US"X-Remote-MTA-helo-response: X-str; ", s);
-      if ((s = addr->message) && *s)
+      if (testflag(addr, af_pass_message) && (s = addr->message) && *s)
        dsn_put_wrapped(fp, US"X-Exim-Diagnostic: X-str; ", s);
-      }
 #endif
       print_dsn_diagnostic_code(addr, fp);
       }
+#ifdef EXPERIMENTAL_DSN_INFO
+      else if (testflag(addr, af_pass_message) && (s = addr->message) && *s)
+       dsn_put_wrapped(fp, US"X-Exim-Diagnostic: X-str; ", s);
+#endif
     fputc('\n', fp);
     }
 
@@ -7009,8 +7013,9 @@ if (process_recipients != RECIP_IGNORE)
   for (i = 0; i < recipients_count; i++)
     if (!tree_search(tree_nonrecipients, recipients_list[i].address))
       {
-      recipient_item *r = recipients_list + i;
-      address_item *new = deliver_make_addr(r->address, FALSE);
+      recipient_item * r = recipients_list + i;
+      address_item * new = deliver_make_addr(r->address, FALSE);
+
       new->prop.errors_address = r->errors_to;
 #ifdef SUPPORT_I18N
       if ((new->prop.utf8_msg = message_smtputf8))
@@ -7070,6 +7075,8 @@ if (process_recipients != RECIP_IGNORE)
 
         case RECIP_FAIL:
          new->message  = US"delivery cancelled by administrator";
+         /* not setting af_pass_message here means that will not
+         appear in the bounce message */
          /* Fall through */
 
         /* Common code for the failure cases above. If this is not a bounce
@@ -7078,7 +7085,7 @@ if (process_recipients != RECIP_IGNORE)
         The incident has already been logged. */
 
         RECIP_QUEUE_FAILED:
-         if (sender_address[0])
+         if (*sender_address)
            {
            new->next = addr_failed;
            addr_failed = new;
index 7065137b8b37d5b739147c20ae0f75ba80c07a73..b37b412ee283fc7943125a8564447265c90156c2 100644 (file)
@@ -36,6 +36,7 @@ Reporting-MTA: dns; myhost.ex
 Action: failed
 Final-Recipient: rfc822;userx@mxt1.test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; lowest numbered MX record points to local host
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
index c0348c45709efdb2a2fe1886898792a43ef6e2a6..0ac821a59120aa760d4f64cc93ce33ceca17f2a3 100644 (file)
@@ -42,14 +42,17 @@ Reporting-MTA: dns; the.local.host.name
 Action: failed
 Final-Recipient: rfc822;userx@test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; subject was  "should fail this" (filter fail)
 
 Action: failed
 Final-Recipient: rfc822;abcd@test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; subject was  "should fail this" (filter fail)
 
 Action: failed
 Final-Recipient: rfc822;usery@test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; subject was  "should fail this" (filter fail)
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
index b51ae1bc6edc26235cf19b90f125fa50748ff739..e966d88b53fa0b5c3ba1845645abee1a387cf7d1 100644 (file)
@@ -92,6 +92,7 @@ Reporting-MTA: dns; myhost.ex
 Action: failed
 Final-Recipient: rfc822;userx@badbad.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; unrouteable mail domain "badbad.ex" (:fail:)
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
@@ -204,6 +205,7 @@ Reporting-MTA: dns; myhost.ex
 Action: failed
 Final-Recipient: rfc822;userx@domain2.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; unrouteable mail domain "domain2.ex" (:fail:)
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
index 6c1d4b8c17bfdca4ad7b3a844d786d7a21a7ecb8..fc117ebda4415d7ba275433cc3333cb50f9792ad 100644 (file)
@@ -87,6 +87,7 @@ Reporting-MTA: dns; the.local.host.name
 Action: failed
 Final-Recipient: rfc822;":fail: fail message"@special
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; fail message
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
index 0a0f10801324be81af674fba082740ae5f656189..b97fc622130dfb75c9a9771290c1d27d5891e182 100644 (file)
@@ -38,6 +38,7 @@ Reporting-MTA: dns; the.local.host.name
 Action: failed
 Final-Recipient: rfc822;forwarder@test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; Address unknown (:fail:)
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
@@ -96,6 +97,7 @@ Reporting-MTA: dns; the.local.host.name
 Action: failed
 Final-Recipient: rfc822;forwarder@test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; Address unknown (:fail:)
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: text/rfc822-headers
index ad62b017ab3cced5da13ea8acee33113435be186..c63bcb0b171dbf746c3a60e0fb63f662b46a86da 100644 (file)
@@ -33,6 +33,7 @@ Reporting-MTA: dns; the.local.host.name
 Action: failed
 Final-Recipient: rfc822;userx@non-local.example
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; unrouteable mail domain "non-local.example" (:fail:)
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
index 087962bf18e29b7bbadd0f1db30cfd9b7de33618..3f4667a8b160b4fd5abef29edea15c38854fbc46 100644 (file)
@@ -33,6 +33,7 @@ Reporting-MTA: dns; the.local.host.name
 Action: failed
 Final-Recipient: rfc822;userx@test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; subject was "fail this" (filter fail)
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
index 5f03e6221b6405d25e06d9ed854ab027e586279c..594155c7d93a8d5954e9e73e7996543d9e4acad2 100644 (file)
@@ -33,6 +33,7 @@ Reporting-MTA: dns; myhost.test.ex
 Action: failed
 Final-Recipient: rfc822;failure@myhost.test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; this message is a failure (filter fail)
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
index 422549f6268e54d4031d2b3099ffa5a6a3307eab..05dc46130f285d47369afd62bc576076b326ce0c 100644 (file)
@@ -34,6 +34,9 @@ Reporting-MTA: dns; myhost.test.ex
 Action: failed
 Final-Recipient: rfc822;failure1@myhost.test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; This message is being failed and there's a long and
+ tortuous
+ explanation about is that is being sent back to the user.
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
@@ -86,6 +89,7 @@ Reporting-MTA: dns; myhost.test.ex
 Action: failed
 Final-Recipient: rfc822;failure2@myhost.test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; delivery cancelled
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
index 67e5f59f5bba4efda073b7ee3d40e3c3b6fa3959..d3d91c279a85b9385596a0ffd7652b61f8e811e5 100644 (file)
@@ -33,6 +33,7 @@ Reporting-MTA: dns; myhost.test.ex
 Action: failed
 Final-Recipient: rfc822;list1@lists.test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; list1@lists.test.ex is a closed mailing list
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
@@ -85,6 +86,7 @@ Reporting-MTA: dns; myhost.test.ex
 Action: failed
 Final-Recipient: rfc822;nonlist@lists.test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; nonlist@lists.test.ex is a closed mailing list
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
index 67e5f59f5bba4efda073b7ee3d40e3c3b6fa3959..d3d91c279a85b9385596a0ffd7652b61f8e811e5 100644 (file)
@@ -33,6 +33,7 @@ Reporting-MTA: dns; myhost.test.ex
 Action: failed
 Final-Recipient: rfc822;list1@lists.test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; list1@lists.test.ex is a closed mailing list
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
@@ -85,6 +86,7 @@ Reporting-MTA: dns; myhost.test.ex
 Action: failed
 Final-Recipient: rfc822;nonlist@lists.test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; nonlist@lists.test.ex is a closed mailing list
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
index c4f2a9509d67fc5d913701f9db377b9a70935370..36157c8355abe814caa934a594cc33d7ff537421 100644 (file)
@@ -33,6 +33,7 @@ Reporting-MTA: dns; myhost.test.ex
 Action: failed
 Final-Recipient: rfc822;userx@test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; forced failure
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
@@ -87,6 +88,7 @@ Reporting-MTA: dns; myhost.test.ex
 Action: failed
 Final-Recipient: rfc822;userx@test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; forced failure
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
@@ -144,6 +146,7 @@ Reporting-MTA: dns; myhost.test.ex
 Action: failed
 Final-Recipient: rfc822;userx@test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; forced failure
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
@@ -229,6 +232,7 @@ Reporting-MTA: dns; myhost.test.ex
 Action: failed
 Final-Recipient: rfc822;userx@test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; forced failure
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: text/rfc822-headers
index 53051819260ffed50eccd003c1e6a79c4f04442e..825cd3f01d220659a65f23de90f34a4a2480889b 100644 (file)
@@ -33,6 +33,8 @@ Reporting-MTA: dns; myhost.test.ex
 Action: failed
 Final-Recipient: rfc822;userx@test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; all hosts for 'test.ex' have been failing for a long
+ time (and retry time not reached)
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
@@ -139,6 +141,8 @@ Reporting-MTA: dns; myhost.test.ex
 Action: failed
 Final-Recipient: rfc822;userx@test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; all hosts for 'test.ex' have been failing for a long
+ time (and retry time not reached)
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
index 80b2afb55f534802c8f622254e146f4c649c5d64..32bb774c0e771f6a0dad7877770616cf5c6ca610 100644 (file)
@@ -33,6 +33,7 @@ Reporting-MTA: dns; myhost.test.ex
 Action: failed
 Final-Recipient: rfc822;user22@test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; 590 5.4.3 Main and extended code
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
index 48d3e98c6e70dd4bdf911039833b6db427a5edf2..0c164167f0c4ac636fe96dda1a4444d24d01ccf7 100644 (file)
@@ -38,6 +38,7 @@ Reporting-MTA: dns; the.local.host.name
 Action: failed
 Final-Recipient: rfc822;remote_user@remote.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; account disabled
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
index 9635c7dc6d3175fd544729a92b83384cc53ae466..9e53c20b19ae97310fd68f55c908fd1742c12019 100644 (file)
@@ -38,6 +38,7 @@ Reporting-MTA: dns; the.local.host.name
 Action: failed
 Final-Recipient: rfc822;remote_user@remote.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; account disabled
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
index dd40c616efd10be29be8b63ffc1aef0d073946b6..e0f8cc8b3034e34b6a09b392b550ce1824f9a4ba 100644 (file)
@@ -52,6 +52,7 @@ Reporting-MTA: dns; myhost.test.ex
 Action: failed
 Final-Recipient: rfc822;jack@myhost.test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; LMTP error after end of data: 550 Number 2 fails
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
@@ -108,6 +109,7 @@ Reporting-MTA: dns; myhost.test.ex
 Action: failed
 Final-Recipient: rfc822;jack@myhost.test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; LMTP error after end of data: 550 Number 2 fails
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
index c1c378181674e2c0cdb28bbf0f04bffc30b85f50..cb050b1224634d9ac4d26ffac0ffe9a718bfa4d0 100644 (file)
@@ -33,6 +33,7 @@ Reporting-MTA: dns; myhost.test.ex
 Action: failed
 Final-Recipient: rfc822;"FAIL cannot route this one (FAIL)"@some.host
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; cannot route this one (FAIL)
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822
index 2e2a3f63355b3cd36e45276d772745eee007ada3..9d3ba87518d61a3d417599d09768de7a6f0ab936 100644 (file)
@@ -49,6 +49,7 @@ Reporting-MTA: dns; myhost.test.ex
 Action: failed
 Final-Recipient: rfc822;x@test.ex
 Status: 5.0.0
+X-Exim-Diagnostic: X-str; no deliveries made locally
 
 --NNNNNNNNNN-eximdsn-MMMMMMMMMM
 Content-type: message/rfc822