Re: [exim] Noting SMTP completion in a database / Query on S…

Top Page
Delete this message
Reply to this message
Author: W B Hacker
Date:  
To: exim users
Subject: Re: [exim] Noting SMTP completion in a database / Query on SMTP success
Oli wrote:
> Hi Guys,
>
> I've been working on a Exim+Mailman based system for sending out
> subscription newsletters to our database of clients.
>
> It's been working well for a while, with Mailman integrated directly
> into our database to track different views as the mailing lists and
> marking people as bad when there are too many bounces etc.
>
> I was hoping to put the icing on the cake this morning - having Exim let
> me know of each successful delivery so I can add a note to each account
> to say which documents a customer has been sent. I can't seem to find a
> way of doing it though, so was hoping someone could point me in the
> correct direction.
>
> In the Exim spec there doesn't seem to be anything in the SMTP Transport
> which is called on success, nor is there a callback to the Router in
> question (DNSLOOKUP). I didn't really expect there to be a suitable
> hook here, as all the other SQL hooks are really lookups in disguise,
> and there's nothing left to look up at this point :-)
>
> Had a quick look at logging too, but this option might be a little
> heavy, if I can make it work at all.
>
> Thanks very much in advance if anyone's got any advice at all! :-)
>
> Thanks,
> -Oli
>
>
>


Haven't worked with Mailman in years, but AFAIK, the differences between Mailman
and Ecartis *in this area* are, or can be made to be, insignificant.

- First - successful delivery should be far, far, more common than failure, so
the default of getting some form of DSN on fail is all we've needed UNLESS
someone comlained of a non-receipt and we had to check logs to demonstrate
otherwise (even less common).

+ Exim: Logs the '250 ok' et al 'at least' with log_selector = +all (or a bit
less verbosity - check what you need to turn on and off..)

+ Ecartis: Logs that also, but is easier to parse for a given MLM run, as it
doesn't do 'other' smtp sessions.

? Mailman, AFAIK, can do either invocation of an smtp binary OR the standard
smtp-connection Ecartis does.

So parsing logfiles can work, and they may not need to be *Exim's* log files,
but rather those of the MLM - perhaps even the 'connector' between them - see below.

Absent cutting into any of the source code, there may be a way to use 'Tee' (not
'tee'), piping what is destined for *any one of* the Exim/Mailman/Ecartis log
files through a grep expression, with the wanted subset siphoned off for use in
generating a report.

At the end of the day, it is probably less risk to simply set a start and end
range and run an external parser against existing logs.

JFWIW, the 'outbound' side of an MLM need not run through the same smtpd as the
incoming posts and admin do. That opens the possibility of having whatever IS
used for delivery doing highly customized logging from the outset.


HTH,

Bill