Moving email messages between accounts Print

  • 1

In Plesk, emails are stored in the directory /var/qmail/mailnames/[domain]/[email_name]/Maildir

Messages in the inbox should be found under the folder called 'cur' (or possibly 'new') and all IMAP folders will be hidden folders like .Archive and .Trash (run ls -al to see them) with their own set of cur/new folders and other helper files.

You can simply copy messages from one mailname 'cur' folder to another, however you must preserve permissions and ownership during the copy in order for mail clients to be able to read the messages. This can be done by copying with the '-p' flag like this:

cp -pf /var/qmail/mailnames/* /var/qmail/mailnames/*

When complete, you may then need to rename the courierimapuiddb file to courierimapuiddb.old in order to have the Courier-IMAP server rebuild the listing of messages, otherwise it may not show the new messages.

Was this answer helpful?

← Back