hello, i have a question and i am not sure if it is possible or not. what i would like to do is integrate webmail into my webmin / virtualmin install so that instead of going to mydomain.com/webmail/ i can just go to mydomain.com:10000/webmail/ and use a link in the webmin navbar, the reason i want to do this is because so that mail users can have that "piece of mind" of knowing that the emails they are reading are through a secure connection provided by their control panel instead of a regular HTTP connection provided by apache. If this is possable please provide me on how to do this i would like have this powered by the webmin http server instead of the regular apache server
Usermin is the recommended webmail client for Virtualmin systems, and it also runs on a secure port (and as the user logging in). You can reach it at:
i.e. port 20000 instead of port 10000. You could setup a redirect, if your users expect /webmail to lead to mail.
The more I’ve used Usermin, the more I like it, but it’s a trick to get customers to type in 20000 each time, so a redirect would be a real treat for them. Can this be setup easily using the existing apache modules? And can this be done per domain as well as globally?
The other stumbling block is the certificate warning that IE7 gives when I try to open https on usermin. I guess the only way around this is paying a lot to get a signed certificate, but then I’d have to get a wildcard certificate too, right?
I covered this easily by creating a a landing page then using the refresh META command with a redirect address that leads right to the login
A wildcard only works for subdomains, so even that wouldn’t do what you describe. You’d pretty much need for http://www.domain.tld/webmail to redirect to https://www.hostingco.tld:20000 (which presumably has a valid cert), if you don’t want the warning and you don’t have a cert and IP address for every domain. If your customers are worth a reasonable amount to you (I mean, if they’re premium customers that are paying more than a few bucks per month) and you have the IPs to spare, you could buy them all GoDaddy chained certs (though I’m not actually sure miniserv supports chained certs on multiple IPs…I’d have to look into that one).
As Dan mentioned, redirecting it probably the way to go.
And you can do it in your Server Templates in the “Apache website” section. I’ve debated making it a default…but we have so many Squirrelmail and IMP holdouts, that I believe I’d cause a riot if I defaulted Virtualmin to setting up a /webmail alias to Usermin. Maybe once the new theme is released and Usermin becomes, bar none, the most kickass webmail client around (OK, maybe Gmail will still be better, though we’ll keep working on it…Jamie’s got some nice new indexing code going in…but, I digress…).
So, to make a redirect rule, you could add something like:
Redirect /webmail https://www.hostingco.tld:20000
Likewise, you’d need to add this directive to any existing virtual servers (Server Templates only apply to newly created virtual servers).
Dan’s idea works too. You could drop that directory into skel. The benefit (or problem, depending on how you see it) there is that if the user hates Usermin, they could install their own Squirrel or IMP on that path and it would overwrite the skel included path making the Usermin redirect disappear.
I’m not against this, but my experience is that this will cause trouble with the FROM: addresses. The way it’s set up now, usermin grabs the FROM addresses from the URL, so if users were redirected to the main site, then their FROM addresses would be wrong when sending.
My solution at this point was to disable SSL on usermin, which is, obviously, not a good solution.
I just noticed that this is true. The FROM line really is taken from the URL even though I have set "From real hostname" in Usermin config. This should be fixed quickly.
I just figured out what real hostname means. Sorry. Obviously it means the machine name. But still there has to better solution for this and that should be number one priority. This problem effects everyone and effectively cripples the whole Usermin.
At least the user should have on option to save a FROM address that one wants to use when composing mails. Just like REPLY to has. But still this address should be automatically sane in the first place. I can’t believe this is so hard issue to solve.
In Usermin FAQ this is also covered but the solution is very clumsy. I really cannot understand why this domain part cannot be taken from the virtual maps or webmin conf files. Most people I think are using the user.domain username style anyway. And if they are using email address as username even simpler. The only difference is the domain admin email firstname.lastname@example.org because it has username domain. But still this looks like something even I could do
Sorry for this multiple posting. In my Usermin conf I had /etc/mail/generics set to “From: address mapping file” as default. But I could not find that file on the server. It doesn’t exist. Am I supposed to have that generics file generated automatically?
The “From: address mapping file” should be /etc/postfix/virtual and the “Address mapping file format” should be “Address to username (virtusertable)”. The fact that it wasn’t setup by default was a bug in the installer (that I believe is now fixed).
I’ve added this to both the FAQ (actually updated the FAQ…there were instructions before but they were stupid and unprecise…they didn’t tell you specifically which files to use, on the assumption that folks might want to use sendmail instead of postfix), and the Troubleshooting Common Problems wiki page.