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.
Reply
 
Thread Tools Display Modes
  #1  
Old 28th May 2012, 17: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.

Code:
while IFS=',' read u p1 p2
do
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

Code:
./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
Reply

Bookmarks

Tags
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 3.0.3.3 Autoresponder, adding subdomain problem BlackHat Installation/Configuration 4 18th October 2011 14:24
CPU load locks up box. Apache or MYSQL related. crypted General 61 29th October 2010 22:16
That EASY to DELETE Domains??? angry Feature Requests 3 17th November 2008 20:55
Problem using remoting for Client delete krakoukas General 2 6th July 2008 16:31
Delete very large files in Trash?? trcinc1 Server Operation 1 27th April 2007 22:30


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


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