I run the quota_notification script and it sends me a blank e-mail. After some running through the script it seems to die when looking for the maildirsize file. When I look by hand the files aren't in any of my user dirs. Did I screw something up when applying the quota patch to postfix? How do I get those files to show up?
Anyone else having issues with this in Gutsy? I just downloaded and recompiled postfix to make sure there were no errors and I don't see any: patch -p1 < ../postfix-2.4.5-vda-ng.patch patching file README_FILES/VDA_README patching file src/global/mail_params.h patching file src/util/file_limit.c patching file src/virtual/mailbox.c patching file src/virtual/maildir.c patching file src/virtual/virtual.c patching file src/virtual/virtual.h No errors after dpkg-buildpackage Installed packages and restarted postfix sent an e-mail to a user but there is still no maildirsize file in the users Maildir.... Any suggestions?
Did you modify the quota_notification as shown in the tutorial? There are two lines in the script where you must add a % sign.
yep. its not really a problem with the reporting script. It's a problem with either postfix or courier not creating or maintaining the 'maildirsize' file in the actual mail store directory.
I just setup a test account with a 1000 byte quota and it bounced an e-mail I sent to the account saying it was over quota. Postfix does enforce the quota. So it must be using something other than using the maildirsize file to enforce it. Still digging but thought I would put that out there.....
I've created a quick fix to this problem for now. It's really just a hack and probably wouldn't be all that great if you have a LOT of users but it works: First you will need to install the Mysql module for Perl. This can be done by running the following in a shell: Code: perl -MCPAN -e shell If you've never used the cpan shell before you will need to go through the setup. I can't really help with that (mostly defaults but you are on your own). Once you get to a prompt type the following: Code: cpan> force install Bundle::Mysql That should force it in (it will die if it can't connect as root to your DB). Then you need to put the script somewhere, so download it and get it on your server: Code: mv maildirfix /usr/local/sbin/ chown +x /usr/local/sbin/maildirfix Change the DB info: Code: vi /usr/local/sbin/maildirfix and edit the lines as approprate: Now add it to your crontab: Code: crontab -e This will run it one hour before the quota_notify script is triggered if you followed the howto.
Found the problem Check your postfix main.cf file and see if this helps. http://www.howtoforge.com/forums/showthread.php?t=19765 From the postfix-2.4.5-vda-ng.patch.gz sample config. +# Enable Maildir++ extensions for faster maildir quota calculation +# (maildirsize file and ",S=<size>" filename extension) +# Needs Maildir++ compatible IMAP servers, like Courier-IMAP +virtual_maildir_extended = yes
maildirfix for DBI This maildirfix script to fix the maildirsize file is exactly what I need, but the problem is I am running on Ubuntu 10.04. I am not familiar in perl so maybe somebody can help me. Does anybody have a version with the usage of DBI in perl (use DBI, which appears to be use instead of use Mysql; Help or an adjusted version would be great!