Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Changing an existing mailbox name / email address

Changing an existing mailbox name / email address

Scheduled Pinned Locked Moved Solved Support
mail
8 Posts 3 Posters 987 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • d19dotcaD Offline
    d19dotcaD Offline
    d19dotca
    wrote on last edited by girish
    #1

    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.

    --
    Dustin Dauncey
    www.d19.ca

    micmcM girishG 2 Replies Last reply
    0
    • d19dotcaD d19dotca

      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.

      micmcM Offline
      micmcM Offline
      micmc
      wrote on last edited by
      #2

      @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

      Ignorance is not an excuse anymore!
      https://AutomateKit.com

      d19dotcaD 1 Reply Last reply
      0
      • micmcM micmc

        @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

        d19dotcaD Offline
        d19dotcaD Offline
        d19dotca
        wrote on last edited by d19dotca
        #3

        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:

        1. Create a new mailbox, link it to my user account so I know the credentials
        2. Link the "old" mailbox to my user account so I know the credentials
        3. Install imapsync on my workstation
        4. Run imapsync
        5. Login to verify the data and changes made from step 4 above
        6. Change back the linked user to the original user on the new mailbox
        7. 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).

        --
        Dustin Dauncey
        www.d19.ca

        micmcM 1 Reply Last reply
        1
        • d19dotcaD d19dotca

          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:

          1. Create a new mailbox, link it to my user account so I know the credentials
          2. Link the "old" mailbox to my user account so I know the credentials
          3. Install imapsync on my workstation
          4. Run imapsync
          5. Login to verify the data and changes made from step 4 above
          6. Change back the linked user to the original user on the new mailbox
          7. 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).

          micmcM Offline
          micmcM Offline
          micmc
          wrote on last edited by
          #4

          @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

          Ignorance is not an excuse anymore!
          https://AutomateKit.com

          1 Reply Last reply
          0
          • d19dotcaD d19dotca

            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.

            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #5

            @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, from mv 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).

            micmcM 1 Reply Last reply
            2
            • girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #6

              I think it's probably a good idea to add a "Disable mailbox" flag just like we have for users.

              d19dotcaD 1 Reply Last reply
              3
              • girishG girish

                I think it's probably a good idea to add a "Disable mailbox" flag just like we have for users.

                d19dotcaD Offline
                d19dotcaD Offline
                d19dotca
                wrote on last edited by
                #7

                @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, from mv 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! 🙂

                --
                Dustin Dauncey
                www.d19.ca

                1 Reply Last reply
                2
                • girishG girish

                  @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, from mv 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).

                  micmcM Offline
                  micmcM Offline
                  micmc
                  wrote on last edited by
                  #8

                  @girish WOW that greatly simplifies the process, that's great, still always amazed at how CR makes sysadmin soooo much easier 🙂

                  Ignorance is not an excuse anymore!
                  https://AutomateKit.com

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Bookmarks
                  • Search