-1

I have 2 domain names in my server :

domain1.com is the main domain that I am using as a nameserver (ns1.domain1.com and ns2.domain1.com)

and

domain2.com (I am using it to host my web application and sending emails for my web application using this address contact@domain2.com)

I have two different IP address :

Domain1.com : 1.1.1.1 and domain2.com : 2.2.2.2

and I am using google apps account for both domain1.com and domain2.com like contact@domain1.com and contact@domain2.com ...

and I need to send email from my web app (domain2.com) using php send() function in my web server (my server hostname is domain1.com)

to prevent my newsletter emails from being spammed I used SPF records and PTR records as the following :

domain1.com :

PTR records :

$TTL    86400

@   IN  SOA domain1.com. root.domain1.com. (
            1375271601  ; Serial
            10800   ; Refresh
            3600    ; Retry
            604800  ; Expire
            10800 ) ; Minimum

         IN NS   domain1.com.
1        IN PTR  domain1.com.
1        IN PTR  domain1.com.

and SPF record

@   IN  TXT "v=spf1 ipv4:1.1.1.1  include:_spf.google.com include:mail.domain1.com include:domain1.com ~all"

domain2.com

PTR records :

$TTL    86400

@   IN  SOA domain1.com. root.domain1.com. (
            1375271601  ; Serial
            10800   ; Refresh
            3600    ; Retry
            604800  ; Expire
            10800 ) ; Minimum

         IN NS   domain1.com.
2        IN PTR  domain1.com.
2        IN PTR  domain1.com.

and SPF record

@   IN  TXT "v=spf1 ipv4:2.2.2.2  include:_spf.google.com include:mail.domain2.com include:domain2.com ~all"

Is these config are correct ?

saad
  • 9
  • 2
  • It would be easiest if you used Google's mail servers to send your E-Mails, instead of using your own server. I'm not sure if there are facilities available from Google for that though. – Tero Kilkanen Aug 14 '14 at 16:46

1 Answers1

1

No, that's not correct at all. domain.com does not need PTR records, those go in the relevant .in-addr.arpa zone at your ISP. Your SPF records are also not correct, you don't need include:mail.domain.com. And the google includes are only needed if you send mail via google (gmail, google apps).

Dennis Kaarsemaker
  • 19,277
  • 2
  • 44
  • 70