I backed up an account and restored it to a different server so as not to effect the user’s account.
One of the email accounts is owned by user username.domain (no tld)
I edited passwd and shadow copying the username.domain line and changed username.domain to username-domain.tld and username@domain.tld. All good.
Looking at the users under this domain, I then had a new user showing which was username@domain.tld like I would expect. However, it was not enabled and showed no email. I enabled it and it then showed email while username.domain was automatically disabled. Postfix virtusers updated correctly when I enabled the username@domain.tld email account showing both of the new names added to passwd and shadow.
Before enabling that new @ account, I set up an account in an email client and connected as expected. After enabling the @ user, the email client refused to connect. Error logs show dovecot auth failures.
Now, since I cannot seem to keep username.domain active and since the owner of that email directory is username.domain, this seems to be a correct response from the server.
If I change the login back to username.domain while the mailbox is not enabled, the email client login fails as there is no entry for it in Postfix virt tables.
I’m just not seeing a way to have username.domain and username-domain.tld and username@domain.tld all functioning at the same time. I am left believing this is a behind the scenes bit of coding to make it work and it only works with - in combo with @. That makes sense to me as well. I did not add username.domain to the virt table as I would think if it even works, it would leave the account in a very odd state or more fragile and confusing in the future.
Also of interest, I can’t chown the username.domain directory to be owned by username-domain.tld nor username@domain.tld. I get no errors when issues the command, but ls -al shows it still belongs to username.domain.
For the other comments. I don’t care how hard it is for me to perform the work. I am simply trying to prevent the inconvenience to my customers who have to reconfigure all of their email clients.
Joe,
Positively more than one email client now requires the username to be the email address. The latest Outlook seems to have removed any way to override that. I’ve been on those computers and looked in both the standard email setup area and the personalities area and it forced email address as username. Well, maybe I could manually edit the .ost or something. But it is not available through any interface. Also the mail app that shipped with my Android phone had no ability to set a username. It simply used the email address… no option to override. I installed a different email app.
Thanks for all the help on this. It took magic to make this work at all… an alias so to speak. Janie had to decide on what the username format should be for the @ address. It seems that is hardcoded somewhere and I respect that decision and the difficulty with changing or expanding that.