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

How To Migrate Mailboxes Between IMAP Servers With imapsync

Recommended Posts

How To Migrate Mailboxes Between IMAP Servers With imapsync

Version 1.0
Author: Falko Timme

This guide explains how you can migrate mailboxes between IMAP servers with imapsync. imapsync is an IMAP synchronisation, sync, copy or migration tool. More than 32 different IMAP server softwares are supported with success. All flags are preserved, unread will stay unread, read will stay read, deleted will stay deleted.

I do not issue any guarantee that this will work for you!

 

1 Preliminary Note

I'm using two Debian or Ubuntu servers here (the procedure should be the same for other distributions, only the installation of imapsync will differ):

  • server1.example.com (source)
  • server2.example.com (target)

I want to migrate the mailbox sales@example.com (username: sales@example.com, password: secret) on server1.example.com to the mailbox sales@example.com on server2.example.com (username and password are the same as on server1.example.com).

 

2 Before We Start

Before we start, let's take a look at both mailboxes to see what's in them (you can do this with an email client such as Outlook, Thunderbird, or a web-based email client such as SquirrelMail - I'm using SquirrelMail here).

server1.example.com:

1.png

server2.example.com:

2.png

After the migration, the two messages on server1.example.com should be available on server2.example.com.

 

3 imapsync Installation

It doesn't matter if we install imapsync on server1.example.com or server2.example.com - we can even install it on a third, uninvolved server.

aptitude install imapsync

To learn about its usage, take a look at

man imapsync

and

imapsync --help

 

4 Doing The Migration

We have to tell imapsync the usernames and passwords of the mail accounts that we want to migrate. Theoretically, we can use the --password1 and --password2 switches for the passwords, but this is dangerous because the passwords would appear in the output of

ps aux

(So any user who is allowed to run that command would know the passwords.)

Therefore it's better to create two files (/etc/secret1 and /etc/secret2 in this example) that contain the passwords (in this example, it's secret for both mail accounts), do a chmod 600 on these files, and use the --passfile1 and --passfile2 switches.

echo "secret" > /etc/secret1
echo "secret" > /etc/secret2
chmod 600 /etc/secret1
chmod 600 /etc/secret2

Now we can do the migration with this simple command:

imapsync --host1 server1.example.com --user1 sales@example.com --passfile1 /etc/secret2 --host2 server2.example.com --user2 sales@example.com --passfile2 /etc/secret2

Here's a sample output:

root@server1:~# imapsync --host1 server1.example.com --user1 sales@example.com --passfile1 /etc/secret2
 --host2 server2.example.com --user2 sales@example.com --passfile2 /etc/secret2
$RCSfile: imapsync,v $ $Revision: 1.252 $ $Date: 2008/05/08 02:30:17 $
Here is a [linux] system (Linux server1.example.com 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:45:36 UTC 2009 x86_64)
with perl 5.10.0 and the module Mail::IMAPClient version used here is 2.2.9
Command line used :
/usr/bin/imapsync --host1 server1.example.com --user1 sales@example.com --passfile1 /etc/secret2
 --host2 server2.example.com --user2 sales@example.com --passfile2 /etc/secret2
Turned ON syncinternaldates, will set the internal dates on host2 same as host1.
TimeZone :[CEST]
Will try to use CRAM-MD5 authentication on host1
Will try to use CRAM-MD5 authentication on host2
From imap server [server1.example.com] port [143] user [sales@example.com]
To   imap server [server2.example.com] port [143] user [sales@example.com]
Banner : * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA
 IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2008 Double Precision, Inc.  See COPYING for distribution information.
Host server1.example.com says it has NO CAPABILITY for AUTHENTICATE CRAM-MD5
Error login : [server1.example.com] with user [sales@example.com] auth [CRAM-MD5]: 3 NO Login failed.

Trying LOGIN Auth mechanism on [server1.example.com] with user [sales@example.com]
Success login on [server1.example.com] with user [sales@example.com] auth [CRAM-MD5]
Banner : * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA
 IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2008 Double Precision, Inc.  See COPYING for distribution information.
Host server2.example.com says it has NO CAPABILITY for AUTHENTICATE CRAM-MD5
Error login : [server2.example.com] with user [sales@example.com] auth [CRAM-MD5]: 3 NO Login failed.

Trying LOGIN Auth mechanism on [server2.example.com] with user [sales@example.com]
Success login on [server2.example.com] with user [sales@example.com] auth [CRAM-MD5]
From capability : QUOTA STARTTLS NAMESPACE IDLE THREAD=ORDEREDSUBJECT ACL SORT UIDPLUS CHILDREN ACL2=UNION IMAP4REV1 THREAD=REFERENCES
To   capability : QUOTA STARTTLS NAMESPACE IDLE THREAD=ORDEREDSUBJECT ACL SORT UIDPLUS CHILDREN ACL2=UNION IMAP4REV1 THREAD=REFERENCES
From state Authenticated
To   state Authenticated
From separator and prefix : [.][INBOX.]
To   separator and prefix : [.][INBOX.]
++++ Calculating sizes ++++
From Folder [INBOX]                             Size:      2412 Messages:     2
From Folder [INBOX.Drafts]                      Size:         0 Messages:     0
From Folder [INBOX.Sent]                        Size:         0 Messages:     0
From Folder [INBOX.Trash]                       Size:         0 Messages:     0
Total size: 2412
Total messages: 2
Time : 11 s
++++ Calculating sizes ++++
To   Folder [INBOX]                             Size:     16844 Messages:     6
To   Folder [INBOX.Drafts]                      Size:         0 Messages:     0
To   Folder [INBOX.Sent]                        Size:         0 Messages:     0
To   Folder [INBOX.Trash]                       Size:         0 Messages:     0
Total size: 16844
Total messages: 6
Time : 0 s
++++ Listing folders ++++
From folders list : [INBOX] [INBOX.Drafts] [INBOX.Sent] [INBOX.Trash]
To   folders list : [INBOX] [INBOX.Drafts] [INBOX.Sent] [INBOX.Trash]
++++ Looping on each folder ++++
From Folder [INBOX]
To   Folder [INBOX]
++++ From [INBOX] Parse 1 ++++
++++ To   [INBOX] Parse 1 ++++
++++ Verifying [INBOX] -> [INBOX] ++++
+ NO msg #1 [FID6mR7SVC7csdmRce+7PQ:924] in INBOX
+ Copying msg #1:924 to folder INBOX
flags from : [\Seen]["26-May-2009 22:00:59 +0200"]
Copied msg id [1] to folder INBOX msg id [7]
+ NO msg #2 [4lu3SCjZGH2mRuiP1dY7Mw:1488] in INBOX
+ Copying msg #2:1488 to folder INBOX
flags from : [()]["27-May-2009 14:12:59 +0200"]
Copied msg id [2] to folder INBOX msg id [8]
Time : 0 s
From Folder [INBOX.Drafts]
To   Folder [INBOX.Drafts]
++++ From [INBOX.Drafts] Parse 1 ++++
++++ To   [INBOX.Drafts] Parse 1 ++++
++++ Verifying [INBOX.Drafts] -> [INBOX.Drafts] ++++
Time : 0 s
From Folder [INBOX.Sent]
To   Folder [INBOX.Sent]
++++ From [INBOX.Sent] Parse 1 ++++
++++ To   [INBOX.Sent] Parse 1 ++++
++++ Verifying [INBOX.Sent] -> [INBOX.Sent] ++++
Time : 0 s
From Folder [INBOX.Trash]
To   Folder [INBOX.Trash]
++++ From [INBOX.Trash] Parse 1 ++++
++++ To   [INBOX.Trash] Parse 1 ++++
++++ Verifying [INBOX.Trash] -> [INBOX.Trash] ++++
Time : 1 s
++++ Statistics ++++
Time                   : 12 sec
Messages transferred   : 2
Messages skipped       : 0
Total bytes transferred: 2412
Total bytes skipped    : 0
Total bytes error      : 0
Detected 0 errors
Please, rate imapsync at http://freshmeat.net/projects/imapsync/
?Happy with this free, open source and gratis GPL software?
Feel free to thank the author by giving him a book:
http://www.amazon.com/gp/registry/wishlist/1C9UNDIH3P7R7/
(or its paypal account gilles.lamiral@laposte.net)
root@server1:~#

Afterwards we can delete the two password files:

rm -f /etc/secret1
rm -f /etc/secret2

On the target server (server2.example.com), log out of your IMAP account and log back in (a simple refresh might not be enough), and you should see the messages from server1.example.com:

server2.example.com:

3.png

 

5 Links

 

https://www.howtoforge.com/how-to-migrate-mailboxes-between-imap-servers-with-imapsync

 

Share this post


Link to post
Share on other sites
Guest selldeadfulluk333

Hi all !
I have UK fullz dead , if u want to buy i have:

UK FULLZ RANDOM ---->>>>
4658652008699022|12/25|545|Name on Card : Mr. Lewis Crabtree |1 pengover close liskeard |Liskeard |Pl14 3nz|UK|phone number : 07463983223|date of birth : 01/04/1994|Mother's maiden name: Crabtree |account number : 33785939|sort code : 20-50-40|Full Name : L m crabtree

Uk Fullz with BANK i have ( Halifax, RBS, Santander, Natwest, HSBC, Bank of scotland, Barclays , Lloyds, First Direct, TSB, COOP, Metro, Nationwide, Yorkshire, UlsterBank, Clydesdale, Tesco, Monzo, Ireland, Issuing Bank, Revolut, Starling ) ----->>>>>

4751 2902 3460 8842|01|24|148|A a narma|33, 33 Beaumont Road||LE5 3HB|UK\phone number : 07413325093|date of birth : 07/05/1993|account number : 71240578|sort code: 60-15-48|mother maiden name : Khalifa |Full name: Asjad NARMA 

Uk Fullz with mobile network providers ( VODAFONE , O2 , EE...) ----->>>>>

Username : dwf3658@me.com
Password : Enigmatic1958
--------------EE Billing-----------------------
Full Name            :  David Foster
Address 1            : 34 Adelaide Road
Address 2            : West Ealing
City                      : London
County                 : Select County
Post Code            : W13 9EB
Phone Number     : 07931712570
--------------EE Fullz-----------------------
Card Holder Name    : D W FOSTER
Card Number            : 4659 2300 7263 0170
Expiry Date               : 08/23
CVV                          : 707
DOB(DD/MM/YYYY)                  : 03/06/1958
Account Number       : 20371858
Sort Code                 : 20-17-18
MMN                 : McLennan
|--------------- I N F O | I P -------------------|
|Client IP         : 86.250.26.253
|--- http://www.geoiptool.com/?IP=86.250.26.253 ----
User Agent         : Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15
|----------------

Uk Fullz with PHONE PROVIDER ----->>>>>

Username           : ruthieokane@googlemail.com
Password            : Hockey50
--------------O2 Billing-----------------------
Full Name            : Ruth O'Kane
Address 1            : 30 Ballymacashen Road
Address 2            : Killinchy
City                      : Newtownards
County                 : Down
Post Code            : BT24 6SH
Phone Number     : 07821923157
--------------O2 Fullz-----------------------
Card Holder Name    : MRS R O'KANE 
Card Number            : 4751 1100 1381 5188
Expiry Date               : 06 / 24
CVV                          : 134
DOB(DD/MM/YYYY)                  : 21/08/1961
Account Number       : 56523084
Sort Code                 : 98-00-30
MMN       : McCully
|--------------- I N F O | I P -------------------|
|Client IP         : 92.41.138.95
|--- http://www.geoiptool.com/?IP=92.41.138.95 ----
User Agent         : Mozilla/5.0 (Linux; Android 10; SAMSUNG SM-A920F) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/12.0 Chrome/79.0.3945.136 Mobile Safari/537.36
|----------- ((())) --------------|

Uk Fullz with AGE RANGE ----->>>>>
I have all DOB from 1930s-2000s

Uk Fullz with SORTCODE ----->>>>>
I have over 100k fullz so u can send any sortcode i will check for u

Uk Fullz with NIN ----->>>>>
Full name: Michael  Enomah 
Telephone: 07459192535
Date of birth: 14/03/1963
Email: mikeenomah@gmail.com
Address: 66 peninsula house o'Leary street , Warrington, Wa27sa
MMN: Agnes Ikhelua 
Card BIN: 465902
Cardholder name: M.Enomah
Card number: 4659024519856021
Card exp: 02/23
Security code: 059
Account: 43479765
Sort Code: 20-91-48
NIN: Sy 48 86 55 d
DL: ENOMA603143M99MM
Submitted by: 83.137.6.226
Location: 83.137.6.226
UserAgent: Mozilla/5.0 (Linux; Android 10; SAMSUNG SM-A505FN) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/12.1 Chrome/79.0.3945.136 Mobile Safari/537.36
Browser:

Uk Fullz with SPECIFIC DOOR ----->>>>>
Almost all have house numbers including floors and apartments

Uk Fullz with VBV + MMN ----->>>>>
4757149145425726|03 / 20|429|ERIN PATTERSON|4 Carsons Dale|Newtownards|Northern Ireland|BT23 5GG|UK|07754740429| DOB 9-4-1998 |account number 9382450401 |short code 09-01-28 |MMN McCormick |VBV bubbles\par

Uk Fullz with CITY----->>>>>
I have over 100k fullz, SO i can filter anycity u want

Uk Fullz with NATIONAL INSURANCE ----->>>>>

+ ---------------DVLA----------------+
+ Personal Information
+ ------------------------------------------+
| Email Address: shannon.lee96@hotmail.com
| First Name: Shannon
| Last Name: Lee
| Address: 393 Beaumont Leys Lane
| County: Leicestershire
| Postcode: LE4 2BG
| Date of Birth (dd/mm/yyyy): 26/12/1996
| Mobile/Telephone Number: 07833495581
| Driver License Number: 
| National Insurance Number: Jw 44 64 72 a
| Account Number: 46691713
| Sort Code: 09-01-28
+ ------------------------------------------+
+ Card Information
+ ------------------------------------------+
| Cardholder Name: S m Lee
| Card Number: 4757147329496307
| Expiry Date: 05/21
| CVV: 865
+ ------------------------------------------+
+ Bank Information
+ ------------------------------------------+
| Santander Customer ID: S m lee
| Santander Passcode: harry2803
| Santander Password: harry2803
| Santander Memorable Word: Harrybirthday

Uk Fullz with Driver License ----->>>>>

+ Personal Information
+ ------------------------------------------+
| Email Address: obrien50@gmx.co.uk
| First Name: Rose
| Last Name: O'brien
| Address: 15 Snowdon Drive, Fforestfach
| City: SWANSEA
| County: Swansea
| Postcode: SA5 5BD
| Date of Birth (yyyy/mm/dd): 23/07/1960
| Mobile/Telephone Number: 7480133262
| Driver License Number: OBRIE657230RA9VU
+ ------------------------------------------+
+ Card Information
+ ------------------------------------------+
| Cardholder Name: Rose O'brien
| Card Number: 4659352514485102
| Expiry Date: 04/23
| CVV: 632
| Account Number: 38732381
| Sort Code: 07-04-36
| MMN: Davies 


Also if you request anything in FULLZ we still meet
ALL OF THEM ARE FRESH FULLZ DEAD AND NOT RESOLD.

Please contact me
ICQ 713086896
Telegram @selldeadfullz

#deadfullz 
#fullzdead 
#uk 
#deadfullzuk 
#fullzdeaduk 
#selldeadfullz 
#buydeadfullz 
#ukdeadfullz 
#ukfullzdead

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.


×