If I remember correctly, there used to be an “Alias, with own email” alias type that would allow you to create an alias server, but set up mailboxes separately for that domain.
I cannot find that option anymore. Is there something I’m missing or that is perhaps disabled?
At some point, we talked about it with @Jamie, and someone asked about having an “Edit Users” page alias. Jamie agreed to hide it completely because it was causing some permission issues.
In my case, I have a central CMS setup with a few sub-sites into one main CMS installation (currently as aliasses).
Up until now, all email has been handled externally through Office365 or Google Workspace. One of my clients came back to me that he wanted to depend less on the big tech coorperations and move his email to me.
At this point, this is quite hard to manage within Virtualmin; the only way to do this is to set up a parent (or sub server) server for the website and define the mailboxes there (that has to be setup as domain.com for email to work properly. I’ll have to edit the SSL configuration to ensure that that specific server only requests certificates for mail.domain.com.
Then I’ll have to manually add the domain.com as an alias to the apache configuration for the CMS server configuration. I’ll then edit the SSL configuration for the CMS server manually to include the alias I’ve added manually.
The procedure here works, but is quite fault sensitive. Almost every SSL refresh messes up the SSL configuration for the CMS site. So, since I remember seeing the “with own email” option at a certain point, that would have been a good resolution for this.
So, for your case (which is not at all uncommon), I think we should probably have a type of domain that reverses the “aliase with own email” idea, and instead is “email domain with alias website” type thing (that’s not a great name for it). Because I would assume most people doing this kind of deployment (where many domain websites are hosted in a single CMS installation) would want the email to be managed by the domain owner even while the website itself is mostly not touchable by the domain owner, because it’s a multitenant CMS.
That can be done with Server Templates in Virtualmin right now, I think, but it’s not super intuitive. Though, I don’t know if it could ever be both flexible and super intuitive, because there are a bunch of ways one might want to do something like this.
In the alias with own email or sub-server case, you can’t easily delegate mail management for a specific domain to the domain owner, so it doesn’t feel like a very good solution.
But, “not a very good solution” is better than “no reasonably easy solution”.
I think we need to hash out how this workflow ought to work and provide an easy path to do it. Technically it’s a simple thing; it’s a user and virtual map for the domain for email, and a ServerAlias in the “main” CMS domain, and making sure DNS points to the right place. But, doing that in Virtualmin is not intuitive at all, because we always assume a user gets their own VirtualHost. Alias with email is a solution, but not a great one.
@Ilia, you know I always want to simplify the UI, but getting rid of a use case that a lot of people are using without providing any alternative feels bad.
Thinking on it more, to do this with a wholly independent virtual server for email, I think you’d actually need a post-create script to setup the ServerAlias. And, I think the domain VirtualHost (“Apache Website” in the domain features) would need to be disabled, since the ServerAlias would conflict with an existing VirtualHost.
@Joe, well, I submitted it via PR, and it was a bug as it appears now.
@websmurf Sorry about that. Apply this patch, refresh the cache using dashboard (circular arrow) or the right slider (cog button), and see if the menu shows up again. Note that it might not appear if the mail for the alias isn’t enabled when the alias is created. I’m working on fixing it right now.
@Jamie, one question though. Do we want users created with the mail alias domain to be able to set a login shell other than /dev/null? Right now, they can set any shell, even for SSH.