Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jun 1999 14:32:44 +0100
From:      Stuart Henderson <stuart@eclipse.net.uk>
To:        "Rashid N. Achilov" <shelton@granch.ru>
Cc:        Khetan Gajjar <khetan@os.org.za>, freebsd-isp@FreeBSD.ORG
Subject:   Re: Some sendmail questions
Message-ID:  <376655FC.5B17AF4E@eclipse.net.uk>
References:  <Pine.BSF.4.02A.9906141950230.17603-100000@pleb.cs.uct.ac.za> <3765BFD5.34880142@granch.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
> > >3. What is a file /var/log/mailacct? With my old version (8.7.3) with
> > >each mail, comes with SMTP or UUCP, into it add one line with
> > >sender/recipient/time/length of message. With new version, I don't see
> > >any setup for this file. May be SITECONFIG? In README says, what
> > >SITECONFIG is obsolete, and I don't setup it. File content vital for
> > >me...
> >
> > You could try /var/log/maillog
> 
> Cannot. We computed users statistic with data from mailacct. Maillog
> usage lead to rewriting big program :-(

You could write a program that reads maillog and writes it
to mailacct for your statistics program. You have to search
for the info though, it is written over at least two lines
(and maybe more when you have messages with >1 recipient).
It would be best to search by both message-ID and queue 
number, because message-ID can be user supplied it may not
be unique, and queue number is generated from process
number and also may not be unique - both together should
be ok though.

It will probably be far easier to modify your copy of sendmail 
to write mailacct. From a quick look through the code, I guess 
you need to modify logdelivery() and also the calls so that 
both sender and recipient are available (at the moment it only
has recipient info). 

Of course if you only need to know how many emails a certain 
user has sent, rather than the recipient or how many of their 
emails have been delivered, it will be much easier to use
a simple awk or perl script to rewrite the line format to
something you can use.

HTH
Stuart


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?376655FC.5B17AF4E>