View Single Post
Old 10th January 2008, 19:30
volksman volksman is offline
Senior Member
Join Date: May 2007
Posts: 124
Thanks: 2
Thanked 16 Times in 14 Posts

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:

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:

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:

mv maildirfix /usr/local/sbin/
chown +x /usr/local/sbin/maildirfix
Change the DB info:

vi /usr/local/sbin/maildirfix
and edit the lines as approprate:

my $DBN = "mail";
my $DBU = "DBUSER";
my $DBH = "localhost";

Now add it to your crontab:

crontab -e
0 23 * * * /usr/local/sbin/maildirfix &> /dev/null
This will run it one hour before the quota_notify script is triggered if you followed the howto.
Attached Files
File Type: gz maildirfix.tar.gz (1.1 KB, 276 views)
Reply With Quote