Change the Mailbox name suffix

Hi, recently I renamed a virtual server from old.tld to new.tld. When looking at the Edit Virtual Server form > Configurable settings I still see old.tld used as Mailbox name suffix.

I do want to change it to new.tld because I need to create old.tld as Server Alias to new.tld.

When trying I get the error:
Failed to create virtual server : The username prefix old.tld is already in use by new.tld

Any idea how to change the Mailbox name suffix?

TIA
Bernhard

Hi there,

Hrm, I’m not sure about the best way to correct that.

I think that might be a Jamie question :slight_smile: I’d recommend filing a request in the bugs and issues tracker below.
-Eric

Yeah, that’s kind of bug-like, but there are good reasons it is the way it is (it’d be pretty much impossible to safely change it automatically, because so many things outside of Virtualmin’s control and domain of knowledge could rely on it–stuff like application configuration, etc., also, renaming databases in MySQL is deeply non-trivial–requiring a dump/restore, and downtime).

I’m bet it is. Sounds I better do it by deleting old.tld completely and create new.tld instead of rename old.tld to new.tld? That, by the way, would make the rename domain name feature more or less useless, wouldn’t it?

Anyway, I filed a bug report. If I could at least some advise where to change the Mailbox name suffix manually would be very helpful. Meanwhile I grep through my system :slight_smile:

I'm bet it is.
Sorry, I meant: I bet it is not a trivial task to rename a domain.

Looks like I got it fixed by editing the corresponding virtual server file in /etc/webmin/virtual-server/domains. The "prefix" value still contained old.tld.

Additional I had to add all Email address like xyz@new.tld to /etc/postfix/virtual like this:

xyz@new.tld xyz-new.tld

(I’m using the @ in email user names)

Running "postmap /etc/postfix/virtual" activated the email addresses.

I also deleted and recreated other alias servers of new.tld which existed for old.tld too.

Meanwhile Jamie answered my bug report: I just forgot to set ‘Rename mail / FTP users too?’ to ‘Yes’ when renaming the domain :frowning:

Because I aready did the renaming he recommends:

  1. Rename it back to gruss-konzept.de, then rename to avie-art.de with the user rename option set to Yes.

  2. Delete all the users, change the prefix on the ‘Edit virtual Server’ page, then re-create the users.

Option 2 only works if the mail users don’t have any email that you would mind losing though.

(Only do 1) OR do 2) of course…)