Changing mailbox's email address [moved]

chrisjj

Member
Jul 18, 2006
22
0
151
Anyone know how to do this?

Deleting the mailbox and creating a new one is not an option since I need to preserve the content.

Thanks.
 

RickG

Well-Known Member
Feb 28, 2005
238
2
168
North Carolina
chrisjj said:
Deleting the mailbox and creating a new one is not an option since I need to preserve the content.
From your comment, is the user storing a lot of mail on the server and using IMAP access?

A users mail is stored in various folders under /home/AccountName/mail/DomainName/User/ if using maildir, or in a single file if using mbox.

I would probably:

1) Create the new email address
2) Temporarily set a forward on the old mailbox to point to the new mailbox
3) Depending on the format, either copy the files over or cat the two files together.
4) Delete the old account

Its easy enough to create a test email account and go through the process before working with the live account.
 

chrisjj

Member
Jul 18, 2006
22
0
151
Thanks, but that's just what I want to avoid. I want to simply edit the mailbox's email address.
 

Lyttek

Well-Known Member
Jan 2, 2004
775
5
168
This is in the same domain, correct? In theory, would it be possible to create the new address within cPanel, then jump into a shell and delete the new address from the mail directory, then rename the old directory to the same as the new one?

Just a thought, I have not tried it, and will not be held responsible. Do some testing first on junk accounts you create.


FWIW, I'd go with RickG's answer. What we 'want' and what 'has to happen' are not always the same thing ;)
 

chrisjj

Member
Jul 18, 2006
22
0
151
> This is in the same domain, correct?

Correct.

> jump into a shell

No shell available on this account, sadly.

Thanks for the idea.