Jump to content
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
NukeNick

CPanel - Delete all Accounts' Trash mail

Recommended Posts

Σου σπάνε τα νεύρα γιατί τα κρατάνε για 10ετίες μέσα στα διεγραμμένα τους? Βγάνε ένα φιρμάνι και τρέχα το, το παρακάτω script ;)
 

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

 

  • Like 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×