bandwith for domain mailboxes

xemaps

Verified User
Joined
Apr 13, 2006
Messages
386
Location
Europe
I wish you fix the bug for counting bandwith on mailboxes into statistics
It seems only count the admin mail bw.

This is VERY IMPORTANT because we must pay bandwith !
We cannot see end user/domain total bw
 
Need right traffic used by domain mail
Please DA TEAM, this is important because we pay traffic for datacenter, and want the user pay the right sum for his domain

Please again, correct DA stats !
 
I'd prefer to be able of turning that on or off (per account?); if you offer mail-only accounts its usually preferable not to count the bandwith used by e-mail (charging for bandwith on an email only account is somewhat lame in my opinion).
 
sample : i have one account which use more mail traffic than all other domain together for web and mail !
These are dozen of GB per month, and i cant show because i have wrong statistic for mail.
This account has to pay 90% off all bandwith but mail stats are wrong, so total is wrong too. So i'm loosing money.
 
Hello,

If you get the newer /etc/exim.pl file:
files.directadmin.com/services/exim.pl
it will log the sender with each bytes entry.
Even though DA doesn't seperate this data on a per-email-user basis, it can be looked over if you want to count everything up manually.

John
 
Please make something to count mail not only auth smtp...
but pop and smtp in/out per domain.
 
Hello,

I've just updated the exim.conf and exim.pl files here:

files.directadmin.com/services/exim.conf
files.directadmin.com/services/exim.pl

The change will replace:
Code:
condition = ${if eq {}{${if exists{/etc/virtual/${domain}/passwd}{${lookup{$local_part}lsearch{/etc/virtual/${domain}/passwd}}}}}{no}{yes}}
with
Code:
condition = ${perl{save_virtual_user}}
and added a few extra functions in the exim.pl file (eg, save_virtual_user and log_email).
--> *You must use this new exim.pl to get these new functions*

The "save_virtual_user" can be copied and modified (under a new name) to also do the checking for things like catch-all and aliases, I just don't have the time at the moment, but this should help with all incoming mail to regular pop accounts.

John
 
I installed the correction and the exim.pl

I don't see any change

CMD_BANDWIDTH_BREAKDOWN stay at 0
so no bandwith after a lot of mail

it's incredible : costumer has nothing to pay for big mail bandwith !
 
Last edited:
DirectAdmin Support said:
Hello,

If you get the newer /etc/exim.pl file:
files.directadmin.com/services/exim.pl
it will log the sender with each bytes entry.
Even though DA doesn't seperate this data on a per-email-user basis, it can be looked over if you want to count everything up manually.

John

John,
what is that this /tmp/test.txt you add in exim.pl ?
this is plenty of 'logging [email protected]' no bw byte
We need bandwith real count for mail
thank you to fix that in next update
 
DirectAdmin Support said:
The "save_virtual_user" can be copied and modified (under a new name) to also do the checking for things like catch-all and aliases
John, wouldn't that cause double-bandwidth-measuring in the case of a local catchall account? And also in the case of a local alias?

Jeff
 
xemaps said:
I don't see any change

CMD_BANDWIDTH_BREAKDOWN stay at 0
so no bandwith after a lot of mail
xemaps,

Please let us know after you've waited through at least a full 24-hour period.

Thanks.

And everyone, note that I've not yet updated the exim.conf files at my site, but the file at my site will work with the new exim.pl file.

Jeff
 
IMPORTANT NOTE TO EVERYONE

Very important note to everyone reading this thread:

If you've downloaded:

files.directadmin.com/services/exim.conf

since Saturday, November 25, 2006:

You should also download and install:

files.directadmin.com/services/exim.pl

as the one won't work without the other.

Jeff
 
John, wouldn't that cause double-bandwidth-measuring in the case of a local catchall account? And also in the case of a local alias?
Yes, partly why I have not yet implemented it. I believe you might be able to create a function for the virtual_aliases_nostar, and just skip using it with the virtual_aliases function.. Either way, it will have to be very creatively written, which is why we currently only have the virtual user for incoming, and nothing else.

One option is to do the perl logging in the transport instead of the director. The only problem is that the user privileges have already been dropped... the data *can* be saved, but it would be in a log filed owned by the user, thus the user would be able to edit his username.bytes file however he wishes ;) . I don't personally like that one. Aliases don't work that way, because they're just "passing through", but again, it would have to know if it's a catch-all, or local domain, or local user, or external domain to be charged.. gets quite tricky to do.

I may play with another idea later.. create 1 unseen transport who's sole purpose is bandwidth logging. It only need to check the domain name. If the email comes in with that domain, bill it. Seems like a cleaner solution.

The test.txt file is for debugging. Thanks for pointing that out, I've removed the log_str entry in exim.pl now so it doesn't log into the test.txt. The test.txt is safe to delete, it's not used for anything.

John
 
Thanks for the clarification, John.

For the moment I'm going to leave my downloadable exim.conf file alone, but I'll keep my eye on this thread as i finish up the next SpamBlocker exim.conf.

Jeff
 
So after 2 days it grows from 0 to =>

2006 11 27 22.6 MB 174.9 MB 0.00 KB 11.2 MB 0.00 KB 208.7 MB
2006 11 28 26.3 MB 127.2 MB 3.86 KB 11.1 MB 0.00 KB 164.6 MB

For a month it was also 4.5 GB bandwith not counted, hum...

Next step is to have it per domain, and verify what is really counted.
In webalizer it stay at 0 squirrelmail traffic is not counted. Is it counted in CMD_BANDWIDTH_BREAKDOWN apache oar/and mail ?

thank you
 
if webalizer is not showing anything, then your apache logs are not working correctly, that's a seperate issue.

The squirrelmail interface usage will be billed to the domain you're viewing it from.. eg, if you login at mydomain.com/squirrelmail, then mydomain.com gets the bandwidth for squirrelmail. Webmail bandwidth is generally negligible in relation to the website itself.

You can see the raw data DA is using in:
/usr/local/directadmin/data/users/username/bandwidth.tally

Or the disected version of that in the bandwidth breakdown page.

John
 
DirectAdmin Support said:
if webalizer is not showing anything, then your apache logs are not working correctly, that's a seperate issue.

The squirrelmail interface usage will be billed to the domain you're viewing it from.. eg, if you login at mydomain.com/squirrelmail, then mydomain.com gets the bandwidth for squirrelmail. Webmail bandwidth is generally negligible in relation to the website itself.

This is resolved if squirellmail is counted as you said, in email bw
since i have domains with mail only (not negligible in my case). I just asked if.

So i can bill the bw only when counted per domain, not per user...
i don't want create a user for each domain and will be ok you add bw/domain
 
The squirrelmail interface bills bandwidth to apache, not email. But is billed.

There should be a bandwidth breakdown for each domain with webalizer and on the stats page, so you can have multiple domains under 1 user and keep track of each domain sperately. (apache usage)

Email usage is not sperate per domain, it's per DA user, so it would be trickier.

John
 
I have to bill per domain because user has several domains and ask bill per domain.

It's logical to have a bandwith per doamin including all...
other panel make that.

thank you in advance to resolve by future da capabilities.
 
Back
Top