Innanzi tutto, supponendo che siamo in un ambiente Debian-like ci apprestiamo ad installare suddetto tool:
apt-get install imapcopy
Dopodichè non ci resta che creare il semplicissimo file di configurazione imapcopy.cfg
SourceServer mail.server1.com
SourcePort 143
DestServer mail.server2.com
DestPort 143
# SourceUser SourcePassword DestinationUser DestinationPassword
Copy "account@server1.com" "pass" "account@server2.com" "pass"
Per testare il nostro file di configurazione lanciamo
imapcopy -t
Che ci da informazioni su quante folder / mail presenti.
Infine lanciamo il comando: imapcopy che ci tornerà un output simile.
blackout@machine:~$ imapcopy
IMAPCopy 1.04 - 2009/07/18 [compiled with FreePascal]
written 2001-2009 by Armin Diehl
Running on Linux
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
MA 02110-1301, USA.
---------------------------------------------------------------------------
Login on sourceserver as account@server1.com OK
Login on destinationserver as account@server2.com OK
Getting folderlist on sourceserver OK, found 4 folder
Getting List of messages in "INBOX.Posta inviata" OK, 3 Messages found
Processing Folder INBOX.Posta inviata
Creating folder "INBOX.Posta inviata" OK
3 Messages copied, 0 Errors
Getting List of messages in "INBOX.Deleted Messages" OK, 0 Messages found
Getting List of messages in "INBOX.Spam" OK, 0 Messages found
Getting List of messages in "INBOX" OK, 42 Messages found
Processing Folder INBOX
42 Messages copied, 0 Errors
1 User processed, 45 Messages copied, 0 Error(s)
1 Folder(s) created, 0 Folder create errors, 0 Folder not copied
Fatto!
fonte
Nessun commento:
Posta un commento