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
- ISPConfig Documentation (mail domains, mailboxes, and the remote API)
- Dovecot Documentation (
doveadm index,doveadm quota, and Maildir handling) - rsync manual page (transfer flags, ownership mapping, and exclusions)
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 themail_usertable 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 defaultvmail). Maildir Path is the mailbox home; Dovecot keeps the messages themselves in aMaildirsubdirectory of it, which is why the ownership commands below target/var/vmail/test.co.za/test/Maildirrather than the home itself. The same tab holds POP3/IMAP Daemon, which ISPConfig can set to either Courier or Dovecot: thedoveadmsteps below apply only where it is set to Dovecot. - You have shell (SSH) access as
rootto the destination server and a login on the source server, ideally with SSH key authentication configured between the two sorsyncandsshrun without interactive password prompts. - Replace the example Linux usernames (for example
source,root) and hostnames (for exampleplesk,ispconfig.test.co.za) with your own server-specific identifiers. - Replace the example domain name
test.co.zawith 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.
- 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
- On the source (Plesk) server:
- Copy the Maildir with rsync. Run this from either end, whichever has the cleaner network path. The
--chown=vmail:vmailflag 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@pleskwith the source login and hostname or IP.
- Push from the source (Plesk) shell:
- Start the mail service. On the destination (ISPConfig) server:
systemctl start dovecot. Dovecot now sees the freshly copied Maildir. - 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.
- 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/MaildirThese give the
vmailuser full access to the Maildir tree.
- Watch the log:
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@attachmentsdirectory 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. maildirfolderandmaildirsize:maildirfolderis a Dovecot marker file used for folder organisation and access;maildirsizerecords 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 withdoveadm 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 examplemail_domain_addandmail_user_add. Calls to functions that are not ticked are refused.
- Stop the mail services.
- On the source (Plesk) server:
systemctl stop qmail - On the destination (ISPConfig) server:
systemctl stop dovecot
- On the source (Plesk) server:
- 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/ doneReplace
source@pleskwith the source login, and nest a second loop over domains if you are migrating more than one. - 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 - Bulk reindex (assumes usernames match directory names).
for user in $(ls /var/vmail/test.co.za/); do doveadm -v index -u [email protected] '*' done - Start the mail service. On the destination (ISPConfig) server:
systemctl start dovecot. - Verify. Watch
/var/log/mail.logwithtail -f, and test IMAP login for a sample of migrated accounts. See the notes in Section 1 for the behaviour of@attachments,maildirfolder, andmaildirsize.
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 thechown -R vmail:vmailandchmod -R u+rwxcommands against that mailbox'sMaildir. - 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.
