[exim-dev] [Bug 1031] Implement database logging of complete…

Góra strony
Delete this message
Reply to this message
Autor: Gedalya
Data:  
Dla: exim-dev
Stare tematy: [exim-dev] [Bug 1031] New: Implement database logging of completed remote delivery
Temat: [exim-dev] [Bug 1031] Implement database logging of completed remote delivery
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1031




--- Comment #6 from Gedalya <gedalya@???> 2011-07-14 00:58:30 ---
On 7/13/2011 6:10 PM, Axel Rau wrote:
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>
> http://bugs.exim.org/show_bug.cgi?id=1031
>
>
>
>
> --- Comment #5 from Axel Rau<axel.rau@???> 2011-07-13 23:10:28 ---
> Am 12.07.2011 um 21:19 schrieb gedalya@???:
>
>> Would it be possible to add a query
>> to be executed for failed deliveries? Something like dbl_deliveryfailed_query?
> Sure. Based on what's available in deliver.c, it may be possible to set the
> following variables:
>          dbl_delivery_ip             IP of host, which has accepted delivery
>          dbl_delivery_fqdn           FQDN of host, which has accepted delivery
>          dbl_delivery_local_part     local part of address being delivered
>          dbl_delivery_domain         domain part of address being delivered
>          dbl_delivery_failure_reason a reason code

>
> My knowledge of the retry mechanism is very limited.
> Do we need to put the hook into retry.c to get all delivery attempts?

This is my first time looking into exim's source code and I can't say I
am an experienced C programmer either, but it looks like you patched the
post_process_one function in deliver.c, under / if (result == OK) /,
later on there is / else if (result == DEFER || result == PANIC) / and
the final / else / described as hard failure, so I think this should be
a very simple extension of your patch, maybe just copy and paste the
following into two more places within the same function?

+  #ifdef EXPERIMENTAL_DBL
+  DEBUG(D_deliver)
+    {
+    debug_printf("  DBL(Delivery): dbl_delivery_query=|%s|
dbl_delivery_IP=%s\n", dbl_delivery_query, dbl_delivery_ip);
+       }
+  if (dbl_delivery_ip != NULL&&  dbl_delivery_query != NULL)
+       expand_string(dbl_delivery_query);
+  #endif



One could either add dbl_defer_query and dbl_deliveryfailed_query or
rather add a dbl_delivery_status variable to be used in a uniform query.
Can't make up my mind as of yet what I would personally prefer. The
former will probably be suitable in more various circumstances.

I may go ahead and play around myself, if I get anything to work will
perhaps post it to exim-dev so wiser people can take a look.


>



--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email