Submitted by RedKnot on Wed, 07/01/2009 - 03:46
Hi,
We're using the bandwidth monitoring module to measure the bandwidth usage for our clients. Currently only FTP and HTTP bandwidth is included. I configured the module to use the /var/log/maillog to collect the mail bandwidth. /var/log/maillog is the postfix log file. But no mail bandwidth is shown.
Also shouldn't it be possible to scan the dovecot log file?
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Wed, 07/01/2009 - 11:56 Comment #1
Incoming mail logged to /var/log/maillog should be counted by Virtualmin, and is on my test systems.
Could you attach to this bug report a few lines from /var/log/maillog for email received by a user in one of the domains on your system? That way I can see if the format is what Virtualmin expects..
Submitted by RedKnot on Wed, 07/01/2009 - 12:04 Comment #2
Submitted by JamieCameron on Wed, 07/01/2009 - 12:55 Comment #3
That's odd, I don't see any lines in your maillog for local delivery, like :
JulĀ 1 10:50:00 webmail postfix/local[3321]: 42B89A0A3B: to=<jcameron.webmail@webmail.webmin.com>, orig_to=<jcameron@webmail.webmin.com>, relay=local, delay=8.8, delays=0.04/0.01/0/8.7, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
Do you get those? Also, I see references to amavis ... have you configured Postfix to use this, or is it a standard Postfix install such as setup by the Virtualmin installer?
Submitted by RedKnot on Wed, 07/01/2009 - 13:08 Comment #4
Sorry,
The server is acting as a relay for ospl.de so no local delivery for that user. I attached a new maillog.txt with a local delivery in it.
I tweaked postfix so it is not a standard install.
Submitted by JamieCameron on Wed, 07/01/2009 - 14:49 Comment #5
Ok, that log seems fine to me. I can see a message to the youngguns.nl domain that should have been included in bandwidth logs. If you go to the bandwidth graph for that domain, does any mail data show up at all? It should be in green .. but may be tiny compared to web and FTP traffic, so hard to see.
Submitted by RedKnot on Wed, 07/01/2009 - 15:14 Comment #6
No bandwith for mail, also the legenda doesn't show the green square. It does show pink and blue for ftp en http.
Submitted by JamieCameron on Wed, 07/01/2009 - 16:37 Comment #7
That's odd .. I think to debug this further, I'd have to login to your system to take a look.
If that is possible, granting remote access is documented at : http://www.virtualmin.com/documentation/id,support_requests_and_remote_l...
Submitted by RedKnot on Fri, 07/03/2009 - 08:49 Comment #8
Hi Jamie,
I enabled remote login for you.
Submitted by JamieCameron on Fri, 07/03/2009 - 10:05 Comment #9
Thanks! What is your hostname or IP address though?
Submitted by RedKnot on Wed, 07/08/2009 - 02:35 Comment #10
Hi,
hostname is stevie.youngguns.nl
I missed your question so I re-enabled remote login. Could you also please check the mail relay option.
E.g. for the virtual server "ospl.nl" Server Configuration->Configure Mail Relaying
thanks,
Martijn
Submitted by JamieCameron on Wed, 07/08/2009 - 13:02 Comment #11
Thanks, I will login and take a look..
Submitted by JamieCameron on Wed, 07/08/2009 - 13:18 Comment #12
Ok, I see it now .. Virtualmin parses the log file /var/log/maillog, but on Solaris this has a slightly different format to Linux and BSD, so my parsing broke. I have fixed Virtualmin on your system to handle this, and will include the fix in the next release. Bandwidth stats for mail from now on should be collected properly..
Submitted by RedKnot on Thu, 07/09/2009 - 12:57 Comment #13
Hi Jamie,
The bandwith for mail is shown, great! Shouldn't the dovecot logfiles also be included?
Submitted by JamieCameron on Thu, 07/09/2009 - 13:05 Comment #14
As far as I know, the dovecot logs don't include the size of mail downloaded..
Submitted by RedKnot on Thu, 07/09/2009 - 13:19 Comment #15
Hi Jamie,
That was what I thought, but since 1.2 this is possible:
http://www.dovecot.org/list/dovecot/2009-July/040819.html
for pop3 this already exists:
dovecot: Jul 09 08:01:41 Info: POP3(abc@abc.com): Disconnected: Logged out top=0/0, retr=8/103071, del=8/8, size=102929
Submitted by JamieCameron on Thu, 07/09/2009 - 13:38 Comment #16
Thanks - I will add code to parse this format. Unfortunately it seems that Dovecot 1.2 isn't widely available yet though..
Submitted by JamieCameron on Thu, 07/09/2009 - 13:44 Comment #17
Wait .. is that size= in the POP3 disconnect line the bytes transferred, or the mailbox size?
Submitted by Issues on Thu, 07/23/2009 - 14:18 Comment #18
Automatically closed -- issue fixed for 2 weeks with no activity.