-
-
Save taidos/92b04651de24a2a03c68d783d4d938c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for domainhash in `cat /etc/userdomains | grep "\." | sed 's/ //'` | |
do | |
read domain user <<<$(echo $domainhash | sed 's/:/ /'); | |
find /home/${user}/mail/${domain}/*/.Trash/{cur,new,tmp}/ -type f | xargs -ifile rm -f file | |
find /home/${user}/mail/${domain}/*/.Junk/{cur,new,tmp}/ -type f | xargs -ifile rm -f file | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment