Hm, I still don’t really get it. “admin” is the administrative username for the domain? Where exactly have you used “user1.admin” for that “additional user”? It sounds rather odd to me to name a user like that. And where exactly have you set up “user1@mydomain.com” as email address?
Well, the “user.domain” format is the default used by Virtualmin. That makes Postfix a little happier, but can confuse things like Squirrelmail
I suspect what’s happening here is just that Squirrelmail doesn’t know how to convert the login name being used to access Squirrelmail into an actual email address.
What you’d likely need to do is just set a From address in Squirrelmail to your actual email address, rather than allowing it to fall back to the default.
Eric, he wrote that Squirrel uses “user1.admin” as username part of the from address, and I’m wondering where the “admin” thing is coming from. Why would the username of the administrative user be part of the email address? I’ve never seen that.
Indeed setting the correct name in squirrel solves the issue, thx
@ Locuts
I did not consider the confusion that the term admin can bring, I try to explain
in Virtualmin whenever you create a new account you can set the user name (or call it account name) as you wish , admin will than be the name of the account , the same you see in /home/admin/ folder
in case of an account for a domain such as locutus.com the account name will be locutus ( in my case admin) all your files will be stored in /home/lucutus (in /home/admin in my case)
if you create a secondary user (user1) , virtaulmin will generate an internal username such as: user1.locutus the email will be user1@locutus.com
What then squirrel will use as From address (if you dont set it properly in squirrel itself ) will be : user1.locutus@locutus.com
I’m sorry, but I STILL don’t understand this issue. It seems to me that you are mixing up “administrative user” and “domain name”.
With “create a new account”, you mean “create a new domain / virtual server”, right? I’m assuming that, since you talk about “creating secondary users” too, which only makes sense in that case.
Virtualmin uses (part of) the domain as home directory name, and not the name of the administrative user. Files for “example.com” with admin “exampleadmin” will be put in “/home/example”, and not “/home/exampleadmin”. (Except you changed that behavior in the configuration, which I kinda doubt.)
When you create additional users for a domain, I’ve never seen Virtualmin include the administrative user as part of the new username; why would it do so? And why would it use the administrative username as DOMAIN NAME in the new email address?? This is totally confusing.
Locutus, you may have changed some defaults, which may be adding to the confusion
What he is describing is indeed the default Virtualmin behavior (though, I personally don’t use that default on my own system).
On a new server using the Virtualmin defaults, if you create a Virtual Server named “example.com”, you would end up with an admin user named “example”.
If you then go and create a new email user within that Virtual Server, with an address of me@example.com, the account name for that user would be “me.example”.
So the username is “me.example”, and it has an email address of me@example.com.
That behavior can be changed in the Server Templates – it’s in System Settings -> Server Templates -> Default -> Mail for Domain, and in there you can set the format for mail users.
On a new server using the Virtualmin defaults, if you create a Virtual Server named “example.com”, you would end up with an admin user named “example”.
This is the bit I was missing in the chain of logic here.
So to sum up: Virtualmin does not add the administrative username to newly created user accounts, but (by default) the first part of the domain name, which happens to be (by default) identical to the admin username.
Yes, indeed then new users would get usernames like “emailuser.firstdomainpart”, to which “fulldomain” is added to form “emailuser.firstdomainpart@fulldomain”. And indeed Squirrel would have no way of knowing that an “alias” (as per Postfix’ virtual domain table) is created to read “emailuser@fulldomain”, and would be using the user’s login name instead.
And lastly indeed, I also am using a non-default setting here; I have “emailuser@fulldomain” as username for email users, as opposed to “emailuser.firstdomainpart”. They use that to log in to Squirrel, and that is also their email address (which Squirrel then correctly derives from the login name).