Current time: 11-25-2024, 07:49 PM Hello There, Guest! (LoginRegister)


Post Reply 
Mail traffic accounting
Author Message
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #15
RE: Mail traffic accounting
Well... I got all this test cases right! Big Grin

Theory of operation (for each maillogconvert output line):

if Amavis DISABLED
- Count every line
- Add mail_size * n_forwarders to mail_size of FORWARDED ONLY accounts.

if Amavis ENABLED
- Ignore non-local-address to non-local-address
- Drop the virtual transport lines
- Add mail_size / n_forwarders to mail_size of FORWARDED ONLY accounts.

The "Add mail_size.." step must be there because accounts that are forwarded only miss the local delivery line (input traffic count). mail_size / n_forwarders is the extra size that must be added to each outgoing delivery of this "forwarded only" accounts.

Test case 4: redir@dmn.tld -> me@external.dmn (forwarded only)
Code:
2008-06-19 08:21:26 me@external.dmn redir@dmn.tld test.server.tld mx.external.dmn SMTP - 1 778305
We have just one (outgoing delivery) line, so the extra size to this delivery line is:
Code:
extra_size = mail_size / n_forwarders = 778305 / 1 = 778305
Total count: 778305 + 778305 = 1556610

Test case 10: multiple@dmn.tld -> me@external.dmn, other@external.dmn (forwarded only)
Code:
2008-06-19 08:19:02 me@external.dmn multiple@dmn.tld test.server.tld 127.0.0.1 SMTP - 1 778323
2008-06-19 08:19:02 me@external.dmn multiple@dmn.tld test.server.tld 127.0.0.1 SMTP - 1 778323
We have two (outgoing delivery) lines, so the extra size to this delivery line is:
Code:
extra_size = mail_size / n_forwarders = 778305 / 2 = 389152.5
Total count: 2 lines * (778305 + 389152.5) bytes/line = 2334915

Warning: Do not use it on production yet please, we are missing test cases where a local user sends mails (both to other local users and external addresses).


Attached File(s)
.txt  vrl-traff-patch2.txt (Size: 4.8 KB / Downloads: 3)
(This post was last modified: 06-20-2008 03:53 AM by kilburn.)
06-20-2008 03:51 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
Mail traffic accounting - ispcomm - 06-13-2008, 11:09 PM
RE: Mail traffic accounting - ispcomm - 06-14-2008, 05:10 AM
RE: Mail traffic accounting - kilburn - 06-18-2008, 10:40 AM
RE: Mail traffic accounting - ispcomm - 06-18-2008, 05:33 PM
RE: Mail traffic accounting - kilburn - 06-18-2008, 09:22 PM
RE: Mail traffic accounting - ispcomm - 06-18-2008, 11:16 PM
RE: Mail traffic accounting - kilburn - 06-19-2008, 12:57 AM
RE: Mail traffic accounting - ispcomm - 06-19-2008, 03:30 AM
RE: Mail traffic accounting - ispcomm - 06-19-2008, 04:46 AM
RE: Mail traffic accounting - kilburn - 06-19-2008, 06:25 AM
RE: Mail traffic accounting - kilburn - 06-19-2008, 08:30 AM
RE: Mail traffic accounting - ispcomm - 06-19-2008, 05:18 PM
RE: Mail traffic accounting - Zothos - 06-19-2008, 08:20 PM
RE: Mail traffic accounting - kilburn - 06-20-2008, 02:04 AM
RE: Mail traffic accounting - kilburn - 06-20-2008 03:51 AM
RE: Mail traffic accounting - ispcomm - 06-20-2008, 07:31 AM
RE: Mail traffic accounting - kilburn - 06-20-2008, 09:34 AM
RE: Mail traffic accounting - ispcomm - 06-20-2008, 05:34 PM
RE: Mail traffic accounting - kilburn - 06-20-2008, 09:58 PM
RE: Mail traffic accounting - ispcomm - 06-20-2008, 11:54 PM

Forum Jump:


User(s) browsing this thread: 6 Guest(s)