From owner-freebsd-isp Tue Jun 15 6:34:15 1999 Delivered-To: freebsd-isp@freebsd.org Received: from sinope.eclipse.net.uk (sinope.eclipse.net.uk [195.188.32.121]) by hub.freebsd.org (Postfix) with ESMTP id C86C714C2D for ; Tue, 15 Jun 1999 06:33:59 -0700 (PDT) (envelope-from stuart@eclipse.net.uk) Received: from eclipse.net.uk (elara.eclipse.net.uk [195.188.32.31]) by sinope.eclipse.net.uk (8.9.3/8.9.3) with ESMTP id OAA11972; Tue, 15 Jun 1999 14:32:05 +0100 Message-ID: <376655FC.5B17AF4E@eclipse.net.uk> Date: Tue, 15 Jun 1999 14:32:44 +0100 From: Stuart Henderson Organization: Eclipse Networking Ltd. X-Mailer: Mozilla 4.6 [en] (WinNT; U) X-Accept-Language: en-GB MIME-Version: 1.0 To: "Rashid N. Achilov" Cc: Khetan Gajjar , freebsd-isp@FreeBSD.ORG Subject: Re: Some sendmail questions References: <3765BFD5.34880142@granch.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > >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