Re: [exim] announce delivery

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Philip Hazel
Dátum:  
Címzett: Tom Kistner
CC: exim-users, David Saez Padros
Tárgy: Re: [exim] announce delivery
On Wed, 11 Oct 2006, Tom Kistner wrote:

> For my current employer, I have implemented 3 private options to the
> SMTP transport:
>
> on_success = <stuff>
> on_err_perm = <stuff>
> on_err_temp = <stuff>
>
> Where <stuff> gets expanded on delivery success, deferral and failure,
> respectively. The results are discarded, but you can call just about
> anything in the expansions (like ${run or ${perl).
>
> This is rather ugly and I don't want to commit it in this fashion, but
> I'll put this item up for discussion :)


Something of this kind has been on the Wish List for a while, I think.

However, I see a problem with what you've specified, Tom (or maybe you
just haven't given enough detail). With a remote transport that is
delivering more than one address, you may have a mixture of success and
errors (both temporary and permanent). How do you deal with that? Do you
expand those options once for each delivery attempt? The notify_comsat
feature of appendfile works only when there is a single address being
delivered (which of course is the most common case for appendfile, but
it is different for remote deliveries, where it is more likely that
several addresses will be delivered at once).

If the expansions happen in the transport, then of course they are run
as the exim user, not as root (which may or may not be relevant - the
notify_comsat feature runs as the user in the appendfile transport).

The notify_comsat feature is cheap because it just sends a single UDP
datagram. There's no way of doing this in an expansion (readsocket sets
up a TCP connection), but I guess something could be implemented if that
seemed like a good idea.

-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book