CloudInsidr

Cyber security, infotech

  • Subscribe!
  • Privacy Policy
  • Legal
  • Contact Us

Join us on Twitter: @CloudInsidr

Follow us on Twitter: @cloudinsidr
  • news & alerts
    • events
    • industry analysis
    • industry gossip
    • people
  • cloud, edge & co.
    • AWS
    • administration & orchestration
      • web servers in the cloud
      • mail servers
      • databases
  • cybersec & warfare
    • encryption
  • blockchain
Home cloud, edge and everything in between administration and orchestration mail servers How to migrate a mail server from one machine to another
How to migrate a mail server from one machine to another

Cloud Insidr 2018-09-12 Leave a Comment

How to migrate a mail server from one machine to another

There are two basic ways to migrate a mail server from one machine to another: with and without service downtime.

Migrating a mail server with scheduled downtime

Use this method when you can allow for a brief downtime of mail services.

Step 1. Prepare the migration

Complete the setup of your new mail server. Lower the TTL in your DNS config.

Step 2. rsync mailboxes on the fly

Rsync mailboxes from the old server to the new mail server on the fly. This allows you to limit scheduled downtime.

Copying mailboxes on the fly has one big upside: You can silently test a specific user to see whether everything works or not.

Read the rsync manual very carefully. Test it on one mailbox first. Select appropriate flags.

Step 3. Set up DNS routing

Set up your new mail server as a secondary mail exchanger.

Step 4. Stop both MTA and MDA services on your old mail server

Your SMTP server must not accept any new mail. This also means that you must prevent your mail users from accessing their mail directories to prevent them from making changes (saving drafts of new email, for example). In practice, this requires you to stop the MDA (e.g. Dovecot) as well as the MTA (e.g. Postfix).

Your new mail server is not yet running. This is your scheduled downtime.

Step 5. Rsync final changes

During your scheduled service downtime, rsync only those files that have changed. This will limit your downtime.

Step 6. Clean up

Mail queue will keep email that it cannot send. Look at your mail queue on the old server. It should be empty.

Deactivate the MX record for the old mail server and stop mail services on the old mail server.

Migrating a mail server without downtime

The migration is a lot more difficult when you cannot tolerate any downtime of the mail service; in this case it is wise to migrate mailboxes user by user.

Configure aliases on both servers. Both servers should accept emails for both names, but internally redirect email to the appropriate server using aliases.

After migrating the last user, point the MX entry to the new server only and wait until mailqueue on the old server empties out, then shut down that server.

Filed Under: mail servers Tagged With: email, mail

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Subscribe

SSL/TLS Certificate Square (250 x 250)

Pearson Education (InformIT)

SSL/TLS Certificate Medium Rectangle (300 x 250)

Recent Posts

  • Upgrading from CentOS 6 to CentOS 7 and Beyond?
  • How To Figure Out Who is Signing In To Dovecot to Send or Retrieve Email
  • OpenSSH 9.9 Introduces Enhanced Quantum-Resistant Algorithms
  • OpenSSL 3.3 Final Release is now live!
  • How to Activate HTTP/2 with TLS 1.3 Encryption in NGINX for Secure Connections without a Performance Penalty
  • Is AWS sucking your budget dry? Strip it down to the nitty-gritty (without breaking stuff)
  • How to attach and mount an NVMe EBS volume on EC2
  • SELinux security contexts: correcting SELinux labels on a file system
  • Intel gobbling up Israeli Tower Semiconductor, Stock Goes Through The Roof
  • NGINX on AWS EC2: setting up a web server from scratch on a domain of your choice
  • Log4j RCE and mitigation techniques
  • Set up logrotate for Postfix

Symantec

Categories

  • administration and orchestration
  • alerts
  • AWS
  • Bitcoin
  • cloud, edge and everything in between
  • cryptocurrencies
  • cybersecurity and cyber warfare
  • databases
  • DNS
  • encryption
  • events
  • FinTech and InsurTech
  • homeland security
  • HTTP Security Headers
  • industries
  • industry analysis
  • industry gossip
  • Java
  • Linux
  • mail servers
  • networking
  • news
  • NGINX
  • people
  • php-fpm
  • reviews
  • SELinux
  • tips and tricks
  • Uncategorized
  • web servers in the cloud

Tags

AMI AWS AWS EBS Azure certificate cipher suites cryptography cyber defense cybersecurity cyber security Diffie-Hellman DNS DNS over HTTPS Dovecot EBS EC2 email encryption Fedora HTTP/2 HTTPS IBM letsencrypt Linux logs MariaDB MFA MySQL NGINX OpenSSL permissions php-fpm PHP 7 postfix RegEx Route 53 RSA SELinux SQL SSH SSL TLS TLS 1.3 TLS vulnerabilities WordPress

Archives

  • January 2025
  • November 2024
  • October 2024
  • May 2024
  • January 2023
  • March 2022
  • February 2022
  • December 2021
  • December 2020
  • November 2020
  • September 2020
  • January 2020
  • November 2019
  • August 2019
  • July 2019
  • April 2019
  • December 2018
  • October 2018
  • September 2018
  • August 2018
  • June 2018
  • May 2018
  • April 2018
  • February 2018
  • December 2017
  • November 2017
  • October 2017
  • August 2017
  • April 2017
  • February 2017
  • January 2017
  • November 2016
  • September 2016
  • August 2016
  • July 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • July 2015
  • February 2015

Recent Comments

    Wicked fast Networking (With a Government Clearance to Boot)

    ©2022 CybrAnalytiqa OÜ

    • Content purchasing and syndication