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
Did you save the quota_notify script with Unix linebreaks? Also make sure you produced no syntax error when you modified the script.
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
I think the script works independently from the Postfix quota patch. Do you get any errors when you run Code: /usr/local/sbin/quota_notify on the shell?
No errors... debian:~# debian:~# /usr/local/sbin/quota_notify debian:~# All I get is the (almost) empty Daily Quota Report email. Daniel
This is because the mailbox is nearly empty (integer percent is zero). Edit "/usr/local/sbin/quota_notify" and change: Code: close(QF); next if (! $used); my $percent = int($used / $quota * 100); $lusers{$user} = $percent unless not $percent; by: Code: close(QF); next if (! $used); my $percent = int($used / $quota * 100); $lusers{$user} = $percent; and the report becomes: Code: DAILY QUOTA REPORT: ---------------------------------------------- | % USAGE | ACCOUNT NAME | ---------------------------------------------- | 0 | [email protected] | ----------------------------------------------
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 ???
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..
..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..
gotcha! in your tutorial you made a little mistake.. you write Code: postconf -e 'virtual_mailbox_extended = yes' but this is wrong..it should be Code: postconf -e 'virtual_maildir_extended = yes' hope this help
Thanks! I've had this in my recent Fedora 10 guide already, but I've now corrected it in my other guides as well.