I found this on the net, so I'll try to understand what it does and tweak it.
Code:
...
So i found a little script on the net, and modified it a bit for use with ISPConfig.
It will remove Messages older than 14 days from users .Junk folder.
I run it daily via cron.
cat /etc/cron.daily/purge.junk
#!/bin/sh
HOURS=$((2 * 24 * 7))
for domain in /var/www/*
do
if [ -d "$domain"/user ]
then
cd $domain/user
for user in *
do
if [ -d "$user/Maildir/.Junk" ]
then
tmpwatch -m $HOURS $user/Maildir/.Junk/{cur,new}
fi
done
cd /var/www
fi
done
Edit(11 Jan 2008):
You might want to add :
/etc/init.d/dovecot restart
to the script, to make dovecot rebuild message indexes.
Recent comments
20 hours 38 min ago
23 hours 34 min ago
1 day 48 min ago
1 day 2 hours ago
1 day 3 hours ago
1 day 5 hours ago
1 day 6 hours ago
1 day 22 hours ago
1 day 23 hours ago
2 days 3 hours ago