# Generate my own 'Format for usernames that include domain'?

**URL:** <https://forum.virtualmin.com/t/generate-my-own-format-for-usernames-that-include-domain/35992>\
**Category:** Help! (Home for newbies)\
**Created:** [March 16, 2010, 3:37pm UTC](https://forum.virtualmin.com/t/generate-my-own-format-for-usernames-that-include-domain/35992 "2010-03-16T15:37:07Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcrengers](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/m/f05b48/32.png) [@marcrengers](https://forum.virtualmin.com/u/marcrengers)\
**Post date:** [March 16, 2010, 3:37pm UTC](https://forum.virtualmin.com/t/generate-my-own-format-for-usernames-that-include-domain/35992/1 "2010-03-16T15:37:07Z")

</div>

Hi all,

Is it possible to add another format that looks like user%domain.tld ? Because I have lots of accounts using this format. It’s a legacy of WebStar which we transfered to exim/courier and works ok for us.  
Now we need a new (faster and bigger) server and I don’t want our old system anymore. Virtualmin covers our demands just fine.

So if anyone knows how to add another format I would really like to know how also 🙂

Regards,

Marc Rengers

---

<div class="post-metadata">

**Author:** ![Jamie](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jamie/32/8589_2.png) [@Jamie](https://forum.virtualmin.com/u/Jamie)\
**Post date:** [March 16, 2010, 5:54pm UTC](https://forum.virtualmin.com/t/generate-my-own-format-for-usernames-that-include-domain/35992/2 "2010-03-16T17:54:36Z")

</div>

It isn’t really practical to allow support for arbitrary username formats, but I will add an option for user%domain in the user Virtualmin release. Whether this will actually work with all mail servers is another matter, as % can be a special character when it comes to email handling sometimes …

---

<div class="post-metadata">

**Author:** ![marcrengers](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/m/f05b48/32.png) [@marcrengers](https://forum.virtualmin.com/u/marcrengers)\
**Post date:** [March 16, 2010, 6:55pm UTC](https://forum.virtualmin.com/t/generate-my-own-format-for-usernames-that-include-domain/35992/3 "2010-03-16T18:55:50Z")

</div>

Thanks Jamie.

Am I right that I should use (when implemented) name%domain instead of name%domain.tld? Because the latter is what I’m after. Of course I can send all mail users an email explaining how they should change their accountname, but the last 10 years they never had to change anything when we changed our systems.

And yes, a % can be a special character, but I never had any problems with it all these years (lucky me)…

Regards,

Marc

---

<div class="post-metadata">

**Author:** ![Jamie](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jamie/32/8589_2.png) [@Jamie](https://forum.virtualmin.com/u/Jamie)\
**Post date:** [March 16, 2010, 8:11pm UTC](https://forum.virtualmin.com/t/generate-my-own-format-for-usernames-that-include-domain/35992/4 "2010-03-16T20:11:17Z")

</div>

You will be able to select if the thing after the % is the full domain name, or just the first part …

---

<div class="post-metadata">

**Author:** ![marcrengers](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/m/f05b48/32.png) [@marcrengers](https://forum.virtualmin.com/u/marcrengers)\
**Post date:** [March 16, 2010, 9:40pm UTC](https://forum.virtualmin.com/t/generate-my-own-format-for-usernames-that-include-domain/35992/5 "2010-03-16T21:40:15Z")

</div>

Very nice!

---

<div class="post-metadata">

**Author:** ![marcrengers](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/m/f05b48/32.png) [@marcrengers](https://forum.virtualmin.com/u/marcrengers)\
**Post date:** [April 27, 2010, 1:23pm UTC](https://forum.virtualmin.com/t/generate-my-own-format-for-usernames-that-include-domain/35992/6 "2010-04-27T13:23:35Z")

</div>

Hi Joe,

I would like to upgrade my servers to Virtualmin GPL, but I would like to do this with the user%domain.tld option. Can you give me an estimate when this would be ready?

It’s not a showstopper at the moment, the old server still works 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![Jamie](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jamie/32/8589_2.png) [@Jamie](https://forum.virtualmin.com/u/Jamie)\
**Post date:** [April 27, 2010, 4:58pm UTC](https://forum.virtualmin.com/t/generate-my-own-format-for-usernames-that-include-domain/35992/7 "2010-04-27T16:58:57Z")

</div>

I hope for this new version to be out today or tomorrow…

---

<div class="post-metadata">

**Author:** ![marcrengers](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/m/f05b48/32.png) [@marcrengers](https://forum.virtualmin.com/u/marcrengers)\
**Post date:** [May 1, 2010, 5:25am UTC](https://forum.virtualmin.com/t/generate-my-own-format-for-usernames-that-include-domain/35992/8 "2010-05-01T05:25:30Z")

</div>

Hi,

I think it’s me, but I can’t find how to select if the thing after the % is the full domain name, or just the first part… I have selected the user%domain in the Server Template and new users do get the right format, but without the TLD as in user%domain.tld

Could you elaborate on this?

Very ncie, this new option 🙂

Thanks,

Marc

---

<div class="post-metadata">

**Author:** ![Jamie](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jamie/32/8589_2.png) [@Jamie](https://forum.virtualmin.com/u/Jamie)\
**Post date:** [May 1, 2010, 5:52am UTC](https://forum.virtualmin.com/t/generate-my-own-format-for-usernames-that-include-domain/35992/9 "2010-05-01T05:52:39Z")

</div>

This can be configured at System Settings -\> Module Config -\> Defaults for new domains -\> Domain name style in username.

---

<div class="post-metadata">

**Author:** ![weekender73](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/w/4491bb/32.png) [@weekender73](https://forum.virtualmin.com/u/weekender73)\
**Post date:** [May 1, 2010, 10:41am UTC](https://forum.virtualmin.com/t/generate-my-own-format-for-usernames-that-include-domain/35992/10 "2010-05-01T10:41:19Z")

</div>

ok, that’s the feature i was waiting for as postfix is able to rewrite user%domain to user@domain - and this makes a lot of things easier for me (i had to start a secondary postfix instance for REAL and had the “normal” postfix only for “configuring” virtualmin to do the things right…)

but now i have 150 users i like to transform into the new form… i tried backup, changed the setting for new domains and restored the backups. but they used the user-domain format.

so, is there a way to have existing users changed - maybe something i can change in the backup file so they get re-created with the user%domain format?

thanks for help  
regards  
boris

---

<div class="post-metadata">

**Author:** ![Jamie](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jamie/32/8589_2.png) [@Jamie](https://forum.virtualmin.com/u/Jamie)\
**Post date:** [May 1, 2010, 8:22pm UTC](https://forum.virtualmin.com/t/generate-my-own-format-for-usernames-that-include-domain/35992/11 "2010-05-01T20:22:50Z")

</div>

There’s no easy way to change all existing users - however, you can rename them at Webmin -\> System -\> Users and Groups, but this would need to be done one by one.

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [April 30, 2020, 5:32am UTC](https://forum.virtualmin.com/t/generate-my-own-format-for-usernames-that-include-domain/35992/12 "2020-04-30T05:32:35Z")

</div>

Closed on April 30, 2020, 5:32am UTC


