aws black belt techシリーズ amazon ses

78
1 Amazon Simple Email Service (Amazon SES) AWS Black Belt Tech Webinar 2014 (旧マイスターシリーズ) 吉荒 祐

Upload: amazon-web-services-japan

Post on 28-May-2015

3.433 views

Category:

Technology


0 download

DESCRIPTION

AWS Black Belt Tech Webinar 2014 (旧マイスターシリーズ) Amazon SES

TRANSCRIPT

  • 1. 1 Amazon Simple Email Service (Amazon SES) AWS Black Belt Tech Webinar 2014 ()

2. 2 Amazon SES Amazon SES SPF DKIM EC2 3. 3 Amazon SES Email AWSSpammerIP MTAAPI HTTP REST API SMTP/SMTPS endpoint 3201410 US-east-1, US-west-2, EU-west-1 4. 4 Amazon SES Bounce Complaint Suppression List Verication Authentication Sending Limits Content Filtering Reputation High-Quality Email Notications Usage Statistics 5. 5 Amazon SESEmail HTTP REST API AWSSDK SendEmail API: From, To, Subject, BodyAmazon SES SendRawEmail API: AWS 6. 6 Amazon SESEmail SMTP EmailSESSMTP 25 / 465(SMTP over SSL) / 587(Message Submission) TLS(Transport Layer Security) IAM SMTPSMTP 7. 7 SMTPIAM-1 8. 8 SMTPIAM-2 9. 9 SMTPIAM-IAM 10. 10 SMTPIAM-3 SMTP 11. 11 SMTP EC2TCP 25 Spam Spam SES Tokyo Region SMTP (TCP: 25) SMTPS (TCP: 465 / 587) ! MTA N. Virginia / Oregon / Ireland 12. 12 / API Deliveries: Bounces: Complaints: Rejects: 13. 13 rate 14. 14 number 15. 15 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 16. 16 24 24 50 1 50 17. 17 Amazon SES Dashboard 18. 18 (Verifye-mail) 200/24 1/ 1,000/24 5/ http://aws.amazon.com/ses/fullaccessrequest/ 19. 19 Suppression List Suppression ListEmail SESCall SES 2 Suppression List SESIP 20. 20 ISP Amazon SES Amazon SES (assemble)ISPSpam HeaderBodyAmazon SESSpam Amazon SES (Reputation) 21. 21 1,000 0.10 USD E 0.12 USD / GB EC2 Tier 1GB 10TB0.12 USD/GB (us-east-1, us-west-2, eu-west-1) http://aws.amazon.com/ec2/pricing/#DataTransfer 201410Tokyo0.09 USD/GB 22. 22 Amazon EC2AWS Elastic BeanstalkAmazon SES 2,000 1 : 23. 23 Amazon SES BounceComplaint IP Spam 1. Bounce 2. SESSuppression List 3. 24. 24 Amazon SES 25. 25 SMTPIAM Email / Email NotocationEmail 26. 26 1-a. Email Email 27. 27 1-a. Email 28. 28 1-a. Email 29. 29 1-b. DNS 30. 30 1-b. 31. 31 1-b. Amazon Route 53TXT 32. 32 1-b. Amazon Route 53TXT 33. 33 1-c. / SES example.coma.example.coma.b.example.com RFC 1034DNS label 63255 E-mail AWS1000ID(e-mail) 34. 34 2. Email CLI SDK $ aws ses send-email from [email protected] --to [email protected] --subject Hello --text SES Java Python PHP .NET Ruby nodeJS 35. 35 3. 36. 36 3. SNSSNS HTTP, HTTPS, SQS BounceComplaint NoticationEmail Amazon SES Amazon SNS bounce 37. 37 SES [email protected] [email protected] Delivery Status Notication: DSN550 (RFC6533) [email protected] (RFC5436) [email protected] SPAMAbuse Reporting Format (RFC6650) [email protected] SESSuppression List 38. 38 SES [email protected] [email protected] Delivery Status Notication: DSN550 (RFC6533) [email protected] (RFC5436) [email protected] SPAMAbuse Reporting Format (RFC6650) [email protected] SESSuppression List Sandbox 24 39. 39 4. http://aws.amazon.com/ses/fullaccessrequest/ 40. 40 5. Notocation 5 Complaint0.1% https://sesblog.amazon.com/blog/tag/complaint+rate https://sesblog.amazon.com/blog/tag/bounce+rate < < 0.1 41. 41 42. 42 SMTP IP Sender Policy Framework (SPF) Sender ID IP DNS DNS Domain Keys Identied Mail (DKIM) DNS 43. 43 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 RFC4408SPFTXT 44. 44 2. Email From: [email protected] To: [email protected] DKIM-Signature: s=xyz; d=sender.com 1. Email From: [email protected] To: [email protected] DKIM MTATXT sender.com MTA smtp.receiver.com 3. TXT xyz._domainkey.sender.com 4. TXT MTADNS 45. 45 2. Email From: [email protected] To: [email protected] DKIM-Signature: s=xyz; d=sender.com 1. Email From: [email protected] To: [email protected] DKIM SES SESCNAME sender.com amazonses.com SES smtp.receiver.com3. TXT xyz._domainkey.sender.com 4. CNAME CNAME xyz.dkim.amazonses.com 5. TXT xyz.dkim.amazonses.com 6. TXT 46. 46 SESDKIM 1. 2. DKIM 3. DNS Route532 4. 47. 47 SESDKIM 1. 2. DKIM 3. DNS Route532 4. 48. 48 SESDKIM 1. 2. DKIM 3. DNS Route532 4. 49. 49 SESDKIM-Amazon Route 53 50. 50 Bounce 51. 51 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 .. . 250 OK QUIT 250 OK MTA MUA 52. 52 SMTP 200 300 (354) 400 busy 500 : 53. 53 SMTP MTA Return-Path or Errors-To SMTP MTA 54. 54 SES Message to each receiver Message Producer Bounce Amazon SES Amazon SNS / (/ ) Bounce/ Complaint 55. 55 SES SES Amazon SNS E-mailBounceComplaints Complaints SNS {"noticationType":"Delivery", "mail":{ "timestamp":"2014-05-28T22:40:59.638Z", "messageId":"0000014644fe5ef6-9a483358-9170-4cb4- a269-f5dcdf415321-000000", "source":"[email protected]", "destination":[ "[email protected]", "[email protected]" ] }, "delivery":{ "timestamp":"2014-05-28T22:41:01.184Z", "recipients":["[email protected]"], "processingTimeMillis":1546, "reportingMTA":"a8-70.smtp-out.amazonses.com", "smtpResponse":"250 ok: Message 64111812 accepted" } } 56. 56 Sendy (http://sendy.co) Sendy: SES PHPMySQL Bounce/Complaint 57. 57 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. ! 58. 58 Probation Probation n *Unacceptably Low Content Quality: Over the last approximately xxx email messages you sent, an unacceptably high percentage were identied as spam by our lters. *This issue must be xed within the next n emails you send. n(*) Spam FilterSpam Filter /SA 59. 59 SES 60. 60 AWS 1. EC2Mail Transfer Agent (MTA) 2. Amazon Simple Email Service (SES) 3. Email 3.AWS 61. 61 EC2MTA MTA EmailDNS 62. 62 2 Bounce No Bounce Yes Yes 1. EC2MTA No Bounce No 2. SES Yes 63. 63 EC2 64. 64 SMTP EC2TCP 25 Spam Spam Tokyo Region SMTP (TCP: 25) SMTPS (TCP: 587) 587 ! MTA 65. 65 EC2MTA 1. MTAIP Elastic IP A 2. DNS 3. DNS SPF DKIM MX (Optional: ) 66. 66 DNS DNS ;; 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" *MXreturn-path 67. 67 1. MTAIP MTA mta1.example.com, mta2.example.com IP Elastic IP DNS A mta1.example.com IN A mta2.example.com IN A 68. 68 2. DNS AWSHP 69. 69 EIP EIP DNS 70. 70 US DNS 71. 71 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 RFC4408SPFTXT 72. 72 EC2 smtp Message to each receiver Message Producer Bounce / (/ ) 73. 73 Email AWSSpammer IP EC2 74. 74 Happy Sending! 75. 75 Amazon Simple Email Service Email Sending Best Practices http://media.amazonwebservices.com/ AWS_Amazon_SES_Best_Practices.pdf Amazon SES Blog http://sesblog.amazon.com/ 76. 76 Sender IDSPF | 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/ EZwebau http://www.au.kddi.com/mobile/service/mail/attention/ EZwebau http://www.au.kddi.com/mobile/service/mail/attention/request/ | http://www.softbank.jp/mobile/support/antispam/wrestle/ #Mailerstudy http://www.slideshare.net/ar_maniacs/mailerstudy 77. 77 Q&A 78. 78 Webinar AWS http://aws.amazon.com/jp/aws-jp-introduction/