Q: sendmail and gmail not received I try to send mail with sendmail (Debian 8) from a PHP script.
It does work but only gmail is not working.
Sending a mail from root, I got this message
xxx@gmail.com... Connecting to gmail-smtp-in.l.google.com. via esmtp...
220 mx.google.com ESMTP ej8si17844651wjd.175 - gsmtp
>>> EHLO nxxxxx.eu
250-mx.google.com at your service, [2001:41d0:e:4c8::1]
250-SIZE 35882577
250-8BITMIME
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
>>> STARTTLS
220 2.0.0 Ready to start TLS
>>> EHLO xxxxx.eu
250-mx.google.com at your service, [2001:41d0:e:4c8::1]
250-SIZE 35882577
250-8BITMIME
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
>>> MAIL From:<xxx@xxxx.eu> SIZE=20
250 2.1.0 OK ej8si17844651wjd.175 - gsmtp
>>> RCPT To:<xxx@gmail.com>
>>> DATA
250 2.1.5 OK ej8si17844651wjd.175 - gsmtp
354  Go ahead ej8si17844651wjd.175 - gsmtp
>>> .
**550-5.7.1 [2001:41d0:e:4c8::1] Our system has detected that this message does
550-5.7.1 not meet IPv6 sending guidelines regarding PTR records and
550-5.7.1 authentication. Please review
550-5.7.1  https://support.google.com/mail/?p=ipv6_authentication_error for more**
550 5.7.1 information. ej8si17844651wjd.175 - gsmtp
/root/dead.letter... Saved message in /root/dead.letter
Closing connection to gmail-smtp-in.l.google.com.
>>> QUIT


Feb 12 09:49:57 ns380959 sendmail[9314]: u1C8nv7O009314: from=www-data, size=1559, class=0, nrcpts=1, msgid=<201602120849.u1C8nv7O009314@ns380959.xxxx.eu>, relay=www-data@localhost
    Feb 12 09:49:57 ns380959 sendmail[9314]: u1C8nv7O009314: to=orugari@gmail.com, ctladdr=www-data (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31559, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
    Feb 12 09:50:01 ns380959 sendmail[9316]: u1C8o1ao009316: from=root, size=20, class=0, nrcpts=1, msgid=<201602120850.u1C8o1ao009316@ns380959.xxxx.eu>, relay=root@localhost
    Feb 12 09:50:01 ns380959 sendmail[9316]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128
    Feb 12 09:50:02 ns380959 sendmail[9316]: u1C8o1ao009316: to=xxxx@gmail.com, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=30020, relay=gmail-smtp-in.l.google.com. [IPv6:2a00:1450:400c:c06::1a], dsn=5.0.0, stat=Service unavailable
    Feb 12 09:53:41 ns380959 sendmail[9494]: u1C8rfYP009494: from=www-data, size=1559, class=0, nrcpts=1, msgid=<201602120853.u1C8rfYP009494@ns380959.xxxx.eu>, relay=www-data@localhost
    Feb 12 09:53:41 ns380959 sendmail[9494]: u1C8rfYP009494: to=xxxx@gmail.com, ctladdr=www-data (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31559, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

I don't find where to change 127.0.0.1 in sendmail. I did change in DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=5.xxxx') but didn't take effect.
Where should I change what in sendmail to be able to send mail to gmail?
I really don't understand how to do things on this page:
https://support.google.com/mail/answer/81126?p=ipv6_authentication_error&rd=1#authentication

A: As the message told you, 2001:41d0:e:4c8::1 has no reverse DNS entry set.
To solve the problem, you need to set the reverse DNS for this to the proper hostname value, that also resolves to the same IP address. You can do this within your OVH management panel.
