Join the community today
Become a Member

Email error in PTR, mails goes to gmail Spam folder

Discussion in 'Domains, DNS, Email & SSL Certificates' started by kabantejay, Feb 23, 2016.

  1. kabantejay

    kabantejay New Member

    11
    0
    1
    Feb 19, 2016
    Ratings:
    +0
    Local Time:
    8:31 AM
    MariaDB 10
    hi, got a proglem:
    the domain is shurup.net.ua - works fine.

    my gmail 'original' mail says that:
    Return-Path: <nginx@shurup.exemple.com>
    Received: from shurup.exemple.com ([185.86.78.53])

    and i see еру same in console:
    # host shurup.net.ua
    shurup.net.ua has address 185.86.78.53

    # host 185.86.78.53
    53.78.86.185.in-addr.arpa domain name pointer shurup.exemple.com.

    my hoster says its my problem, i was looking everywhere, but in my vhost conf and other plase there is only shuruo.net.ua domain, what to do? please, how can i prevent gmail from going to spam?
    how to change PTR to point to right host in my centmin?
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,891
    6,907
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,401
    Local Time:
    4:31 PM
    Nginx 1.13.x
    MariaDB 5.5
    You have to do it from your web host end for PTR, usually web hosts using SolusVM have a section for PTR record or Linode has it in their own control panel. But is normal for out of box Centmin Mod to have server mail via postfix sent from hostname of server.

    But that probably only partially why it's going to spam. You want your web application to send via smtp and not from server postfix and make sure your domain has appropriate SPF text record in DNS. You can read up on old page at of what SPF record is Outlook Live Domains - CentminMod.com LEMP Nginx web stack for CentOS

    with correctly setup SPF record, your email received from server source will have something similar to
    Code:
    Received-SPF: pass (google.com: best guess record for domain of root@hostname.domain.com designates 111.111.111.111 as permitted sender) client-ip=111.111.111.111;
    where i would of had SPF text record similar to where 111.111.111.111 is server IP address
    Code (Text):
    v=spf1 a mx ip4:111.111.111.111 a:hostname.domain.com ~all

    And what you see in email source when you're missing SPF text record
    Code:
    Received-SPF: neutral (google.com: 222.222.222.222 is neither permitted nor denied by best guess record for domain of root@hostname.domain.com) client-ip=222.222.222.222;
     
    Last edited: Feb 23, 2016
  3. eva2000

    eva2000 Administrator Staff Member

    30,891
    6,907
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,401
    Local Time:
    4:31 PM
    Nginx 1.13.x
    MariaDB 5.5
  4. kabantejay

    kabantejay New Member

    11
    0
    1
    Feb 19, 2016
    Ratings:
    +0
    Local Time:
    8:31 AM
    MariaDB 10
    but now we send mails from another host (mail service "ukr.net" - its gmail-like service), my VPS sends mails via mail(), everything works fine, but we use xxxxx@ukr.net hot as a Sender-name...

    i added a TXT record in DNS manager to just allow using this host as allowed host in our mails like:
    "v=spf1 +a +mx include:ukr.net" - is it correct? why MXtoolbox steel not show it?
     
  5. kabantejay

    kabantejay New Member

    11
    0
    1
    Feb 19, 2016
    Ratings:
    +0
    Local Time:
    8:31 AM
    MariaDB 10
  6. eva2000

    eva2000 Administrator Staff Member

    30,891
    6,907
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,401
    Local Time:
    4:31 PM
    Nginx 1.13.x
    MariaDB 5.5
    You mean server mail() sent email doesn't go to spam or goes to spam ? Goes to which email services spam box ? Gmail ? Check your email source headers they will tell you why.

    Also add the IP address of the VPS in SPF txt record too.
     
  7. kabantejay

    kabantejay New Member

    11
    0
    1
    Feb 19, 2016
    Ratings:
    +0
    Local Time:
    8:31 AM
    MariaDB 10
    yes, we use standart php mail() and goes to spam
    here is my mail below..
    cant understand, why still shurup.exemple.com in mail, couse i changed server name both in hosting control panel and even in srver:
    #hostname shurup.net.ua
    but after reboot it changes to shurup.exemple.com again

    email data:
    Code:
                                                                                                                                                                                                                                                                  
    Delivered-To: kabantejay@gmail.com
    Received: by 10.107.144.132 with SMTP id s126csp1777478iod;
            Tue, 23 Feb 2016 04:27:26 -0800 (PST)
    X-Received: by 10.25.24.68 with SMTP id o65mr9734475lfi.156.1456230446746;
            Tue, 23 Feb 2016 04:27:26 -0800 (PST)
    Return-Path: <nginx@shurup.exemple.com>
    Received: from shurup.exemple.com (shurup.net.ua. [185.86.78.53])
            by mx.google.com with ESMTPS id b131si15701860lfe.209.2016.02.23.04.27.26
            for <kabantejay@gmail.com>
            (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
            Tue, 23 Feb 2016 04:27:26 -0800 (PST)
    Received-SPF: neutral (google.com: 185.86.78.53 is neither permitted nor denied by best guess record for domain of nginx@shurup.exemple.com) client-ip=185.86.78.53;
    Authentication-Results: mx.google.com;
           spf=neutral (google.com: 185.86.78.53 is neither permitted nor denied by best guess record for domain of nginx@shurup.exemple.com) smtp.mailfrom=nginx@shurup.exemple.com
    Received: by shurup.exemple.com (Postfix, from userid 500)
        id A56B77C43; Tue, 23 Feb 2016 12:27:09 +0000 (UTC)
    To: kabantejay@gmail.com
    Subject: =?UTF-8?B?U2h1cnVwIC0g0LjQvdGC0LXRgNC90LXRgiDQvNCw0LPQsNC30LjQvSDQvNC10LHQtdC70LggLSDQt9Cw0LrQsNC3IDQ1NzQ=?=
    MIME-Version: 1.0
    Date: Tue, 23 Feb 2016 12:27:09 +0000
    From: =?UTF-8?B?U2h1cnVwIC0g0LjQvdGC0LXRgNC90LXRgiDQvNCw0LPQsNC30LjQvSDQvNC10LHQtdC70Lg=?= <4079796@ukr.net>
    Reply-To: =?UTF-8?B?U2h1cnVwIC0g0LjQvdGC0LXRgNC90LXRgiDQvNCw0LPQsNC30LjQvSDQvNC10LHQtdC70Lg=?= <4079796@ukr.net>
    X-Mailer: PHP/5.6.18
    Content-Type: multipart/related; boundary="----=_NextPart_223f6c50ec0c7d83bd3a89287e217536"
    Message-Id: <20160223122709.A56B77C43@shurup.exemple.com>
    
    ------=_NextPart_223f6c50ec0c7d83bd3a89287e217536
    Content-Type: multipart/alternative; boundary="----=_NextPart_223f6c50ec0c7d83bd3a89287e217536_alt"
    
    ------=_NextPart_223f6c50ec0c7d83bd3a89287e217536_alt
    Content-Type: text/plain; charset="utf-8"
    Content-Transfer-Encoding: 8bit
    
    Вы получили заказ.
    ....... html...
     
  8. kabantejay

    kabantejay New Member

    11
    0
    1
    Feb 19, 2016
    Ratings:
    +0
    Local Time:
    8:31 AM
    MariaDB 10
    i added
    shurup.net.ua. 3600 TXT (текстовая запись) v=spf1 ip4:185.86.78.53

    but still no profit(( stupid google mocking me...
    gmail even dont see my SPF records, whatta heck? :E
     
  9. eva2000

    eva2000 Administrator Staff Member

    30,891
    6,907
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,401
    Local Time:
    4:31 PM
    Nginx 1.13.x
    MariaDB 5.5
    DNS changes can take 24-72hrs depending on your DNS ttl settings for your records so wait a few days and see

    what's output for
    Code:
    uname -a
    hostname
    and who's your web host ? virtualisation used ? kvm, openvz or vmware ? or dedicated ?

    reverse look up for ip at Reverse IP Lookup - MxToolbox gives
    Code:
    PTR    185.86.78.53    shurup.net.ua    60 min
     
  10. eva2000

    eva2000 Administrator Staff Member

    30,891
    6,907
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,401
    Local Time:
    4:31 PM
    Nginx 1.13.x
    MariaDB 5.5
    gmail sees it
    Code:
    google.com: 185.86.78.53 is neither permitted nor denied by best guess record for domain of nginx@shurup.exemple.com)
    just probably not updated yet ?
     
  11. kabantejay

    kabantejay New Member

    11
    0
    1
    Feb 19, 2016
    Ratings:
    +0
    Local Time:
    8:31 AM
    MariaDB 10
    uname -a
    Linux shurup.exemple.com 2.6.32-573.12.1.el6.x86_64 #1 SMP Tue Dec 15 21:19:08 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

    VPS on KVM
     
  12. eva2000

    eva2000 Administrator Staff Member

    30,891
    6,907
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,401
    Local Time:
    4:31 PM
    Nginx 1.13.x
    MariaDB 5.5
    not updated yet see at DNS Propagation Checker from Multiple Locations - SolveDNS
    upload_2016-2-24_1-49-9.png
    upload_2016-2-24_1-49-42.png

    fyi, SPF text record needs to one entry with all the settings in it see at bottom of page at Outlook Live Domains - CentminMod.com LEMP Nginx web stack for CentOS

    Code:
    v=spf1 a mx ip4:xxx.xxx.xxx.xxx a:hostname.yourdomain.com ~all
    or
    Code:
    v=spf1 include:hotmail.com a mx ip4:xxx.xxx.xxx.xxx  a:hostname.yourdomain.com ~all
    if unsure about SPF for your registrar's control panel, ask your domain registrar tech support about the proper SPF format

    in your case for shurup.exemple.com just need to add that to SPF txt single line record as a:shurup.exemple.com provided exemple.com is actual domain name that has a valid DNS A record that resolves to your VPS ip address
     
    Last edited: Feb 24, 2016
  13. eva2000

    eva2000 Administrator Staff Member

    30,891
    6,907
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,401
    Local Time:
    4:31 PM
    Nginx 1.13.x
    MariaDB 5.5
  14. kabantejay

    kabantejay New Member

    11
    0
    1
    Feb 19, 2016
    Ratings:
    +0
    Local Time:
    8:31 AM
    MariaDB 10
    at the start, i did not do the 1st step, couse there was no free domain, the site was at another server, i just created new vhost for shurup.net.ua
    i changed the SPF record to one line:
    Awesome Screenshot

    then i rename hostname in Hoster's control panel to host.shurup.net.ua
    then rename HOSTNAME with nano -w /etc/sysconfig/network
    then added record to /etc/hosts:
    185.86.78.53 host.shurup.net.ua host

    just now i added the A record, like you said to shurup.exemple.com pointing to my server IP in my hosters DNS control panel:
    Awesome Screenshot
    looks like it correct..
    uname now pointing to host.shurup.net.ua

    Is it all?... =|
     
  15. kabantejay

    kabantejay New Member

    11
    0
    1
    Feb 19, 2016
    Ratings:
    +0
    Local Time:
    8:31 AM
    MariaDB 10
    and sorry for offtop, i use nodequery.com to watch fot the server, is it normal that i have 80% System load? maximum load is php-fpm process and near 60% cpu load?
     
  16. eva2000

    eva2000 Administrator Staff Member

    30,891
    6,907
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,401
    Local Time:
    4:31 PM
    Nginx 1.13.x
    MariaDB 5.5
    should be all on server end, just need to fix up the DNS SPF text record to one single entry for all the options and wait for DNS to propagate

    you can check DNS records like TXT via
    new thread topic best - helps you later find the thread and helps others searching find the discussion :)
     
  17. kabantejay

    kabantejay New Member

    11
    0
    1
    Feb 19, 2016
    Ratings:
    +0
    Local Time:
    8:31 AM
    MariaDB 10
    AAAA, now Ukr.net mailing service didnt get mails at all!!! but i get them on gmail, i dont know what to do((
    now mails look like:
    Code:
    Delivered-To: kabantejay@gmail.com
    Received: by 10.107.144.132 with SMTP id s126csp1908325iod;
            Tue, 23 Feb 2016 08:36:04 -0800 (PST)
    X-Received: by 10.25.15.226 with SMTP id 95mr13480480lfp.85.1456245364594;
            Tue, 23 Feb 2016 08:36:04 -0800 (PST)
    Return-Path: <nginx@host.shurup.net.ua>
    Received: from host.shurup.net.ua (host.shurup.net.ua. [185.86.78.53])
            by mx.google.com with ESMTPS id o198si16139951lfe.198.2016.02.23.08.36.04
            for <kabantejay@gmail.com>
            (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
            Tue, 23 Feb 2016 08:36:04 -0800 (PST)
    Received-SPF: pass (google.com: best guess record for domain of nginx@host.shurup.net.ua designates 185.86.78.53 as permitted sender) client-ip=185.86.78.53;
    Authentication-Results: mx.google.com;
           spf=pass (google.com: best guess record for domain of nginx@host.shurup.net.ua designates 185.86.78.53 as permitted sender) smtp.mailfrom=nginx@host.shurup.net.ua
    Received: by host.shurup.net.ua (Postfix, from userid 500)
        id 6A1EA7C41; Tue, 23 Feb 2016 16:35:47 +0000 (UTC)
    To: kabantejay@gmail.com
    whats wrong? how to fix that, my klient must reseive mails to xxx@ukr.net email!
     
  18. eva2000

    eva2000 Administrator Staff Member

    30,891
    6,907
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,401
    Local Time:
    4:31 PM
    Nginx 1.13.x
    MariaDB 5.5
    Centmin Mod is provide as is, so short of scripted related bugs or issues, any further optimisation to the web stack components - nginx, php-fpm, mariadb mysql, csf firewall etc or web app specific configurations are left to the Centmin Mod user to deal with. So I do not provide any free support for such things as SPF and DNS. You're best to ask your web host and/or domain registrar.

    SPF Setup Guides


    SPF Wizards



    You can use SPF wizards to try and get the correct settings

    SPF Testing Tools



    However, Centmin Mod users are free to help each other out and ask questions or give answers on this community forum. My hopes are that this community forum evolves so that more veteran long time Centmin Mod users help new Centmin Mod users out :)
     
    Last edited: Feb 26, 2016
  19. eva2000

    eva2000 Administrator Staff Member

    30,891
    6,907
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,401
    Local Time:
    4:31 PM
    Nginx 1.13.x
    MariaDB 5.5
    Last edited: Feb 24, 2016