On Fri, Mar 09, 2001 at 12:41:16PM +0100, Qmaillist wrote:
> I tried many tools in order to get to know how much traffic my different
> virtual domains on my machine (not every domain has its own IP) comsume.

Sorry, no script but a way to code ... we use something similar but it
wouldn't help as it is highly dependant on some logging modifications
we'd made.

When you get a new email qmail logs:

mail qmail: 984092366.436762 new msg 603366
mail qmail: 984092366.437102 info msg 603366: bytes 51771 from <[EMAIL PROTECTED]> 
qp 39056 uid 101

Important is the message number: 603366
This shows up again when qmail delivers the email:

mail qmail: 984092366.476909 starting delivery 573283: msg 603366 to local 
[EMAIL PROTECTED]
mail qmail: 984092366.579607 delivery 573283: success: did_1+0+0/

>From this two lines you can see that msg 603366 triggered a delivery
with id 573283 that was successful.

After that qmail is done with the message and logs

mail qmail: 984092366.608063 end msg 603366

With this infos it shouldn't be too hard to code a script that processes
this information and outputs lines like

Bytes   Sender                  Recipient
51771 <[EMAIL PROTECTED]> [EMAIL PROTECTED]

and a postprocessor that e.g. sums up the bytes for each recipient.domain
or [EMAIL PROTECTED]

With all that you should have in mind that the size info is only the
payload (i.e. the number of bytes as seen by qmail) and does not account
for the real TCP/IP and SMTP protocol overhead.

Form our experience during the years you have to multiply by a factor of
1.8 to get close to the average ip traffic each message consumes.

        \Maex

-- 
SpaceNet AG            | Joseph-Dollinger-Bogen 14 | Fon: +49 (89) 32356-0
Research & Development |       D-80807 Muenchen    | Fax: +49 (89) 32356-299
Stress is when you wake up screaming and you realize you haven't fallen
asleep yet.

Reply via email to