New email accounts do not follow setting in Server Template (mail for domain)

Recently when I add an email account, the username is alway created as username instead of username@domain.

I have checked and rechecked the Server Template, and tried to create a new one as well. The email only user is always created as username still.

Turns out I had to make a change in Virtualmin Configuration to always include domain in username, instead of just to avoid a clash.