Hi Folks,
Just found a script that I have adjusted to work with ISPConfig 3 to clean up the old trash mail ect.
Code:
#!/bin/bash
MAILDIRS=$(find /var/vmail/*/*/Maildir/ -maxdepth 0 -type d)
for basedir in $MAILDIRS; do
for dir in .Trash .Junk .Spam .Low\ Priority; do
for dir2 in cur new; do
[ -e "$basedir/$dir/$dir2" ] && (
echo "Processing $basedir/$dir/$dir2..."
find "$basedir/$dir/$dir2/" -type f -mtime +30 -delete
)
done
done
done
When migration from Cpanel to ISPconfig I found that my users have a lot of old mails in the trash. When I ran this script it saved me about 25GB of diskspace.
Recent comments
11 hours 21 min ago
20 hours 49 min ago
21 hours 38 min ago
1 day 1 hour ago
1 day 5 hours ago
1 day 5 hours ago
1 day 8 hours ago
1 day 18 hours ago
1 day 23 hours ago
2 days 34 min ago