[awsマイスターシリーズ] amazon simple email service

54
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. AWSマイスターシリーズ Amazon Simple Email Service (SES) 2014.3.5 シニアソリューションアーキテクト 安川 健太 re:Generate

Upload: amazon-web-services-japan

Post on 26-Jan-2015

137 views

Category:

Technology


7 download

DESCRIPTION

[AWSマイスターシリーズ] Amazon Simple Email Service

TRANSCRIPT

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

AWSマイスターシリーズ  Amazon  Simple  Email  Service  

(SES)

2014.3.5シニアソリューションアーキテクト

安川  健太

re:Generate

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

アジェンダ

!   Amazon SESとは? !   Amazon SES利用開始までの流れ !   メール配信の信頼性を維持するために

•  SPF

•  DKIM

•  バウンス処理

!   EC2インスタンスからのメール送信 !   まとめ

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Amazon SESとは?

!   スケーラブル・高信頼・低コストなEmail送信サービス •  AWSが管理するクリーンに保たれた(Spammer登録などされていない)

大きなIPアドレスプールを使ってメール送信可能

•  MTAを自前で立てなくてもAPIを叩く事でメール送信可 •  HTTP REST API •  SMTP/SMTPS endpoint

•  世界3箇所のリージョンで提供(2014年3月現在) •  US-east-1, US-west-2, EU-west-1

!   利用用途例 •  マーケティングメールやメルマガの配信等 •  各種サービス/アプリからエンドユーザへの通知

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Amazon SESによるEmail送信 〜HTTP REST API〜

!   他のAWSサービスと同様にSDK等からコール •  SendEmail API: From, To, Subject, Bodyだけを用意すれば

Amazon SES側でメッセージを生成して送信 •  SendRawEmail API: メッセージ全体をアプリケーション側で生成し

て送信

!   認証はAWS アクセスキーとシークレットアクセスキーを使用

!   アプリケーションから直接メール送信を行う場合に便利

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Amazon SESによるEmail送信 〜SMTPエンドポイント〜

!   生成済みEmailメッセージを受け取って送信するSESのSMTPエンドポイント •  ポート: 25 / 465 / 587 •  要TLS •  要認証

!   認証には専用IAMユーザを作成してそのクレデンシャルを使用

!   既存の送信用SMTPサーバからリレーしたり、SMTPを前提としてプログラムから直接利用する場合などに便利

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

SMTPエンドポイント用IAMユーザの作成

送信用ユーザの 名前(任意)を入力

このクレデンシャルを SMTPクライアントに設定

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

SMTPエンドポイントを使う際の注意点

!   デフォルトではEC2から外向きTCP 25番ポートは制限対象 •  Spamのリレーを防ぐ •  誤ったSpam送信から利用者様を守る

!   リージョンが異なる場合、SESのエンドポイントもこの制限の対象

7

Tokyo Region

SMTP (TCP: 25)

SMTPS (TCP: 465 / 587)

認証付きで外部サービスを利用するのは特に制限なし

!この制限は申請ベースで解除出来ます

MTA N. Virginia / Oregon / Ireland

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

配信メトリクスのモニタリング

!   配信メトリクスはコンソール / APIでモニタリング可 •  Deliveries: •  Bounces: •  Complaints: •  Rejects:

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

送信クォータ

!   送信クォータ:送信可能メール数及びレート §  2つのしきい値

§  SendingQuota: 24時間で送信出来るメールの 大数 §  現時点で送れる数 = SendingQuota - 直近24時間に送信した数

§  SendingRate: 秒間あたりに送信出来るメールの 大数 §  GetSendQuota API or マネージメントコンソールで確認可 •  送信クォータを超えるとスロットリング

!   送信クォータを増やすには? •  実績に応じて自然に増えていく

•  良質なコンテントをQuotaに近い量送信していると増えます •  急にクォータを増やす必要があるときには?

•  下記フォームからご申請下さい http://aws.amazon.com/ses/extendedaccessrequest/

454 Throttling failure: Maximum sending rate exceeded 454 Throttling failure: Daily message quota exceeded

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

アクセスレベル

!   アクセスレベル §  サンドボックス(初期状態)

§  指定されたアドレスにのみ送信可 §  小さな送信クォータ

§  プロダクション §  送信先に制限なし §  送信クォータは実績によって決定

!   アクセスレベルをプロダクションに上げるには? •  申請フォームからご申請下さい

•  http://aws.amazon.com/ses/fullaccessrequest/

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Suppression List機能

!   Suppression List:ハードバウンスしたEmailアドレスが登録されるリスト •  登録済みアドレスに送信を試みた場合は、SESから外部へは送信さ

れずにバウンスとして処理される •  アカウントを越えて共有 •  一度登録されると2週間程度は残る(手動削除は可)

!   Suppression Listの役割 •  バウンスを起こし続ける事で送信元ドメインやSESのIPアドレスプー

ルの評判が落ちないよう保護

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

料金

!   メッセージ送信リクエスト料金 •  1,000 通当たり 0.10 USD

•  但し、複数の受信者に送信された単一のEメールは、各受信者への固有のメッセージとしてカウント

!   添付ファイル料金 •  0.12 USD / GB

!   データ転送料金はEC2のデータ転送料金と同じ •  受信は無料 •  送信は複数Tier

•  各月の 初の1GBまでは無料(その他のサービスも合算)

•  各月の次の10TBまでは0.12 USD/GB (us-east-1, us-west-2, eu-west-1)

•  詳細は http://aws.amazon.com/ec2/pricing/#DataTransfer

注:リージョンを越えた送信は送信元リージョンからのリージョン間転送料金が追加適用 (2014年3月現在、Tokyoリージョンでは0.09 USD/GB)

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Amazon SES利用時の注意点

!   コンテンツ・送信先リストの正しい管理運用が必須

•  BounceやComplaintの処理を行っていないと送信レートの抑制や送信停止措置が取られる事もある (IPアドレスプールをクリーンに保つとともに、世の中のメールの信頼性・健全性向上を促すため)

•  Spamと判定されるようなメールを定常的に配信していると送信停止措置の可能性あり

!   国内モバイルキャリア等の迷惑メールフィルタとは相性悪い 1.  迷惑メールフィルタに引っかかった場合にBounceエラーが返る 2.  SESのSuppression Listに送信先アドレスが登録される 3.  ホワイトリストされたドメインからもメールが送れなくなる

13

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Amazon SES利用開始までの流れ

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

利用開始までの流れ

1.  送信元Emailアドレス / ドメインの登録

2.  Emailが送信できることを確認

3.  バウンス処理の実装とテスト

4.  プロダクションアクセスを申請

5.  フィードバックをモニタリングしながらEmail送信

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

1-a. 送信元Emailアドレスの登録

!   単一のEmailアドレスを登録する場合

この後届く確認メールに 書かれたリンクをクリック すれば登録完了

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

1-b. 送信元ドメインの登録

表示されたレコードをドメインのDNSレコードに登録してしばらく待てば登録完了

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

2. Emailが送信できることを確認

!   マネージメントコンソール

$ aws ses send-email \ –from [email protected] \ --to [email protected]\ --subject Hello --text SES

!   CLI

!   SDK

Java Python PHP

.NET Ruby nodeJS

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

3. バウンス処理の実装とテスト

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

3. バウンス処理の実装とテスト

SNSトピックを設定することでSNSが 対応する各種プロトコルへの通知も可 例: HTTP, HTTPS, SQS

デフォルトではバウンス時などのフィードバックはEmailで届く

Amazon SES

Amazon SNS

bounce

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

SESメールボックスシミュレータ

•  [email protected] •  正常配信

•  [email protected] •  Delivery Status Notification: DSNの550(ユーザ非存在)メッセージ

(RFC6533) •  [email protected]

•  不在メッセージ(RFC5436) •  [email protected]

•  送信先がメッセージをSPAMと認識して、Abuse Reporting Formatを返す(RFC6650)

•  [email protected] •  SESのSuppression Listに載ったアドレスへの送信をシミュレート

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

4. プロダクションアクセスの申請 http://aws.amazon.com/ses/fullaccessrequest/

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

5. フィードバックをモニタリング

!   バウンスレートは5%未満を推奨

!   Complaintは0.1%未満を推奨

https://sesblog.amazon.com/blog/tag/complaint+rate

https://sesblog.amazon.com/blog/tag/bounce+rate

< 5%

< 0.1%

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

メール配信の信頼性を維持するために

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

SMTPにおける送信元認証のための技術

!   送信元IPアドレスに基づく認証 •  Sender Policy Framework (SPF) •  Sender ID à 各ドメインでメール送信元であるべきホストのIPアドレスやドメイン名

をDNSで公開 à 各DNSドメインにレコードを追加するだけで開始できる

!   送信元による署名に基づく認証 •  Domain Keys Identified Mail (DKIM) à送信元で各メールにデジタル署名をし、公開鍵をDNSで公開

à送信者あるいは送信元サーバでの対応が必要

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

SPFの設定例 (SESの場合)

!   送信元サーバの逆引き結果が*.example.comである場合に正当な送信者であると宣言する場合の設定例

•  一致しない場合はソフトフェイルとする場合

example.com. TXT "v=spf1 include:amazonses.com ~all“ example.com. SPF "v=spf1 include:amazonses.com ~all“

•  一致しない場合はハードフェイルとする場合

(一致しない場合に受信側MTAに受信拒否を要求)

example.com. TXT "v=spf1 include:amazonses.com -all“ example.com. SPF "v=spf1 include:amazonses.com -all“

26

注:RFC4408によれば、SPFかTXTどちらかが定義されていれば動作するものの、両方のレコードに同内容を設定することが推奨される

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

DKIM有効化時のメール送受信の流れ

!   MTAでキーペアを管理、公開鍵をTXTレコードで送信元ドメインに設定

sender.com

MTA smtp.receiver.com

2. 署名付きEmail送信 From: [email protected] To: [email protected] DKIM-Signature: s=xyz; d=sender.com …

1. Email送信 From: [email protected] To: [email protected]

3. 公開鍵問い合わせ TXT xyz._domainkey.sender.com

4. 公開鍵返答 TXT “公開鍵”

MTA及びDNSに必要な設定をすることで導入

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

DKIM有効化時のメール送受信の流れ (SESの場合)

!   SES側でキーペアを管理、公開鍵をCNAMEでユーザドメインに設定

sender.com

amazonses.com

SES smtp.receiver.com

2. 署名付きEmail送信 From: [email protected] To: [email protected] DKIM-Signature: s=xyz; d=sender.com …

1. Email送信 From: [email protected] To: [email protected]

3. 公開鍵問い合わせ TXT xyz._domainkey.sender.com 4. CNAMEレコード返答 CNAME xyz.dkim.amazonses.com

5. 公開鍵問い合わせ TXT xyz.dkim.amazonses.com

6. 公開鍵返答 TXT “公開鍵”

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

SESの簡単DKIM設定機能

1.  ドメインを選択 2.  DKIMタブで有効化 3.  DNSにレコードを追加

•  Route53なら2クリック! 4.  設定完了通知を待つ

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Bounce処理の実装

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

SMTPの正常時のシグナリング

Sender.example.com

HELO sender.example.com

250 OK

MAIL FROM: [email protected]

250 OK

RCPT TO: [email protected]

250 OK

example.jp

DATA

354 Start

ヘッダ,本文.. <CRLF>.<CRLF>

250 OK

QUIT

250 OK

MTA MUA

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

SMTPのステータスコード

!   200番台 •  正常応答 •  情報提供

!   300番台 •  データ入力を促す(354)

!   400番台 •  一時的なエラー: サーバシャットダウン、メールボックスbusy、メール

ボックス溢れ

!   500番台 •  システムエラー: コマンド間違い •  転送エラー: メールアドレスなし、処理失敗通知

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

配信エラーメール

!   SMTPセッション時のエラー •  送信元のMTAが作成。 •  エンベロープの発信者メールアドレスにエラーメールが戻る

(Return-Path or Errors-To ヘッダに記載)

!   SMTPセッション時以外 •  送信先のMTAが作成 •  エンベロープの発信者メールアドレスにエラーメールが戻る

エラー発生時、ユーザが存在しないなどの恒久的なエラー(ハードバウンス)については再度送信しないように送信側で対処(バウンス処理)が必要

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

バルク配信とバウンス処理の例(SESの場合)

34

顧客情報

Message to each receiver

Message Producer

Bounce記録のある宛先を除いて送信先を抽出

送信ステート テーブル

Amazon SES

Amazon SNS

送信中/送信済 ステートを記録 (送信中/送信済

はスキップ)

Bounce/Complaint

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

参考情報: Sendy (http://sendy.co)

! Sendy: メールの作成からSESでの配信やレポート作成をワンストップで実現するパッケージソフトウェア •  PHPとMySQLの環境があれば動作 •  Bounce/Complaint処理なども対応

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

送信停止措置について

!   下記のような場合、送信停止措置が適用される可能性有り •  Bounce/Complaintレートが高い状態が続く •  Spam Filterのヒットレートが高い

!   送信停止措置の警告とProbation(猶予) •  SESから警告のメールが管理者アドレスに届く •  メッセージ例:

Dear Amazon Simple Email Service Customer: We have detected a problem with your Amazon Simple Email Service (Amazon SES) sending that has put your Amazon SES account on probationary status.

à上記のような通知を受け取った場合には次のページを参照の上で注意深く対応のこと

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

Probationの通知があった場合の対処方法

!   まず理由とProbationの間に送信可能な数を確認 •  メッセージ例:

!   原因を取り除き、効果を確認した後、実施した改善内容を返信 •  nの値は普段送信しているボリュームを鑑みて設定される

•  但し、リスクを考えると改善適用までは代替手段でメール配信を行うことを推奨

*Unacceptably Low Content Quality: Over the last approximately xxx email messages you sent, an unacceptably high percentage were identified as spam by our filters. *This issue must be fixed within the next n emails you send. à上記の場合次のn通のメッセージを送り終えるまでにメールのコンテンツを改善(*)しないと送信停止措置適用へ

* 個別のメールがSpam Filterにかかるかどうかはご案内出来ないので一般的なSpam Filterソフトウェアでご確認下さい

改善方法や改善結果のアピールに不安があれば担当営業/SAまでご相談ください

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

SES以外のメール送信選択肢

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

AWSからのメール配信の選択肢

1.  EC2上にMail Transfer Agent (MTA)を構築して配信

2.  Amazon Simple Email Service (SES)の利用

3.  外部Email配信サービスの利用

3.についてはAWS特有の手順はないため省略

39

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

EC2上にMTAを構築して配信

!   利点 •  慣れたMTAや既存のノウハウを活かして構築・運用が可能 •  携帯キャリア向けの送信ルールの適用など、柔軟な制御が可能

!   注意点 •  構築・運用・障害対策やスケールの調整などは自身で行わなければ

ならない •  Email送信のための制限解除やDNS逆引きなどフォームによる申請

が必要な項目あり(後述)

40

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

2つの選択肢から適切な方法を選ぶ基準

41

Bounce処理 を実装予定

No Bounce処理はどちらの方法でも重要です。

実装しましょう。

携帯キャリアのアドレスに送信

予定あり

Yes

Yes 1.  EC2上のMTA構築も検討

No

Bounceやコンテンツの問題による送信

レート抑制を受入可

No

2. SESの利用も考慮に

Yes

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

EC2からメール送信を行う前の準備

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

EC2インスタンスからのメール送信

!   デフォルトでは外向きTCP 25番ポートは制限対象 •  Spamのリレーを防ぐ •  誤ったSpam送信から利用者様を守る

43

SMTP (TCP: 25)

SMTPS (TCP: 587)

587番を使って認証付きで外部サービスを利用する

のは特に制限なし

!この制限は申請ベースで解除出来ます

MTA

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

EC2でMTAを構築するまで

1. MTAのホスト名とIPアドレスを用意 •  ホスト名を決める •  Elastic IPを取得 •  ホストのAレコードをドメインに登録する

2. 制限解除と逆引きDNSの登録を申請する

3. メール関連のDNS設定を行う •  SPFレコード •  DKIM •  MXレコード (Optional: 受信もする場合)

44

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

構成とDNSレコードの例

!   DNSレコード例

45

;; example.com @ IN A 203.0.113.3 @ IN MX 10 mx1 @ IN MX 20 mx2 mx1 IN A 203.0.113.4 mx1 IN A 203.0.113.5 mta1 IN A 203.0.113.6 mta2 IN A 203.0.113.7 @ IN TXT "v=sfp1 ip……" @ IN SPF "v=sfp1 ip……” mta1 mta2 mx1 mx2

DNS *.113.0.203

1. RCPT TO [email protected] MAIL FROM [email protected]

mx.receiver.com

2. 203.0.113.6?

3. PTR mta1.example.com

(Bounce/error) *

DNS example.com

4. SPF?

5. SPF "v=sfp1 ip…"

逆引き申請 で登録

*一般にバウンス等のエラーは受信側MXサーバによりセットされるreturn-pathヘッダに記載のアドレスに返される。

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

1. MTAのホスト名とIPアドレス

!   MTAのホスト名を決める •  例:mta1.example.com, mta2.example.com

!   IPアドレスの取得 •  通常通りElastic IPをホスト名の数だけ取得

!   DNS Aレコードを登録 •  mta1.example.com IN A <EIP 1> •  mta2.example.com IN A <EIP 2>

46

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

2. 制限解除と逆引きDNSの登録を申請

! 専用フォームより申請 •  AWSのHP下部

47

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

申請フォーム

!   メール送信の目的を記入

!   申請対象のEIP

!   EIPの逆引き結果 となるべきホスト 名を記入

48

DNSの正引きの 一致が必要

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

申請時の注意点

!   ユースケースはUS側で対応するため英語でご記入下さい •  難しい場合は担当営業にご相談下さい

!   DNS •  正引き結果が申請内容と一致する場合のみ逆引き設定を行います à 正引きの設定をした上で申請をお願いします

49

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

SPFの設定例

!   送信元サーバの逆引き結果が*.example.comである場合に正当な送信者であると宣言する場合の設定例

•  一致しない場合はソフトフェイルとする場合

example.com. TXT "v=spf1 include:example.com ~all“ example.com. SPF "v=spf1 include:example.com ~all“

•  一致しない場合はハードフェイルとする場合

(一致しない場合に受信側MTAに受信拒否を要求)

example.com. TXT "v=spf1 include:example.com -all“ example.com. SPF "v=spf1 include:example.com -all“

50

注:RFC4408によれば、SPFかTXTどちらかが定義されていれば動作するものの、両方のレコードに同内容を設定することが推奨される

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

バルク配信とバウンス処理の例(EC2の場合)

51

smtp

顧客情報

Message to each receiver

Message Producer

Bounce記録のある宛先を除いて送信先を抽出

送信ステート テーブル

送信中/送信済 ステートを記録 (送信中/送信済

はスキップ)

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

まとめ

!   スケーラブル・高信頼・低コストなEmail送信サービス •  AWSが管理するクリーンに保たれた(Spammer登録などされていな

い)大きなIPアドレスプールを使ってメール送信可能

!   ただし、メール送信のお作法や受取手に迷惑にならない 使い方をしないと 悪利用停止措置も àでもこれって本来やるべきことですよね?

!   EC2からのメール送信も可能 •  用途に合わせた使い分け •  いざという時の切り替え先としての利用も

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

その他の参考情報

!   携帯キャリア各社からのメール送信に関する注意事項 •  送信ドメイン認証(Sender ID/SPF)について | NTTドコモ

•  http://www.nttdocomo.co.jp/service/communication/imode_mail/notice/sender_id/

•  同報メールを大量に送信されるお客様へ | NTTドコモ

•  http://www.nttdocomo.co.jp/service/communication/imode_mail/notice/mass_send/

•  EZwebへメール送信する際の注意事項(概要)│au

•  http://www.au.kddi.com/mobile/service/mail/attention/ •  メール送信時のお願い│EZwebへメール送信する際の注意事項(概要)│au

•  http://www.au.kddi.com/mobile/service/mail/attention/request/ •  迷惑メールに対するソフトバンクモバイルの取り組み | ソフトバンクモバイル

•  http://www.softbank.jp/mobile/support/antispam/report/wrestle/

!   メールシステムのおはなし #Mailerstudy

•  http://www.slideshare.net/ar_maniacs/mailerstudy

53

© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

ご参加ありがとうございました