1 (edited by Almotzo 2016-02-22 18:22:09)

Topic: Copy Maildata from User-Domain A to Folder in Domain B

Hi,

I have a simple question.


I would like to move the email data of a user in domain A. In a folder under Domain B. How do I do a kind of import safest.


example:

User: username@domaina.xyz all Data move to username@domainb.xyz in Folder "Import" with all subfolders

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Copy Maildata from User-Domain A to Folder in Domain B

Several solutions:

*) Copy all files under username@domainA.xyz's mailbox to username@domainB.xyz's mailbox. For example:

Old mailbox: /var/vmail/vmail1/domainA.xyz/u/s/e/username-2016xxxxxx/Maildir/
New mailbox: /var/vmail/vmail1/domainB.xyz/u/s/e/username-2016xxxxxx/Maildir/

Then:

cp -rpf /var/vmail/vmail1/domainA.xyz/u/s/e/username-2016xxxxxx/Maildir /var/vmail/vmail1/domainB.xyz/u/s/e/username-2016xxxxxx/

Note: use '-p' flag to keep file owner and permission. Otherwise you have to set file owner (vmail:vmail) and permission (0700) manually.

*) Sync with 'imapsync': http://imapsync.lamiral.info
You must know both users' passwords.

3

Re: Copy Maildata from User-Domain A to Folder in Domain B

thanks for the tip.

Another question.

How How can I move to a complete a user's mailbox to another mailbox but in a subfolder . How e.g. an archive

Example:

Mailbox User New:
- Inbox
- Sent
- Trash
- Archiv Olddomain
* Inbox
* Sent
* Trash
* Own Folders and Subfolders

- = Folder
* = Subfolder

4

Re: Copy Maildata from User-Domain A to Folder in Domain B

Simply copy the whole imap folder to another user's mailbox (again, with proper owner and permission), then rename it to '.PARENT.SUB'.

.PARNET.SUB will become a sub-folder like this:

PARENT
    |- SUB