virtualmin modify-user possible issue

Using the --newuser command fails to do two things to make a changed account a functional email account when switching from user.account postfix style to user@example.com style.

It doesn't add a user-domain style user to /etc/passwd It doesn't correctly then enter the alias in /etc/postfix/virtual

it enters: user@example.com user\@example.com

It should enter: user@example.com user-example.com

Background: I was using the --newuser function to changeaccounts to an alternate name and then back to update them to the user@example.com style that was changed in the template after initial virtual domain and mail account creation.

More info in the thread here: https://www.virtualmin.com/node/15708#comment-68932

Status: 
Closed (works as designed)

Comments

There is a bug here, but it is actually in the opposite "direction" - virtualmin shouldn't be trying to change the username format at all when renaming, which as you can see doesn't work properly. I will fix that in the next release.

The only supported behavior is to delete and then re-create the mailbox.

Thanks Jamie!

The delete and recreate mail account in testing left me without the ability to read mail that was in the old account and attempting to get files from archived Maildir into the recreated acct failed to be readable.

I found the best workaround was changing the username twice once away and then back to the original and then manually adding the user-example.com entries in /etc/passwd and cleaning up the funkyness in /etc/postfix/virtual.

I wouldn't have had to do any of this if our team had bothered to set the template right to use @ before creating 200 mail accounts and then immediately pointing dns at the box without testing :D

Thanks again for making an awesome app.

Just a heads up I am the director of operations at a managed services provider in Portland with about 100K domains on our network ranging from small single site accounts to major enterprise deployments. We offer Webmin/Virtualmin as an option on our checkout page and I always try to steer the clients to your product vs cPanel and the more extensive to your paid version at your site.

If you have anything we can beta test for you in our labs just ask!

Cameron Smith Network Redux

If you want to preserve mail, the only supported method currently is to copy it first, delete the user, re-create and then copy the mail file / directory back.

Or you could rename the user manually in /etc/passwd , /etc/shadow and /etc/postfix/virtual - this will work fine.

Thanks for using Virtualmin!