Changing an existing mailbox name / email address
-
I realize this probably isn't officially supported, and I can just setup a new mailbox and use something like imapsync to move everything over, but just curious as I had thought I could do this and recently realized I couldn't... is there any way to change a mailbox name once it's been established, even via command-line perhaps?
The context: A client of mine had a user that unfortunately was the recent victim of an email scam. In order to best protect them, the client requested that I change their email address to effectively cease all communication over the old one (i.e. emails to old address would bounce) and start fresh for their user with a new email address. I thought I could do that, but realized soon afterwards that I actually couldn't - at least not in the GUI. So this led me to wonder if it's still possible with a few commands via SSH perhaps or if it's truly not possible.
Any guidance would be appreciated. No worries if it can't be done though as I realize this is very unlikely to be possible. I can also use the workaround by creating a new mailbox and migrating the info and then linking their user back to it and deleting the old mailbox. I just wondered if this might be possible to do via command line. And if not, maybe I'll file a feature request though I recognize this would likely be a very rare use-case.
-
@d19dotca The simple answer is NO, you cannot change an existing user mailbox name, but you can change the email address using an alias however that will not solve what you try to.
On the other hand, I wonder why you'd want to change an existing user while what you describe you want to accomplish is simply to delete the existing use and create a new one, that's it. With this you will accomplish exactly what you describe in your second paragraph.
I understand, sometime begin too much technical prevents us to see the most simple solution to solve a problem lol
Cheers!
Andy -
Thanks for confirming, I kind of figured as much.
@micmc said:
I wonder why you'd want to change an existing user while what you describe you want to accomplish is simply to delete the existing use and create a new one, that's it. With this you will accomplish exactly what you describe in your second paragraph.
Mailbox, not user. And mostly because it'd be much easier if we could simply edit the existing mailbox name than having to follow the steps below:
- Create a new mailbox, link it to my user account so I know the credentials
- Link the "old" mailbox to my user account so I know the credentials
- Install imapsync on my workstation
- Run imapsync
- Login to verify the data and changes made from step 4 above
- Change back the linked user to the original user on the new mailbox
- Delete old mailbox
The steps above are what I will follow and I had mentioned as the "workaround" to achieve the use-case, I just was curious if there was a quicker & easier method available.
the most simple solution
I agree it's "simple" to a degree but there are also repercussions to the process above. For example: I will need to temporarily consume double the amount of disk space used by that mailbox until I can later delete it after step 5 above. That may sound like a non-issue but I live in Canada where disk space isn't exactly "cheap", and due to limitations in on-server storage I use external block storage for storing emails in Cloudron which has it's own overhead if I want to expand the disk size. As some mailbox sizes are large at 8-10+ GB in size, that's not always an easy situation to have that much free at all times.
So as you can see, it's not truly "simple" in all environments / cases. I appreciate the confirmation though. I can do with the workaround steps I listed above, I just had hoped for a cleaner method but I guess that doesn't exist yet (and understandably so).
-
@d19dotca said in Changing an existing mailbox name / email address:
Thanks for confirming, I kind of figured as much.
And yeah, the process you describe is the same painful process we've to go through, when requested which is not often indeed, for almost 25y now.
I appreciate the confirmation though. I can do with the workaround steps I listed above, I just had hoped for a cleaner method but I guess that doesn't exist yet (and understandably so).
I agree there should be an easier way, however I guess there might have not been enough need over time to invent a simpler process apparently.
Andy
-
@d19dotca So, you simply want to change the email address and also preserve the emails is it? You can do this:
- Create new mailbox
- you can simply move the mailbox directory in
/home/yellowtent/boxdata/mail/vmail/
. So, frommv foo@example.com bar@example.com
inside that directory. you can also move the spam learning directory in/home/yellowtent/boxdata/mail/spamd
You should be able to now access the new mailbox with the previous emails. Later, you can delete the old mailbox as well.
One thing is the old mails will still have the old address as "To". So, while you can access the emails, you could hit into some strange issues when replying to those emails. I am not 100% sure (but it's really just a mail client thing).
-
@girish said in Changing an existing mailbox name / email address:
You can do this:
- Create new mailbox
- you can simply move the mailbox directory in
/home/yellowtent/boxdata/mail/vmail/
. So, frommv foo@example.com bar@example.com
inside that directory. you can also move the spam learning directory in/home/yellowtent/boxdata/mail/spamd
You should be able to now access the new mailbox with the previous emails. Later, you can delete the old mailbox as well.
One thing is the old mails will still have the old address as "To". So, while you can access the emails, you could hit into some strange issues when replying to those emails. I am not 100% sure (but it's really just a mail client thing).
Ah of course, I didn't even really consider that. I guess those steps would have saved me from needing to use imapsync, haha. But that's okay, I did it all last night for them already with the steps I documented earlier. I'll keep this in mind though for the future if I'm requested to do it again. Thank you for the idea!
I think it's probably a good idea to add a "Disable mailbox" flag just like we have for users.
Yes please, that'd be useful!