choiland
Posts: 16
Score: 0
Joined: 5/1/2008
From: Minnesota
Status: offline
|
Hi everybody, I don't know how many people use the daily spam reports, but we do, and the run time kept taking longer and longer, well we found out that even though we have the server set to remove spam messages older than 14 days, that rule does not get run unless the user logs into webmail, or uses IMAP to connect to their account. So we wrote a dos script to remove the older stuff. below is the dos command. To turn it into a batch file you need to put a second "%" in front of the variable name. USE AT YOUR OWN RISK. it works great for us, but i make no assumptions for anyone else. just replace the stuff in the brackets (including the brackets) with your mail storage path, and run on the machine storing your data. We currently have it set to delete everything older than 30 days, because the message buildup was a little large, and didn't want it running for a week the first run through. to test just change the "del" to "echo" for /D /R [Mail storage path] %F IN ("\~spam*") DO forfiles /p %~fF /s /m *.imap /d -30 /c "CMD /C del @FILE" once again, it worked for us, but maybe not for you... test it first. Chris
|