From: Matthias Kurz Date: Mon, 10 Sep 2018 13:40:38 +0000 (+0100) Subject: Docs: document ancillary info for more event types. Bug 2313 X-Git-Url: https://git.exim.org/users/jgh/exim.git/commitdiff_plain/1afce5bb5d0b9dec4fdf3cd8b6f339fc8d09339d Docs: document ancillary info for more event types. Bug 2313 Patch from Matthias, with additional code indentation tweaks from JGH --- diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 08f27ddaf..a93b39474 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 e3165051f..0a0ed8a34 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 031e690b3..e1ce38eae 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 6c21ac007..56f997459 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:: 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 domain +1999-03-02 09:44:33 10HmbB-0005vi-00 . refused by fdqn <127.0.0.1> local_part domain errstr : 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