Convert username format from 'username.domain' to 'username@domain.tld'

I have successfully imported a cPanel website with hundreds of e-mail accounts to Virtualmin. The problem is the uernames were converted into ‘username.domain’ format during the import. I know that it is completely ok and am aware of @-sign issue in usernames. However in my case the website owner finds new format quite odd to himself and badly wants to return to ‘username@domain.tld’ format that he and users of his website got used to use for many years.

Now I have configured templates so that any new accounts are created as ‘username@domain.tld’ , but the problem is with imported e-mails. There are many of them and they all contain important to the website owner data, so can’t be deleted and re-created. I have to find a way to rename existing accounts. I wonder is there any safe way to convert username format, has anyone done this before?

Howdy,

There’s unfortunately no quick and easy way to rename the accounts from within Virtualmin.

Something that should work, though, is to generate a backup of one or more Virtual Servers, delete the Virtual Server, and then re-import it.

When you re-import it, it should then create the accounts with the correct username format.

I know that’s less than ideal, but that’s better than just deleting and re-creating the accounts, as it preserves your data :slight_smile:

-Eric

Thanks for the idea, I’ll try that later today.