Hi, I am hosting a subserver - only a subserver !!! - for a customer (demo.example.com). The www.example.com is not on my virtualmin server but resides on the server from my customer. So far no problem. In the nameservers from my ISP demo.example.com points (as an A-record) to my virtualminserver my.pub.lic.ip and example.com and the www (as an A-record) point to the public ip of the customer cust.pub.lic.ip. This works fine.
Now: I would like to set up a mailserver on my virtualminsystem for that customer. Normally the MX-record from my nameservers points to example.com and example.com points to my.pub.lic.ip. But in this case example.com points to cust.pub.lic.ip (this should stay this way).
As a solution: is it oke to create a subserver mail.example.com on my virtualminsystem and enable mail for that subserver and disable mail for the top-level server example.com? Then, in nameserver settings, make an MX record mail.example.com and let mail.example.com point (A-record) to my.pub.lic.ip.
Also I want mailadresses like user@example.com and not like user@mail.example.com. I hope you can help me on this very diificult situation.
An extra question regarding SSL certificates. Multiple certificates / SNI support works fine on Apache. Do they work on Dovecot 2.0 with shared IP addresses or only on a per IP based situation?
Comments
Submitted by andreychek on Thu, 04/04/2013 - 07:52 Comment #1
Howdy -- it's no problem for email to be hosted locally, and the website to be hosted elsewhere.
You can achieve that simply by making sure the DNS 'MX' record for that domain points to your server, and that the "Mail for Domain" feature is enabled.
You would keep the 'A' record for example.com pointing to the other server, it's just the 'MX' record that points to your server.
You don't need to make a sub-server -- you should be able to get it all working just by having the example.com Virtual Server.
Submitted by Alain Cox on Thu, 04/04/2013 - 08:43 Comment #2
Thank you for the quick respons!
But sorry, I don't see the light.
normally when everything is on my virtualminserver I do these settings (nameservers from my ISP): example..com -> A RECORD -> my.pub.lic.ip // www.example.com -> A RECORD -> my.pub.lic.ip // mx record value = example.com
now when only hosting a subdomain I have (this works) example..com -> A RECORD -> CUST.pub.lic.ip // www.example.com -> A RECORD -> CUST.pub.lic.ip // demo.example.com -> A RECORD -> MY.pub.lic.ip // but for the MX-record: if I set mx record value = example.com it points to CUST.pub.lic.ip and not to MY.pub.lic.ip?
Okay, I think the folowing should work: example..com -> A RECORD -> MY.pub.lic.ip // www.example.com -> A RECORD -> CUST.pub.lic.ip // demo.example.com -> A RECORD -> MY.pub.lic.ip // mx record value = example.com
But the client doesn't want me to change example.com to MY.pub.lic.ip. Maybe later but not for the moment. That is why I was thinking of a subserver mail.example.com server. I guess I don't see the trees in the wood :-(
Submitted by andreychek on Thu, 04/04/2013 - 08:55 Comment #3
Well, you can't host email for example.com using a sub-domain. If you have a sub-domain named mail.example.com, that domain could only have email accounts named user@mail.example.com.
So to do what you're asking, you'd need to add example.com to Virtualmin as a Virtual Server.
However, you can disable the "Apache Website" feature for that domain. You could then enable the Mail for Domain feature, and point the DNS MX record to your IP.
You would not set the DNS MX record for that domain to "example.com", which point's elsewhere, you would set it to your server's hostname or IP address.
Submitted by Alain Cox on Thu, 04/04/2013 - 11:13 Comment #4
I thought that MX record should point to a hostname and not to an IP address. But that is a detail, I am missing clearly the bigger picture. Sorry.
To set the MX to the server's hostname. My system has a FQDN which is something like srvr11.cox.eu and is for internal use. Should I choose that as a hostname and make that FQDN suitable for the internet or 'DNS-resolvable for the world?
And, if that is the way to go: let's suppose I would only use my virtualminserver as a mailserver for example.com (only for example.com and only as a mailserver). Would it be good and logical to take a FQDN like mail.example.com and make that resolvable via an A-record. (FQDN = hostname for MX-record)
Was I missing the relation between FQDN and hostname??? Or am i completely wrong? I am afraid it is the last one (me being wrong)
Thanks
Submitted by andreychek on Thu, 04/04/2013 - 12:14 Comment #5
The name you use for the MX record doesn't matter -- it just needs to resolve to your server's IP address.
If you don't want to use your hostname, you could create a new DNS 'A' record that points to your server... and then use that DNS record in your MX record.
The goal is just to make sure there's some sort of record that resolves to your server's IP address.
Submitted by Alain Cox on Thu, 04/04/2013 - 15:06 Comment #6
Okay, that is very clear!
"The goal is just to make sure there's some sort of record that resolves to your server's IP address" Is it really that simple? So it is dovecot or postfix which take care about the emailmessage from the moment the mail arrives at my server or is it a DNS zone on my server which tells my system where to put the mail.?
If I would just host email for 1 customer on 1 physical server: maybe it is better to install webmin in stead of Virtualmin?
Thank you very much for your help!
Alain
Submitted by andreychek on Thu, 04/04/2013 - 21:27 Comment #7
If I would just host email for 1 customer on 1 physical server: maybe it is better to install webmin in stead of Virtualmin?
Well, that's personal preference... but for me, I'd still prefer to use Virtualmin on a server with one customer (even if it's Virtualmin GPL).
Virtualmin handles quite a bit of configuration for you -- things you'd have to setup manually with Webmin.
Both Virtualmin Pro and GPL make it easy to add/remove email accounts, email aliases, forwarding, manage quotas, setup Spam and Virus scanning, and such.
Unless you wanted the support here in the Support Tracker, you probably wouldn't benefit much from Virtualmin Pro for an email server being used by one customer... Virtualmin GPL would likely work fine for you.
But we'd suggest Virtualmin GPL over just Webmin for that purpose :-)
Submitted by Alain Cox on Fri, 04/05/2013 - 18:44 Comment #8
Thanks for the support. I do have a VM Pro. I was just considering a GPL or Webmin to set up an extra server for a 'special' customer. Also: special thanks that I can set up and test virtualmin features on another Testserver with the same VM Pro license that I have on my production server! It proves again that the Virtualmin Pro License is worth the price! Thanks!