-1

I have a basic set up:

  • VPS
  • Mailserver
  • Domain Management

This is my first experience setting up both a VPS and a separate mail server.

My mail server won't receive emails.

DNS

A   mail.samholguin.co.uk.  79.170.40.147       3600     
A   samholguin.co.uk.       209.222.30.215      3600     
MX  mail.samholguin.co.uk.  mail.samholguin.co.uk.

209.222.30.215 = VPS

79.170.40.147 = Heart Internet

The issue appears to be my VPS is rejecting the emails, they don't even hit the mail server.

Are my records in order?

EDIT

Error message: Technical details of permanent failure: Google tried to deliver your message, but it was rejected by the server for the recipient domain samholguin.co.uk by samholguin.co.uk. [209.222.30.215].

Sam Holguin
  • 109
  • 4
  • 1
    Sam, the question really needs to be revised with the exact state of what you're after and what you've attempted so far. Frankly, the edit you made that includes Google's rejection message should be enough to resolve the issue...the problem is the configuration of the MTA itself. – Avery Payne Jul 24 '15 at 00:19

1 Answers1

7

Your domain hasn't actually got an MX record.

$ host -t mx samholguin.co.uk
samholguin.co.uk has no MX record

Without an MX record, mailers will fall back to trying to deliver to an address for the naked domain. That address is:

$ host samholguin.co.uk
samholguin.co.uk has address 209.222.30.215

An MX record for a subdomain would only apply if you were trying to deliver mail to the subdomain. So the MX record you posted is wrong, redundant and ignored anyway.

You just need to create an MX record for your naked domain which points to the hostname of the mail server. For example:

samholguin.co.uk. IN MX 10 mail.samholguin.co.uk.
Michael Hampton
  • 237,123
  • 42
  • 477
  • 940