{"id":308,"date":"2016-06-11T16:38:15","date_gmt":"2016-06-11T15:38:15","guid":{"rendered":"http:\/\/104.198.79.120\/?p=308"},"modified":"2016-06-27T08:24:53","modified_gmt":"2016-06-27T07:24:53","slug":"google-smtp-error-ptr-550-5-7-1-ipv6-fix-for-postfix-under-ubuntu-server","status":"publish","type":"post","link":"https:\/\/wp.gaborhargitai.hu\/google-smtp-error-ptr-550-5-7-1-ipv6-fix-for-postfix-under-ubuntu-server\/","title":{"rendered":"Google SMTP Error PTR 550-5.7.1 IPv6 – Fix for Postfix under Ubuntu Server"},"content":{"rendered":"

Having undelivered mails due to numerous errors is not nice – having all of our sent emails rejected by a particular host is nothing short of a nightmare. Google has a strict policy on deciding whether it would allow a mail to be delivered to one of its’ accounts or not – which is a good thing in general.<\/p>\n

Even moreso, by bouncing back the mail it gives a pretty straightforward cause why it had decided in doing so:<\/p>\n

dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[] said: 550-5.7.1 [] Our system has detected that 550-5.7.1 this message does not meet IPv6 sending guidelines regarding PTR 550-5.7.1 records and authentication. Please review 550-5.7.1 \u00a0https:\/\/support.google.com\/mail\/?p=ipv6_authentication_error for more 550 5.7.1 information. – gsmtp (in reply to end of DATA command))<\/p><\/blockquote>\n

It goes without saying that first and foremost one should always start to resolve the situation by visiting the adequate Google Support Page regarding the IPv6 Authentication<\/a>. However, making changes to your DNS zone file means that the new information has to propagate itself to the other DNS servers throughout the world – which can be a pretty lengthy<\/em> amount of time, even with a relatively small amout of TTL.<\/p>\n

In most cases the error message should disappear within 2-3 days, but as you can guess by the birth of this post – this wasn’t the case with me. For starters, the message itself has initially disappeared\u00a0only to be replaced with a generic IPv6 error message. I double checked the PTR records as well along with the necessary SPF records – which lead to nowhere.<\/p>\n

Guided by frustration I’ve stumbled upon multiple blog entries and forum posts reciting the same error messages I have seen with the exact same symptoms, so without further ado I’ll summerize what helped me in resolving the issue.<\/p>\n

Warning! This method essentially\u00a0disables<\/em> the use of IPv6 when sending emails to @gmail accounts which should become troublesome when \u00a0the world finally ditches IPv4.<\/strong><\/p>\n

This guide assumes you have\u00a0an Ubuntu\/Debian server up and running with\u00a0Postfix\u00a0<\/strong>as the\u00a0Mail Transport Agent<\/strong>.<\/p>\n

    \n
  1. Add\/edit the following within\u00a0\/etc\/postfix\/main.cf<\/strong>
    \nsmtp_reply_filter = pcre:\/etc\/postfix\/smtp_reply_filter<\/code><\/li>\n
  2. Create \/etc\/postfix\/smtp_reply_filter<\/strong> with the following content:
    \n\/^5(\\d\\d )5(.*information. \\S+ - gsmtp.*)\/ 4${1}4$2<\/code><\/li>\n
  3. Be sure to have postfix-pcre<\/strong> installed on your system. If not, then:
    \napt-get install postfix-pcre<\/code><\/li>\n
  4. Restart Postfix for the new config to take effect:
    \nservices postfix restart<\/code><\/li>\n<\/ol>\n

     <\/p>\n","protected":false},"excerpt":{"rendered":"

    Having undelivered mails due to numerous errors is not nice – having all of our sent emails rejected by a particular host is nothing short of a nightmare. Google has a strict policy on deciding whether it would allow a mail to be delivered to one of its’ accounts or not – which is a […]<\/p>\n","protected":false},"author":1,"featured_media":317,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[8,25,7],"tags":[],"_links":{"self":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/308"}],"collection":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/comments?post=308"}],"version-history":[{"count":8,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/308\/revisions"}],"predecessor-version":[{"id":340,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/308\/revisions\/340"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/media\/317"}],"wp:attachment":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/media?parent=308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/categories?post=308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/tags?post=308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}