Multiple domains, email server & DNS settings.

Hello everyone,

I recently got myself a VPS to which I will be initially hosting 2 domains and maybe more in the future.

I believe I have everything figured out and even running nginx without problems.

I won’t be using my VPS as a nameserver since I believe it’s best to have redundacy and have opted for the services provided by Pointhq. It saves me a bit of memory aswell not having to run BIND.

Anyway on to my question,

The hostname on the VPS is set in the form of vpsmachine.mydomain1.com if it is of any importance.

I have already added the virtual hosts in virtualmin for both my domains and I’m currently waiting for the DNS A entries to propagate to find out if everything works but I skipped adding the MX records until I’m sure everything is set-up.

I have been used in adding MX records in the form of “mail.mydomain1.com” & “mail.mydomain2.com” when using web-hosting providers.

What should my MX records be in my case with the VPS? I want both domains to be able to receive email in their respective domains.

E.g. address1@mydomain1.com & address2@mydomain2.com

I’ve been going through the postfix section in webmin and found this in "What domains to receive mail for: " which is located in the “General Settings” of postfix server.:

vpsmachine.mydomain1.com, localhost.mydomain1.com, , localhost .

It appears that the mail server in my MX records for BOTH domains should be: vpsmachine.mydomain1.com and that Postfix will manage the delivery to the virtual domains?

Am I correct?

Sorry for the long question but I searched both in the forums and in google for a similar problem to mine and found nothing relevant.

Thanks in advance for any answers!

Howdy:
As far as your MX records, you should have something that looks like:
mail.mydomain1.com
And a value of say 5 or 10 attached to that.
As an example, for my system, mail.keithnet.us has a value of 5, and note that mail.keithnet.us exists also as an A record in DNS.
Does that help?
obviously, what priority value you assign to your MX entry is up to you.
I haven’t adjusted it, because I haven’t needed to.
But you might find for some reason that adjusting the priority helps.
I’ve sort of forgot how the priority works since I don’t do a lot of tweeking of stuff like this, and I haven’t ran mail systems for years on end. LOL
Figured I’d try to help answer your question seeing as nobody has replied yet.

Does any of that help?

Also, as it’s been more than a day now, how are things working on your end from the DNS perspective?

Hey khinton,

Thanks for taking the time to answer.

What you’re saying sounds correct, so I’ll try adding those entries(MX & A to mail.mydomain.com) to the DNS. As for the mail.mydomain1.com did you need to setup any server templates or create a new virtual server with mail.keithnet.us? This is where I’m scratching my head. Does postfix provide the mail.whatever.com sub-domain or if it needs to be specially created. Excuse my ignorance as well but for the exact same reasons as you I lack in-depth knowledge of DNS-workings.

As for the MX priority it is used when you have multiple mail servers to choose which one you want to be in the front line. I remember reading in the respective RFC (forgive me for not providing a link it’s been a while) that it is sometimes wrongly assumed that priority is a method to enter backup mail servers.

A few years ago, using a low MX priority for your main mail server was useful because spam wouldn’t reach it (it would hit the high priority entry which could be none-existant). But nowadays spam engines target the lowest priority for the above reason and due to the fact that most of the times lowest priority servers are ill-configured.

On topic again, the nameserver change seems to have been succesfully received around most of the world and the DNS entries are now live and correctly pointing to the VPS, which means as far as the virtual hosting setup of virtualmin everything works great.

Hi:
No. When I created the default Virtual server for keithnet.us, mail.keithnet.us as well as an mx record were created as part of the DNS templates.
Hope this helps.

Please cal, or email me your phone number

I am looking for remote tech person

Alex Lech Bajan
Principal
RAQport Inc.
2004 North Monroe Street
Arlington Virginia 22207
703-528-0114 voice
703-652-0993 voice 2
800-695-6200 toll free
alex@raqport.com
http://raqport.com

I checked out your DNS records here http://www.unlocktheinbox.com/dnslookup/spf/keithnet.us/ it looks like you got everything set up correctly.

You can further test your configuration by sending an email to “mailtest@unlocktheinbox.com”, it will auto-respond, letting you know if you have everything set up correctly.