Plesk

Unable to import mail messages in Plesk if the default location of mailboxes was changed

Symptoms

Attempt to import mail messages in Plesk fails with the following error:

Failed to connect to the source server and copy mail messages
stderr: external error of mail migrator: [Errno 2] No such file or directory: '/var/qmail/mailnames/example.com/mail/Maildir'

Cause

The default location of mailboxes was customized.
Mail Import does not support customized mail paths. This behavior was confirmed as a bug with ID PMT-4585.

Resolution

  1. Connect to the server via SSH.

  2. Use the command below to mount the custom mailboxes location to the default MailDir:

    # mount --bind /custom/location/mailnames /var/qmail/mailnames

  3. Rapair mail server configuration:

    # plesk repair mail -y