Discover Centmin Mod today
Register Now

DNS Email GMAIL won't accept ANY emails from my server IP6 rDNS PTR issue?

Discussion in 'Domains, DNS, Email & SSL Certificates' started by johnnyc, Mar 17, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:47 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  2. johnnyc

    johnnyc Member

    41
    2
    8
    Mar 23, 2015
    Ratings:
    +2
    Local Time:
    12:47 AM
    I know that the SPF, DMAR, PTR DNS records for the DOMAIN names are fine... but you did shed some light and bring to question, is the HOSTNAME records the entire problem?

    Which server should those records be on for the hostname? Should be on the server that actually houses the cyberanonymous.net main domain (like that one server have 10 different sets of records for each of the server1-10 VPS), or should be on the individual server4 for example (have a cyberanonymous.net NSD (Option 3 menu centmin) then add records to /etc/nsd/master/cyberanonymous.zone for server4 MX records?
     
  3. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:47 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    The hostname of the server sending the emails needs those DNS records so that is usually root @ host.domain.com so host.domain.com needs the DNS records. Hence why Getting Started Guide Step 1 requires working valid main server hostname DNS setup as the first step and why addons/opendkim.sh was created. You also need them for each sending @domain.com usually done via 3rd party email providers.
     
    Last edited: Mar 25, 2017
  4. johnnyc

    johnnyc Member

    41
    2
    8
    Mar 23, 2015
    Ratings:
    +2
    Local Time:
    12:47 AM
    Update, out of the 10 VPS, and the three providers, I see 1 of these 3 providers actually works to Gmail. Meaning I have 2 vPS with them that email works flawlessly, and my other 8 VPS server side send gmail emails do not work.
     
  5. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:47 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Strange it's really down to properly how you switched from Postfix to Sendmail on each server.

    I wrote up a general guide at https://community.centminmod.com/posts/46858/ which outlines the DNS and Centmin Mod main hostname setups process. Ensure everything is in order for those.
     
  6. johnnyc

    johnnyc Member

    41
    2
    8
    Mar 23, 2015
    Ratings:
    +2
    Local Time:
    12:47 AM
    Appreciate all your help, I'm reading this right now. took the weekend off.

    I DID do some research on the weekend....

    From what I've read, You DO need SUBDOMAIN TXT (SPF) & MX records for each subdomain (in my case, HOSTNAME's of all 10 server0-9.cyberanonymous.net). This is from the official SPF Source.

    SPF: FAQ/The demon question


    If I can get PROPER MX AND SPF Records generated and WORKING for all 10 server1.cyberanonymous.net server2.cyberanonymous.net, then I can get a 9 of 10 Mail-test score, which is all I want. I don't want to go through the trouble of OPENDKIM for all 10 Servers, and all 260 domain name extensions.

    I used SPF Wizard - SPF Generator DNS tool: to generate my SPF Record for Server2.cyberanonymous.net, which makes sense, I put it in my /etc/nsd/master/Cyberanonymous.net.zone on BOTH the MAIN server, and the server2 (which I added cyberanonymous.net domain to server2 as well (not sure if it's needed?)), rebuild nsd, reloaded, restarted, still dig command returns no result for TXT records on server2.cyberanonymous.net
     
  7. johnnyc

    johnnyc Member

    41
    2
    8
    Mar 23, 2015
    Ratings:
    +2
    Local Time:
    12:47 AM
    On the Getting started Guide:

    Getting Started Guide - CentminMod.com LEMP Nginx web stack for CentOS

    To cover the main hostname's sent email via Postfix, you may also want to add a SPF/TXT DNS record for this main hostname i.e. hostname.newdomain.com with simply just the following:

    "v=spf1 a ~all"



    WHERE exactly do I add that SPF record?

    On hostname SERVER2.cyberanonymous.net (cyberanonymous.net is on SERVER0, not server2.)
    /etc/nsd/master/cyberanonymous.net,zone ? (Should I have even created this one?)
    /etc/nsd/master/server1.cyberanonymous.net.zone ? (Should I have even created this one?)
     
  8. johnnyc

    johnnyc Member

    41
    2
    8
    Mar 23, 2015
    Ratings:
    +2
    Local Time:
    12:47 AM
    For the life of me, I cannot figure this out.
    This is my /etc/nsd/master/cyberanonymous.net.zone on SERVER0 (Where the main cyberanonymous.net and ns1-2 resolve to)

    server0 14400 IN A 23.94.249.236
    server1 14400 IN A 45.58.52.126
    server2 14400 IN A 104.223.109.116


    ; MX Record
    cyberanonymous.net. 14400 IN MX 10 mail
    server1.cyberanonymous.net. 14400 IN MX 12 server1
    server2.cyberanonymous.net. 14400 IN MX 12 server2
    *. 14400 IN MX 15 server1


    ; TXT Record (for SPF)
    cyberanonymous.net. 14400 IN TXT "v=spf1 a mx ptr ip4:23.94.249.236 ?all"
    server1.cyberanonymous.net. IN TXT "v=spf1 mx a ptr ?all"
    server2.cyberanonymous.net. IN TXT "v=spf1 mx a ptr ?all"


    This SHOULD work from all the SPF and MX generators and calculators I've used. For the life of me I cannot figure out WHY this doesn't work!
     
  9. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:47 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    no that refers to SPF records adding MX inclusion IF and only IF you have MX records on subdomains. Not that subdomains require MX records.

    SPF records are TXT DNS records, so that gets added to your hostname.newdomain.com TXT DNS record with your DNS provider
     
  10. johnnyc

    johnnyc Member

    41
    2
    8
    Mar 23, 2015
    Ratings:
    +2
    Local Time:
    12:47 AM

    So if I'm self hosted using NSD on my centmin server... that should be manually entered in the /etc/nsd/master/ folder, in the cyberanonymous.net.zone file, or server1.cyberanonymous.net.zone file (I created both because I don't know which one is right, but neither & both still dont work)
     
  11. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:47 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    should only be in cyberanonymous.net.zone file
     
  12. johnnyc

    johnnyc Member

    41
    2
    8
    Mar 23, 2015
    Ratings:
    +2
    Local Time:
    12:47 AM
    exact copy of server1.cyberanonymous.net

    $TTL 14400
    @ IN SOA ns1.cyberanonymous.net. hostmaster.cyberanonymous.net. (
    2010093000
    14400
    3600
    1209600
    86400 )

    ; Nameservers
    cyberanonymous.net. 14400 IN NS ns1.cyberanonymous.net.
    cyberanonymous.net. 14400 IN NS ns2.cyberanonymous.net.

    cyberanonymous.net. 14400 IN AAAA 2602:ffc5:1f::1f:d19e
    ns1 14400 IN AAAA 2602:ffc5:1f::1f:d19e
    ns2 14400 IN AAAA 2602:ffc5:1f::1f:d19e
    server1 14400 IN AAAA 2602:ffc5:1f::1f:d19e
    @ 14400 IN AAAA 2602:ffc5:1f::1f:d19e
    * 14400 IN AAAA 2602:ffc5:1f::1f:d19e

    ; A Records
    cyberanonymous.net. 14400 IN A 45.58.52.126
    ftp 14400 IN A 45.58.52.126
    localhost 14400 IN A 127.0.0.1
    mail 14400 IN A 45.58.52.126
    ns1 14400 IN A 45.58.52.126
    ns2 14400 IN A 45.58.52.126
    pop 14400 IN A 45.58.52.126
    smtp 14400 IN A 45.58.52.126
    www 14400 IN A 45.58.52.126
    server1 14400 IN A 45.58.52.126
    * 14400 IN A 45.58.52.126

    e.9.1.d.f.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.f.1.0.0.5.c.f.f.2.0.6.2.ip6.arpa. 14400 IN PTR server1.cyberanonymous.net.

    ; MX Record
    cyberanonymous.net. 14400 IN MX 10 mail
    cyberanonymous.net. 14400 IN MX 15 server1.cyberanonymous.net.
    server1.cyberanonymous.net. 14400 IN MX 12 mail

    ; TXT Record (for SPF)
    cyberanonymous.net. 14400 IN TXT "v=spf1 a mx ptr ip4:45.58.52.126 ip6:2602:ffc5:1f::1f:d19e ?all"
    server1.cyberanonymous.net. IN TXT "v=spf1 mx a ptr ip4:45.58.52.126 ?all"



    I have now deleted /etc/nsd/master/server1.cyberanonymous.net.zone per you inferred don't need it.
     
  13. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:47 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    For posting code you might want to use CODE tags for code How to use forum BBCODE code tags :)

    also try incrementing SOA number from 2010093000 to say 2017032501 each time you edit NSD zone files

    did you restart nsd service after changes ?
    Code (Text):
    service nsd restart
    
     
  14. johnnyc

    johnnyc Member

    41
    2
    8
    Mar 23, 2015
    Ratings:
    +2
    Local Time:
    12:47 AM
    Yes, I service nsd rebuild, service nsd reload, then service nsd restart, all three in that order. Also incremented my

    "2010093000" in the below: every time I edit a zone, I was taught to increase that by at least one number

    $TTL 14400
    @ IN SOA ns1.cyberanonymous.net. hostmaster.cyberanonymous.net. (
    2010093000
    14400
    3600
    1209600
    86400 )
     
  15. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:47 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  16. johnnyc

    johnnyc Member

    41
    2
    8
    Mar 23, 2015
    Ratings:
    +2
    Local Time:
    12:47 AM
    My TXT records have been that way since last week Thursday/Friday.

    Shouldn't running : dig +short TXT server1.cyberanonymous.net on the same server after restarting NSD, be LIVE results ?

    Still shows no results.


    https://www.whatsmydns.net/#TXT/server1.cyberanonymous.net

    shows all red x's... It only shows Green for the A record.
     
  17. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:47 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
  18. johnnyc

    johnnyc Member

    41
    2
    8
    Mar 23, 2015
    Ratings:
    +2
    Local Time:
    12:47 AM
    Do you think it's probably because this is a very old version of NSD, maybe this original version of NSD does not support subdomain TXT or MX records at all? Maybe it only supports subdomain A records?


    I still can't rack my brain around it. I don't want to use third party DNS for only that reason

    Is there any upgrade to NSD3 in the new beta 09 version?
     
  19. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:47 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    NSD worked for me when I tested but it's not a priority as I highly recommend 3rd party DNS for security, uptime and less resource usage and in some cases like yours less headaches. No planned NSD upgrades are in the immediate horizon again due to recommendation for 3rd party DNS usage :)