Gmail not accepting mails due to PTR error

Discussion in 'Server Operation' started by dan-v, May 23, 2025.

  1. dan-v

    dan-v Member

    I have a problem with outgoing emails not being accepted by gmail. My reverse DNS is configured and discovered using Google's dig tool:
    Code:
    id 2671
    opcode QUERY
    rcode NOERROR
    flags QR RD RA
    ;QUESTION
    191.5.65.82.in-addr.arpa. IN PTR
    ;ANSWER
    191.5.65.82.in-addr.arpa. 21044 IN PTR serveur.marlotte.fr.
    ;AUTHORITY
    ;ADDITIONAL
    However, outgoing emails are still rejected by Gmail on what appears to be a reverse DNS problem:
    Code:
    <[email protected]>: host
        gmail-smtp-in.l.google.com[2a00:1450:400c:c00::1b] said: 550-5.7.25
        [2a01:e0a:f03:8370:4eb5:172c:7122:fbe5] The IP address sending this
        550-5.7.25 message does not have a PTR record setup, or the corresponding
        550-5.7.25 forward DNS entry does not match the sending IP. As a policy,
        Gmail 550-5.7.25 does not accept messages from IPs with missing PTR
        records. For more 550-5.7.25 information, go to 550-5.7.25
        https://support.google.com/a?p=sender-guidelines-ip  550-5.7.25 To learn
        more about Gmail requirements for bulk senders, visit 550 5.7.25
        https://support.google.com/a?p=sender-guidelines.
        ffacd0b85a97d-3a35ca7fe24si12122765f8f.255 - gsmtp (in reply to end of DATA
        command)
    Please help !
     
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    the dig results you're getting are showing a PTR record for the servers ip4 address.
    it looks like the mail to google is going out on your servers ip6 address.
    you need to set a PTR record for the ip6 address as well.
     
    till likes this.
  3. dan-v

    dan-v Member

     
  4. dan-v

    dan-v Member

    Why would my server be sending from an IPv6 adrress ? I have never set it up for that !!!
    Is there anyway to get it to limit itself to the IPv4 address ? My ISP will not grant me 2 reverse DNS addresses... ;(
     
  5. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    change
    inet_protocols = any

    to
    inet_protocols = ipv4

    in /etc/postfix/main.cf
    and restart postfix
     
  6. dan-v

    dan-v Member

    That worked ! Thx
     

Share This Page