title: Beginners Mail Server - Reverse DNS and SPF records
body: <h2>My Question</h2>
  
  <p>Hello All! Man, I love Stack Overflow :)</p>
  
  <p>Anyway, I am configuring my first ever Mail Server and want to <strong><em>do it right</em></strong>.</p>
  
  <p>The actual server is configured and working great so just need a bit of help with the rdns &amp; SFP public records of my domains. I have spent days researching but I am utterly confused so could do with a much appreciated hand.</p>
  
  <p>Using this sample data below:</p>
  
  <pre><code>Domains the mail server handles: example.com, example.co.uk, example.net
  Mail Server IP (For IMAP and SMTP): 123.123.123.123 for all domains
  Website Server IP (A Record / For Port 80 HTTP): 101.101.101.101 = .com, 102.102.102.102 = .co.uk, 103.103.103.103 = .net
  </code></pre>
  
  <p>How do I setup the records?</p>
  
  <h2>My best guesses</h2>
  
  <h1><em><strong>rdsn set correct so emails not rejected as spam</em></strong></h1>
  
  <p>Am I right in thinking that rdns is configured around the domains A records as follows:</p>
  
  <pre><code>rdns 101.101.101.101 = example.com
  rdns 102.102.102.102 = example.co.uk
  rdns 103.103.103.103 = example.net
  </code></pre>
  
  <p>And that the mail server on IP 123.123.123.123 can rdns to whatever my ISP decides? Or does the mail server IP rdsn <strong><em>have</em></strong> to point to one of the same IPs above (say 101.101.101.101 for the .com) in which case, whatabout the .co.uk and the .net? Is'nt RDNS set only one domain per IP? I've read a lot of conflicting information on all of this.</p>
  
  <h1><em><strong>spf set correct so emails not rejected as spam</em></strong></h1>
  
  <p>Do I set the below the same for each domain?</p>
  
  <pre><code>v=spf1 mx:example.com mx:example.co.uk mx:example.net  ~all
  </code></pre>
  
  <p>Or do I need a new domain which points straight to my mail server? Say:</p>
  
  <pre><code>mail.example.com (A Record / For Port 80 HTTP): 123.123.123.123
  </code></pre>
  
  <p>&amp; </p>
  
  <pre><code>v=spf1 mx:mail.example.com  ~all
  </code></pre>
  
  <p>Set as the SPF for example.com, example.co.uk and example.net?</p>
  
  <p>Any help on the above MUCH MUCH MUCH loved and appreciated. Thanks a lot. And ignore my best guesses if they are way off, only shown to display what I have learnt so far.</p>
  
  <p>Also please note I have full control over rdsn, dns and MX records and spf txt etc on all my domains and IPs so whatever needs doing - i'll do it! 
  Many thanks. :)</p>