|
From: Kris D. <kd...@vi...> - 2006-05-16 14:29:24
|
Obantec Support wrote: > I have a user who's spam file is 120MB (he never users usermin to check > false positives). > He wanted to make space as he is close to his quota so i suggested he look > to his spam file and delete any or all. > > now the problem is if he selects say 10 mails and hits delete he gets an > over quota message and cannot proceed. > i guess usermin is creating a temporary file which adds to his quota and > stops this action. > > i don't want to have to intervene when a user has this problem. > > option1 have usermin use a file not owned by the user for the deletion (if > that is the case) I can't point to a Usermin-specific solution, but this is exactly what I did with a similar problem for some users trying to delete spam via one of our webmail systems. Rather than having the user's Trash mail folder owned by that user, I changed the ownership of that file to "nobody". That way, deletes can succeed because the IMAP action of copying a messge to the Trash folder on deletion didn't increase their disk usage. I also set up a cron job to periodically trim everyone's Trash folder, in much the same way I had set spam folders to be kept somewhat under control. > option2 anyone got a cron script to check the spam file for older than "n" > days and delete those spams. I've posted versions of the mail management scripts I wrote: http://www.deepnet.cx/~kdeugau/spamtools/ Note that all of these scripts work on *nix mbox-format mailboxes; it should be relatively simple to adapt them to maildir mailboxes. Cron entries for most of them look like this: # Spam expiry, automagical trash emptying, and quota warnings. 03 1 * * * root /root/autotrimtrash.pl 30 1 * * * root /root/custom-spam 30 2 * * * root /root/autoexpirespam.pl 25 45 3 * * * root /root/space_warn.pl -kgd |