toto_1212

技術のログをツラツラ書きます。自分用ですが参考にしていただけたら嬉しいです。間違ってたらドンドン突っ込んでください。

DNS逆引き申請

今更感はありますが、久しぶりに申請してのでメモしておきます。

この申請をしないとAWS上のインスタンスから送信されたメールは送信元ドメインと逆引き問い合わせでしたドメインとが合わなくなり、送信されずにスパム扱いされる可能性が大です。
加えてメールの送信量に制限がかけられており、ある日突然メールが送信できないという事象になります。
そこで、メール送信制限解除申請、DNS逆引き設定、必要に応じてSPFの設定も必要となります。

ここではメール送信制限解除申請、DNS逆引き申請を書きます。

申請しないとこんな警告のようなメールが来ます。

Dear EC2 Customer,
You recently reached a limit on the volume of email you were able to send out of SMTP port 25 on your instance:

Instance ID: i-xxxxxxxx
IP Address: XXX.XXX.XXX.XXX
Start date: YYYY-MM-DD NN:NN +0000
……

AWSサイト内に申請フォームがあります。
https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request


ここにアクセスし、必要な情報を入力します。

f:id:toatoshi:20130703175701j:plain

Email Address:アカウント登録時のEmailアドレス(自動登録)
AWS Account Number:自動採番
AWS Account Number:利用用途
Elastic IP Address 1:EIPのアドレス
Elastic IP Address 2:EIPのアドレス(2個目が必要であれば)
Reverse DNS Record for EIP 1:名前解決するFQDN(Aレコード)
Reverse DNS Record for EIP 2:名前解決するFQDN(Aレコード)(2個目が必要であれば)


暫くしたら、こんなメールが・・・

Subject: Your AWS Inquiry

Hello,

(1.) We've reviewed and approved your request for the removal of the EC2
e-mail sending limitations on your Amazon Web Services account. There are
no longer limitations on your account for any IPs and instances under your
account. If you requested removal of e-mail sending limits on Amazon Elastic
IPs, they've also been removed.

(2.)   The mapping for this reverse DNS entry is failing because the PTR
record doesn't match the A record for that domain. We currently require
the forward A record to match the PTR record for all reverse DNS entries.

ElasticIPAddress1            ***.***.***.***
ReverseDNSRecord1            www.hogehoge.hoge

You can either provide us with an alternate hostname, or configure the A
record for this domain to match the desired PTR record on your side.

Please resubmit your request via the online form so that we can resubmit
the request:

https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/e
c2-email-limit-rdns-request

Thank you for your inquiry. Did I solve your problem?

If yes, please click here:
http://www.amazon.com/gp/help/survey?p=A1OR90QJBDYTCI&k=hy

If no, please click here:
http://www.amazon.com/gp/help/survey?p=A1OR90QJBDYTCI&k=hn

Best regards,

Eileen L.
http://aws.amazon.com

Original message: ----

AWS AccountId			****************
AccountEmailAddress
	*********@hogehoge.hoge
UseCaseDescription			To a mail sending function of the
Web server.
ElasticIPAddress1			***.***.***.***
ElasticIPAddress2
ReverseDNSRecord1			www.hogehoge.hoge
ReverseDNSRecord2

そもそもこのドメインは正引きすらできてないよ。みたいな内容です。

この申請したドメインは移行案件であったため、まだ利用してしており別のAレコードが書かれていたことが原因でした。

移行直後にメール送信がある場合、容量によっては送付されない可能性があると思い、事前にやっておこうと申請したのですが、考えてみれば当たり前でした。

移行後に再度同じ内容で申請し、数日後に以下のメールを持って設定されたようです。
nslookupでも逆引き確認ができました。

Subject: Your AWS Inquiry

Hello,

We have configured the reverse DNS record(s) you requested.  Please note
that propagation of this update to DNSBL services that Amazon works with
may take up to a week.

If you also requested removal of the email sending limitations on your
account, these have also been removed for any IPs and instances under your
account.

Please let us know if you have any questions.

Thank you for your inquiry. Did I solve your problem?

If yes, please click here:
http://www.amazon.com/gp/help/survey?p=A1R98NCWNCOHAK&k=hy

If no, please click here:
http://www.amazon.com/gp/help/survey?p=A1R98NCWNCOHAK&k=hn

Best regards,

Michael A.
http://aws.amazon.com

Original message: ----

AWS AccountId			****************
AccountEmailAddress
	*********@hogehoge.hoge
UseCaseDescription			To a mail sending function of the
Web server.
ElasticIPAddress1			***.***.***.***
ElasticIPAddress2
ReverseDNSRecord1			www.hogehoge.hoge
ReverseDNSRecord2

今回のWebサーバはフォーム内容転送程度のメールなので、そんなに数多くはないので大丈夫でしたが、メールをガンガン飛ばすようなサーバをオンプレ運用しており、それをAWSへ移行する場合、シームレスにこの辺りを解決する方法ってありますかね??