Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 28th May 2012, 18:58
CapnJoe CapnJoe is offline
Junior Member
Join Date: May 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Delete Trash via command line? - also imapsync followup

We decided to migrate to a different server with the postfix errors restricting email.

I made a shell script to transfer from one server to another with imapsync, just a note make sure your end of line (EOL) are in Unix compatibility or it will send the CR as part of the password and fail. After recieving errors from the server of too many files I had to add the flag to skip Trash folders.

while IFS=',' read u p1 p2
imapsync --noauthmd5 --host1 localhost --ssl1 --user1 $u --password1 $p1 --host2 box***.bluehost.com --user2 $u --ssl1 --authmech2 LOGIN --password2 $p2 --exclude '(?i)\b(Junk|Spam|Trash)\b'
echo "User Ran"
done < KTU-imapsync-rerun.csv
Called this command and dumped the output into a text file

./test.sh | tee test.sh-28-5-2012-c.txt

To MY question: Is there any serverside way to delete the trash files that were transfered from the users?
Reply With Quote
Sponsored Links


command line, delete trash, imapsync, piped output

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig Autoresponder, adding subdomain problem BlackHat Installation/Configuration 4 18th October 2011 15:24
CPU load locks up box. Apache or MYSQL related. crypted General 61 29th October 2010 23:16
That EASY to DELETE Domains??? angry Feature Requests 3 17th November 2008 21:55
Problem using remoting for Client delete krakoukas General 2 6th July 2008 17:31
Delete very large files in Trash?? trcinc1 Server Operation 1 27th April 2007 23:30

All times are GMT +2. The time now is 20:44.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.