[exim-cvs] Docs: document ancillary info for more event type…

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] Docs: document ancillary info for more event types. Bug 2313
Gitweb: https://git.exim.org/exim.git/commitdiff/1afce5bb5d0b9dec4fdf3cd8b6f339fc8d09339d
Commit:     1afce5bb5d0b9dec4fdf3cd8b6f339fc8d09339d
Parent:     6c6b39bad5176fdfa5df1f194103a49fb19481c6
Author:     Matthias Kurz <m.kurz@???>
AuthorDate: Mon Sep 10 14:40:38 2018 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Mon Sep 10 14:44:29 2018 +0100


    Docs: document ancillary info for more event types.  Bug 2313


    Patch from Matthias, with additional code indentation tweaks from JGH
---
 doc/doc-docbook/spec.xfpt |  2 ++
 src/src/deliver.c         | 44 ++++++++++++++++++++++----------------------
 test/confs/5700           |  1 +
 test/log/5700             |  2 +-
 4 files changed, 26 insertions(+), 23 deletions(-)


diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index 08f27dd..a93b394 100644
--- a/doc/doc-docbook/spec.xfpt
+++ b/doc/doc-docbook/spec.xfpt
@@ -40089,6 +40089,8 @@ with the event type:
 .display
 &`dane:fail            `& failure reason
 &`msg:delivery         `& smtp confirmation message
+&`msg:fail:internal    `& failure reason
+&`msg:fail:delivery    `& smtp error message
 &`msg:rcpt:host:defer  `& error string
 &`msg:rcpt:defer       `& error string
 &`msg:host:defer       `& error string
diff --git a/src/src/deliver.c b/src/src/deliver.c
index e316505..0a0ed8a 100644
--- a/src/src/deliver.c
+++ b/src/src/deliver.c
@@ -6171,19 +6171,19 @@ if (process_recipients != RECIP_IGNORE)
         /* RECIP_DEFER is set when a system filter freezes a message. */


         case RECIP_DEFER:
-        new->next = addr_defer;
-        addr_defer = new;
-        break;
+      new->next = addr_defer;
+      addr_defer = new;
+      break;



         /* RECIP_FAIL_FILTER is set when a system filter has obeyed a "fail"
         command. */


         case RECIP_FAIL_FILTER:
-        new->message =
-          filter_message ? filter_message : US"delivery cancelled";
-        setflag(new, af_pass_message);
-        goto RECIP_QUEUE_FAILED;   /* below */
+      new->message =
+        filter_message ? filter_message : US"delivery cancelled";
+      setflag(new, af_pass_message);
+      goto RECIP_QUEUE_FAILED;   /* below */



         /* RECIP_FAIL_TIMEOUT is set when a message is frozen, but is older
@@ -6193,15 +6193,15 @@ if (process_recipients != RECIP_IGNORE)
         been logged. */


         case RECIP_FAIL_TIMEOUT:
-        new->message  = US"delivery cancelled; message timed out";
-        goto RECIP_QUEUE_FAILED;   /* below */
+      new->message  = US"delivery cancelled; message timed out";
+      goto RECIP_QUEUE_FAILED;   /* below */



         /* RECIP_FAIL is set when -Mg has been used. */


         case RECIP_FAIL:
-        new->message  = US"delivery cancelled by administrator";
-        /* Fall through */
+      new->message  = US"delivery cancelled by administrator";
+      /* Fall through */


         /* Common code for the failure cases above. If this is not a bounce
         message, put the address on the failed list so that it is used to
@@ -6209,11 +6209,11 @@ if (process_recipients != RECIP_IGNORE)
         The incident has already been logged. */


         RECIP_QUEUE_FAILED:
-        if (sender_address[0] != 0)
-          {
-          new->next = addr_failed;
-          addr_failed = new;
-          }
+      if (sender_address[0])
+        {
+        new->next = addr_failed;
+        addr_failed = new;
+        }
         break;



@@ -6222,17 +6222,17 @@ if (process_recipients != RECIP_IGNORE)
         is a bounce message, it will get frozen. */


         case RECIP_FAIL_LOOP:
-        new->message = US"Too many \"Received\" headers - suspected mail loop";
-        post_process_one(new, FAIL, LOG_MAIN, EXIM_DTYPE_ROUTER, 0);
-        break;
+      new->message = US"Too many \"Received\" headers - suspected mail loop";
+      post_process_one(new, FAIL, LOG_MAIN, EXIM_DTYPE_ROUTER, 0);
+      break;



         /* Value should be RECIP_ACCEPT; take this as the safe default. */


         default:
-        if (!addr_new) addr_new = new; else addr_last->next = new;
-        addr_last = new;
-        break;
+      if (!addr_new) addr_new = new; else addr_last->next = new;
+      addr_last = new;
+      break;
         }


 #ifndef DISABLE_EVENT
diff --git a/test/confs/5700 b/test/confs/5700
index 031e690..e1ce38e 100644
--- a/test/confs/5700
+++ b/test/confs/5700
@@ -35,6 +35,7 @@ ev_msg_fail:
         refused by fdqn <$host> \
         local_part <$local_part> \
         domain <$domain> \
+        errstr <$event_data> \


     accept logwrite = . \
         local_part <$local_part> \
diff --git a/test/log/5700 b/test/log/5700
index 6c21ac0..56f9974 100644
--- a/test/log/5700
+++ b/test/log/5700
@@ -78,7 +78,7 @@
 1999-03-02 09:44:33 10HmbB-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:1224
 1999-03-02 09:44:33 10HmbB-0005vi-00 ** userx@domain1 R=others T=smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<userx@domain1>: 550 GO AWAY
 1999-03-02 09:44:33 10HmbB-0005vi-00 event msg:fail:delivery
-1999-03-02 09:44:33 10HmbB-0005vi-00 . refused by fdqn <127.0.0.1> local_part <userx> domain <domain1>
+1999-03-02 09:44:33 10HmbB-0005vi-00 . refused by fdqn <127.0.0.1> local_part <userx> domain <domain1> errstr <SMTP error from remote mail server after RCPT TO:<userx@domain1>: 550 GO AWAY>
 1999-03-02 09:44:33 10HmbB-0005vi-00 userx@domain1: error ignored
 1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
 1999-03-02 09:44:33 10HmbB-0005vi-00 event msg:complete