この記事を読むのに必要な時間は約 3 分です。
This is a permanent error. The following address(es) failed:
レンタルサーバーを借りてメールを送れるようにしてもGmailでエラーが発生する場合、
spfレコードの設定が必要になる場合があります。
その上で以下のようなエラーが出た場合の対処法です。
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
gmail_no_address@gmail.com
host gmail-smtp-in.l.google.com [nnnn:nnnn:nnnn:nnnn::nn]
SMTP error from remote mail server after end of data:
550-5.7.1 [nnnn:nnnn:nnnn:nnnn::nn] The IP you’re using to send mail is not
550-5.7.1 authorized to send email directly to our servers. Please use the SMTP
550-5.7.1 relay at your service provider instead. Learn more at
550 5.7.1 https://support.google.com/mail/?p=NotAuthorizedError
v=spf1 +ip4:yyy.yyy.yyy.yyy +a:domain.com -all
SPFレコードの設定でipv6の設定をしていますか?先ほどの例だと以下の部分です。
nnnn:nnnn:nnnn:nnnn::nn
このIPはipv6ですが、メールサーバーとして機能していますか?
もし機能していないのであれば、SPFレコードに含めてはいけません。
Googleがわざわざチェックしてくれるようです。
と、いう事で、SPFレコードはこんな感じで設定しましょう。
v=spf1 +ip4:yyy.yyy.yyy.yyy +a:domain.com -all
(/・ω・)/