Created
March 7, 2021 13:46
-
-
Save shanerutter/24a32061909284be528849891018ac68 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