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

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:

Quote:
my $DBN = "mail";
my $DBU = "DBUSER";
my $DBP = "DBPASSWORD";
my $DBH = "localhost";

Now add it to your crontab:

Code:
crontab -e
Quote:
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, 263 views)
Reply With Quote