I am lost on this one :(

We do email accounting. Because of that I need some additional
information about the eMails passing through our servers. In the moment
I do this via QUEUE_EXTRA to an account "log" which has a small awk
script that outputs the Message-Id: and the second (from top) Received: line
These info shows up in the logfiles and I have a script that does the
accounting. So far so good :-)

What I dislike (and what consumes quite some CPU power) is this extra
delivery. So I've taken some time to look for a place to code it into
qmail (I can loose the Message-Id info) 

A neat place would be in qmail-send extending the 
    info msg 376799: bytes 3183 from <> qp 3619 uid 106
with an IP information (remote IP if received via SMTP, 127.0.0.1 if
received locally/bounce/alias/...). But qmail-send doesn't know about
the IP any longer.

qmail-queue does know about it and it also knows about the msgnum the
message will get and adding output to stderr (fds 0,1 are already used) e.g.
    acctinfo msg 52537: a.b.c.d
    acctinfo msg 52537: 127.0.0.1
works fine at first glance, but does only work with messages injected
via qmail-smtpd but not with locally injected messages (e.g. via 
/var/qmail/bin/qmail-inject) as it will not show up in the logfiles
but on stderr :-<

Any ideas?
If the solution would include the Message-Id it would be kinda perfect ;-)

Thanx,

        \Maex

-- 
SpaceNet GmbH             |   http://www.Space.Net/   | Stress is when you wake
Research & Development    | mailto:[EMAIL PROTECTED] | up screaming and you
Joseph-Dollinger-Bogen 14 |  Tel: +49 (89) 32356-0    | realize you haven't
D-80807 Muenchen          |  Fax: +49 (89) 32356-299  | fallen asleep yet.

Reply via email to