[exim] Re: event_action and "retry timeout exceeded"

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Jasen Betts
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [exim] Re: event_action and "retry timeout exceeded"
On 2024-06-15, Viktor Ustiuhov via Exim-users <exim-users@???> wrote:
> Hello.
>
> Please tell me how can I log "retry timeout exceeded" using event_action?
>
> I don't see any difference in the event for successful delivery of
> messages and for "retry timeout exceeded". In both cases, the value of
> $event_name is msg:complete and the value of $event_data is undefined.


msg complete is the wrong place to check for that, because messages
can have multiple recipients.  unfortunatley stock exim doesn't
provide an event for this.


I modify retry.c to get that capability.


$  diff -C10   original/retry.c  patched/retry.c 
*** original/retry.c    2023-11-05 01:55:49.000000000 +1300
--- patched/retry.c    2024-06-16 09:51:15.934608692 +1200
***************
*** 894,913 ****
--- 894,917 ----
          : US"retry timeout exceeded";
            addr->user_message = addr->user_message
          ? string_sprintf("%s: retry timeout exceeded", addr->user_message)
          : US"retry timeout exceeded";
            log_write(0, LOG_MAIN, "** %s%s%s%s: retry timeout exceeded",
              addr->address,
              addr->parent ? US" <" : US"",
              addr->parent ? addr->parent->address : US"",
              addr->parent ? US">" : US"");
  
+ #ifndef DISABLE_EVENT     
+           msg_event_raise(US"msg:rcpt:retry:timeout",addr);
+ #endif
+ 
            if (addr == endaddr) break;
            }
  
          continue;                       /* Restart from changed *paddr */
          }
  
        /* This address is to remain on the defer chain. If it has a "first"
        pointer, save the pointer to it in case we want to fail the set of
        addresses when we get to the first one. */



If you choose to open a bug request for this feature you can attach
the above as a patch. 

-- 
 Jasen.
 🇺🇦 Слава Україні


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/