Nota Acap
  • Introduction
  • Linux Guide
    • Fresh Installed Centos 7
    • Changing Network Interfaces in Centos 7
    • Lockdown SSH
    • Recursively change permission Linux
    • Proxy Server IPtables
    • Provisioning Web Server with Custombuild
    • MySQL Basic Management
    • Increasing Existing LVM Disk
  • Windows Guide
  • Application Guide
    • WEB Port IPtables Rate Limit
    • Simple Email Piping Script
    • HTTP Dead
    • Email Relay Outgoing
    • Compiling Extra PHP version (Directadmin)
    • Finding the SPAM (cPanel)
    • HTTP Basic Virtual Host
    • Update Kernel for DRBD Hosts
  • Migration Related
    • Cpanel -> Cpanel (Bulk)
    • IMAPSYNC Basic Scripts
    • Directadmin -> cPanel (Copy/Sync Emails)
    • Basic Rsync Script
Powered by GitBook
On this page

Was this helpful?

  1. Migration Related

IMAPSYNC Basic Scripts

A script for imap sync for basic migration

#!/bin/bash

set -x

  { while IFS=';' read u1 p1 u2 p2

    do

      echo "Syncing from $u1 to user $u2"

      /usr/bin/imapsync \
      --nosyncacls --subscribe --syncinternaldates --delete2 --useuid --nofoldersizes --tls2 \
      --host1 183.81.160.33 --user1 "$u1" --password1 "$p1" --authmech1 LOGIN \
      --host2 183.81.162.20 --user2 "$u2" --password2 "$p2" --authmech2 LOGIN \
      --prefix1 INBOX. --sep1 INBOX --subscribe --sep2 INBOX --subscribe

    done ;

  } < details.txt

  echo "IMAPSync Finished!"
PreviousCpanel -> Cpanel (Bulk)NextDirectadmin -> cPanel (Copy/Sync Emails)

Last updated 6 years ago

Was this helpful?