Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Brad Jennings on December 02, 2003, 10:25:35 PM
-
Is there a way to set a 5.6 machine to automatically delete emails in a folder after a given length of time. I would like to setup everyone a junkfolder for SPAM ....but I would like to have it empty itself periodically without any user help. Any suggestions would be appreciated.
-
I haven't really tested this, but you should be able to run a cronjob something like:
find /home/e-smith/files/users -path '*/;junkmail/*' -ctime +7 | xargs rm -f
Don't come after me if it wiped your entire disk :-)
-
After I hit the "post"button I saw that you're running 5.6, so it should be more like:
find /home/e-smith/files/users -path '*/junkmail/*' -ctime +7 | xargs rm -f
Michiel
-
Thanks....I'll give it a try
DAMN IT....MY HARD DRIVE IS EMPTY!
Just kiddin
-
The pdf here http://www.tech-geeks.org/contrib/loveless/mailServerSetup/
contains directions for using the script here
http://www.tech-geeks.org/contrib/loveless/spamassassin/