How to Migrate Maildir Emails from a Plesk Server to an ISPConfig Server

This guide walks you through migrating Maildir email accounts from a Plesk source server to an ISPConfig destination server, moving all email data (user mailboxes, folders, and read/seen state) across intact. It is an administrator-level procedure intended for server operators performing a platform migration at the shell, not a client-area task.

The workflow is the same in both directions: stop the mail services, copy the Maildir tree with rsync, correct ownership, restart Dovecot, and reindex. Two approaches are covered: migrating users one at a time (best for small moves or a first test run), and a bulk pass that migrates every mailbox under a domain in a single loop.

Last reviewed: 27 July 2026, against ISPConfig 3.3.1p1 and Plesk Obsidian 18.0.x on Debian GNU/Linux 12 (bookworm), with Dovecot as the destination IMAP server. This guide is written for Noiz hosting and is kept current against ISPConfig and Dovecot. It complements, and does not replace, the official documentation linked below.

Official Documentation Reference

Prerequisites

Before you begin, make sure the following assumptions and preparations are in place:

  • The commands below assume Debian GNU/Linux 12 (bookworm), Plesk Obsidian on the source server, and ISPConfig 3.3.1p1 on the destination server. Different distributions or major versions may need adjusted paths.
  • Every destination mailbox must already exist in ISPConfig before you copy any data. Create each one through the ISPConfig control panel (or via the remote API) so the database records and on-disk directory structure (/var/vmail/domain/user) are in place. Copying data into a mailbox that ISPConfig does not know about will not authenticate, because the matching row in the mail_user table is missing.
  • The paths and ownership used below are the ISPConfig defaults. Confirm them for your own server under System > Server Config > Mail, which holds Maildir Path (default /var/vmail/[domain]/[localpart]), Homedir Path (default /var/vmail), and Mailuser Name and Mailuser Group (both default vmail). Maildir Path is the mailbox home; Dovecot keeps the messages themselves in a Maildir subdirectory of it, which is why the ownership commands below target /var/vmail/test.co.za/test/Maildir rather than the home itself. The same tab holds POP3/IMAP Daemon, which ISPConfig can set to either Courier or Dovecot: the doveadm steps below apply only where it is set to Dovecot.
  • You have shell (SSH) access as root to the destination server and a login on the source server, ideally with SSH key authentication configured between the two so rsync and ssh run without interactive password prompts.
  • Replace the example Linux usernames (for example source, root) and hostnames (for example plesk, ispconfig.test.co.za) with your own server-specific identifiers.
  • Replace the example domain name test.co.za with your actual domain throughout every command and path.

Section 1: Migrating Individual Users (One by One)

Here you migrate a single user at a time, which makes verification and troubleshooting easier. Use this approach for smaller moves, or run it once as a test before committing to a bulk migration.

  1. Stop the mail services. Freezing both ends prevents new mail arriving mid-copy and prevents index corruption.
    • On the source (Plesk) server: systemctl stop qmail
    • On the destination (ISPConfig) server: systemctl stop dovecot
  2. Copy the Maildir with rsync. Run this from either end, whichever has the cleaner network path. The --chown=vmail:vmail flag maps ownership to the Dovecot mail user on arrival.
    • Push from the source (Plesk) shell:
      rsync -avz --chown=vmail:vmail --exclude '@attachments' /var/qmail/mailnames/test.co.za/test/ [email protected]:/var/vmail/test.co.za/test/

      Replace [email protected] with the actual destination login and hostname or IP.

    • Pull from the destination (ISPConfig) shell:
      rsync -avz --chown=vmail:vmail --exclude '@attachments' source@plesk:/var/qmail/mailnames/test.co.za/test/ /var/vmail/test.co.za/test/

      Replace source@plesk with the source login and hostname or IP.

  3. Start the mail service. On the destination (ISPConfig) server: systemctl start dovecot. Dovecot now sees the freshly copied Maildir.
  4. Reindex the mailbox. Rebuild the Dovecot indices so the transferred messages are searchable and consistent:
    doveadm -v index -u [email protected] '*'

    This aligns the indices with the copied data and clears most access glitches that appear immediately after a transfer.

  5. Verify.
    • Watch the log: tail -f /var/log/mail.log
    • Test IMAP login for [email protected] with a mail client or webmail and confirm the folders and message counts match the source.
    • Fix ownership and permissions only if you see permission-denied errors:
      chown -R vmail:vmail /var/vmail/test.co.za/test/Maildir
      chmod -R u+rwx /var/vmail/test.co.za/test/Maildir

      These give the vmail user full access to the Maildir tree.

Downtime Tip: Pre-sync, Then Final Sync

To keep mailboxes reachable for as long as possible, run the rsync in step 2 once while both services are still running. That first pass copies the bulk of the data. Then stop the services and run the identical rsync again: because rsync only transfers what has changed, the second pass is fast, so the actual downtime window shrinks to seconds or minutes rather than the full copy time.

Notes on Special Maildir Files

  • Excluding @attachments: The @attachments directory belongs to Plesk's webmail interface and holds temporary attachment files. It plays no part in email delivery on ISPConfig and can cause clutter or permission conflicts if copied, so --exclude '@attachments' keeps the migration focused on the mail itself.
  • maildirfolder and maildirsize: maildirfolder is a Dovecot marker file used for folder organisation and access; maildirsize records the mailbox quota usage. Both may travel across with the data, and Dovecot will regenerate or adjust them during reindexing to match the destination. There is no need to delete them. If quotas look wrong afterwards, check with doveadm quota get -u [email protected] and correct the quota value in ISPConfig if needed.

Repeat for Other Users

Apply the same steps to each additional user by changing the paths (replace test with the next username under /var/qmail/mailnames/test.co.za/) and updating the email address in the doveadm command.

Section 2: Migrating All Users in Bulk

This section migrates every mailbox under /var/qmail/mailnames/ on the source server in one pass. It assumes every email domain and mailbox already exists in ISPConfig (created in the panel or through the remote API), so the destination directories and authentication records are ready before any data moves.

Account existence is mandatory. Without a pre-existing ISPConfig account, rsync writes into a directory the mail system cannot authenticate against, because there is no matching row in the mail_user table. To prepare:

  • Recreate every email domain and mailbox in the ISPConfig panel under Email > Email Accounts > Domain and Email > Email Accounts > Email Mailbox, replicating the source settings (quotas, aliases, and so on). The Quota field on the mailbox form is in MB.
  • For large lists, use the ISPConfig remote API from a script (for example PHP calling mail_user_add) to add users in bulk. Create the API login first under System > User Management > Remote Users, and tick every call the script makes in the Functions list, for example mail_domain_add and mail_user_add. Calls to functions that are not ticked are refused.
  1. Stop the mail services.
    • On the source (Plesk) server: systemctl stop qmail
    • On the destination (ISPConfig) server: systemctl stop dovecot
  2. Bulk rsync (run from the destination shell). Loop over every user directory for the domain:
    for user in $(ssh source@plesk "ls /var/qmail/mailnames/test.co.za/"); do
        rsync -avz --chown=vmail:vmail --exclude '@attachments' source@plesk:/var/qmail/mailnames/test.co.za/$user/ /var/vmail/test.co.za/$user/
    done

    Replace source@plesk with the source login, and nest a second loop over domains if you are migrating more than one.

  3. Bulk fix ownership and permissions.
    for user in $(ls /var/vmail/test.co.za/); do
        chown -R vmail:vmail /var/vmail/test.co.za/$user/Maildir
        chmod -R u+rwx /var/vmail/test.co.za/$user/Maildir
    done
  4. Bulk reindex (assumes usernames match directory names).
    for user in $(ls /var/vmail/test.co.za/); do
        doveadm -v index -u [email protected] '*'
    done
  5. Start the mail service. On the destination (ISPConfig) server: systemctl start dovecot.
  6. Verify. Watch /var/log/mail.log with tail -f, and test IMAP login for a sample of migrated accounts. See the notes in Section 1 for the behaviour of @attachments, maildirfolder, and maildirsize.

Troubleshooting

  • Login fails after migration: the mailbox was not created in ISPConfig before the copy. Create it in the panel (or via the API), then rerun the rsync and reindex for that user.
  • Permission denied reading mail: ownership was not mapped to vmail. Rerun the chown -R vmail:vmail and chmod -R u+rwx commands against that mailbox's Maildir.
  • Messages or folders missing in the client: the indices are stale. Rerun doveadm -v index -u [email protected] '*', then reconnect the client.
  • Quota reported incorrectly: check the live figure with doveadm quota get -u [email protected], compare it against the panel report under Email > Statistics > Mailbox quota (that report is produced only for Dovecot, not for Courier), and correct the Quota value on the mailbox under Email > Email Accounts > Email Mailbox.

Migrations of this kind sit on Noiz managed platforms and are ordinarily carried out by the Noiz team as part of a move onto Noiz hosting. If you are moving mail onto Noiz and would like the migration handled or checked over, open a ticket from your Noiz client area and support will assist.

  • 0 Users Found This Useful
  • email, plesk, ispconfig, migration
Was this answer helpful?

Related Articles

How to Create an Email Mailbox With an Autoresponder and Forwarding in ISPConfig

This guide shows you how to create an email mailbox in ISPConfig that replies to every sender...

How to Create an Email Mailbox in ISPConfig

This guide walks you through creating a basic email mailbox in the ISPConfig control panel on...

How to Create an Email Alias in ISPConfig

This guide shows you how to create an email alias in the ISPConfig control panel on your Noiz...

How to Set Up Email Forwarding in ISPConfig

This guide shows you how to set up email forwarding in the ISPConfig control panel on your Noiz...

How to Create a Catchall Email Address in ISPConfig

This guide shows you how to create a catchall email address in the ISPConfig control panel on...