View Full Version : Daily Quota report empty
dbau
4th February 2007, 21:00
Hello,
I used Falko's "Virtual Users And Domains With Postfix, Courier And MySQL (+
SMTP-AUTH, Quota, SpamAssassin, ClamAV) howto on Debian, everything works nicely - great howto by the way - only the daily quota report looks a bit anemic every time:
====begin====
DAILY QUOTA REPORT:
----------------------------------------------
| % USAGE | ACCOUNT NAME |
----------------------------------------------
--
My Company
====end====
There are multiple virtual domains and users in the mysql database,
and the virtual_mailbox_base variable in main.cf is set to /home/vmail.
Thanks for any hints/pointers,
Daniel
falko
5th February 2007, 14:40
Did you save the quota_notify script with Unix linebreaks?
Also make sure you produced no syntax error when you modified the script.
dbau
6th February 2007, 04:14
Thanks for your fast response, Falko!
I used 'wget' to download the file, and after I edited the variables at the top I issued the command 'chmod 755 quota_notify'. (I did the entire procedure a couple of times during troubleshooting.) I also couldn't find any syntax errors. Could it be that the quota patch for Postfix wasn't applied correctly by me? Is there a way to find out, and would it be possible to (re-)apply the patch?
Daniel
falko
7th February 2007, 19:13
I think the script works independently from the Postfix quota patch.
Do you get any errors when you run
/usr/local/sbin/quota_notify
on the shell?
dbau
9th February 2007, 04:30
No errors...
debian:~#
debian:~# /usr/local/sbin/quota_notify
debian:~#
All I get is the (almost) empty Daily Quota Report email.
Daniel
falko
10th February 2007, 21:08
To be honest I don't know what's wrong... :confused:
rafota
14th March 2007, 20:27
This is because the mailbox is nearly empty (integer percent is zero).
Edit "/usr/local/sbin/quota_notify" and change:
close(QF);
next if (! $used);
my $percent = int($used / $quota * 100);
$lusers{$user} = $percent unless not $percent;
by:
close(QF);
next if (! $used);
my $percent = int($used / $quota * 100);
$lusers{$user} = $percent;
and the report becomes:
DAILY QUOTA REPORT:
----------------------------------------------
| % USAGE | ACCOUNT NAME |
----------------------------------------------
| 0 | user@domain.com |
----------------------------------------------
justiceiro_df
27th September 2007, 06:05
This is because the mailbox is nearly empty (integer percent is zero).
Edit "/usr/local/sbin/quota_notify" and change:
close(QF);
next if (! $used);
my $percent = int($used / $quota * 100);
$lusers{$user} = $percent unless not $percent;
by:
close(QF);
next if (! $used);
my $percent = int($used / $quota * 100);
$lusers{$user} = $percent;
and the report becomes:
DAILY QUOTA REPORT:
----------------------------------------------
| % USAGE | ACCOUNT NAME |
----------------------------------------------
| 0 | user@domain.com |
----------------------------------------------
I' ve made this sujest chanche but still not work. As told, I execute in shell lines, I have no errors. And got a empty mail. My virtual home isnīt in /home/vmail. I made a separate partition to it. It's could be the problem ???
gonzalezmfrank
6th February 2009, 14:36
it doesnt work to me too...
my virtual_mailbox_base variable in main.cf is set to /home/vmail too and there are some domain and users there..
dedez
7th March 2009, 12:04
I've the same problem, my daily report dosn't show ANY user!!
Any idea on what's wrong?
falko
8th March 2009, 16:36
Do you get any errors when you run
/usr/local/sbin/quota_notify
manually?
dedez
9th March 2009, 03:22
..i've got NO errors running the script..it simply generate the report, without any users listed..
i've take a look inside the script and it seams it look for
/home/vmail/domain.com/user/maildirsize
but in my users dir i've no "maildirsize" file..
dedez
9th March 2009, 03:39
gotcha!
in your tutorial you made a little mistake..
you write
postconf -e 'virtual_mailbox_extended = yes'
but this is wrong..it should be
postconf -e 'virtual_maildir_extended = yes'
hope this help
falko
9th March 2009, 19:27
Thanks! I've had this in my recent Fedora 10 guide already, but I've now corrected it in my other guides as well. :)
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.