Skip to content

Knowledge Linux

Linux server configuration,Zimbra

  • Home
  • Sitemap
  • Locate Us
  • Anti-Spam
  • Sitemap
  • Locate Us
  • Privacy & Cookie Policy
  • Directory Server
    • Open LDAP
    • Active Directory
  • LINUX KNOWLEDGE UNIVERSE
  • Mail Server
    • MDA
    • Microsoft Exchange
    • MTA
    • Postfix
    • Qmail
    • Webmail
    • Atmail Webmail
    • Hmail Webmail
    • Horde Webmail
    • iRed Webmail
    • RoundCube
    • Squirrel Webmail
  • Monitoring
    • Zimbra
  • Scriptology
  • Hosting Apps
    • BitNami
    • PHPList
    • Drupal
    • Moodle
    • PHPbb
    • Joomla
    • Magento
    • CakePHP
    • WordPress
Knowledge Linux
Mail Account migration from Any to Any mail system

Mail Account migration from Any to Any mail system

October 5, 2015January 5, 2016 admin

Mail Account migration from Any to Any mail system

 

create a input file name input.txt

user1@knowledgelinux.com;pasword123;user1_migrated@knowledgelinux.com;pasword123
user2@knowledgelinux.com;pasword123;user2_migrated@knowledgelinux.com;pasword123
etc...

IMAP sync naver overwrite mails from source to distination. if mail index already exsits on new mail server then that mail will not move from source to distination.

below is looping scripts to migrate more accounts in one by one automatic process.

#Written By "Vikas kushwaha@knowledgelinux.com"
{ while IFS=';' read  u1 p1 u2 p2
do
{ echo "$u1" | egrep "^#" ; } > /dev/null && continue # this skip commented lines in input.txt
echo -n "==== Syncing user $u1 to user $u2 ====################"
imapsync --host1 192.168.1.1 --user1 "$u1" --password1 "$p1" \
--host2 192.168.1.2 --user2 "$u2" --password2 "$p2"
echo "#########################==== End syncing user $u1 to user $u2 ===="
echo
done
} < input.txt

IMAP Sync Tool also available in Microsoft Windows . Same input format file you can use in Windows shell scripts for bulk mail account migration.

SET csvfile=input.txt

FOR /F "tokens=1,2,3,4 delims=; eol=#" %%G IN (%csvfile%) DO (
@ECHO ==== Syncing from account %%G to account %%I ====
@ECHO.

imapsync ^
  --host1 test1.lamiral.info --user1 %%G --password1 %%H ^
  --host2 test2.lamiral.info --user2 %%I --password2 %%J 

@ECHO.==== End syncing from account %%G to account %%I ====
@ECHO.
)

Please comment, if need free support on Mail account migration.

Tagged with Mail Account migration from Any to Any mail system
  • Linux
  • Qmail Mail server
  • scriptology
  • Zimbra

Post navigation

Previous Post

How to send mail from zimbra command line

Next Post

SVN full backup and incremental backup scripts