The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Manually moving maildir messages from one account to another?

Discussion in 'E-mail Discussions' started by bcwebinc, Dec 19, 2007.

  1. bcwebinc

    bcwebinc Registered

    Joined:
    Feb 4, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    As per the subject--is it possible to move messages using SSH or some utility from one email account to another account without using a MUA?
     
  2. bcwebinc

    bcwebinc Registered

    Joined:
    Feb 4, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    For others future reference, copying the messages from one maildir folder to another can be done with the following general steps...

    Copy the messages to be moved from /home/user/mail/userdomain.com/olduser/cur to a tempdir (on the new server if you are doing this across servers).

    If scp'ing the messages as root or su, chown the messages to the correct user and group (it appears this should be user:mail).

    Then move the messages to the cur dir of the new account /home/user/mail/userdomain.com/newuser/cur/. The messages should then show up in horde webmail/imap or pop. The name of the message file doesn't appear to matter so long as it is unique. If you don't set the permissions on the messages first weird things happen if the account is accessed via webmail or popped.
     
Loading...

Share This Page