简体   繁体   English

aws将入站电子邮件发送到S3和SNS主题

[英]aws ses inbound e-mail to S3 and SNS topic

It might not be the best question but I am really lost here 这可能不是最好的问题,但是我真的在这里迷路了

I am in the EU(Ireland) zone. 我在欧盟(爱尔兰)地区。 I want to configure aws ses to receive my e-mails and forward them to an SNS topic and save them in an S3 bucket. 我想配置aws ses来接收我的电子邮件,并将它们转发到SNS主题,然后将它们保存在S3存储桶中。 I use route53 as my nameserver. 我使用route53作为我的名称服务器。

What I did so far 我到目前为止所做的

SES SES

  • setup and verified my domain: example.com 设置并验证我的域:example.com
    • added the spf and dkim records to the ns records (aws did it automatically) 将spf和dkim记录添加到ns记录中(aws自动完成)
    • enabled the dkim 启用dkim
    • setup the admin SNS topic for bounce/delivery/complaint notification 设置管理员SNS主题以发出退回/交付/投诉通知
  • verified a couple of e-mail addresses 验证了几个电子邮件地址
  • smtp setup SMTP设置
    • created IAM users for smtp and saved the credentials 为smtp创建了IAM用户并保存了凭据
  • setup the Rule sets (the only rule in the active ruleset http://prntscr.com/8tg0us ) 设置规则集(活动规则集中的唯一规则http://prntscr.com/8tg0us
    • enabled, no tls, enable spam and virus scan 已启用,没有tls,启用垃圾邮件和病毒扫描
    • recipients: 2 records - example.com and .example.com 收件人:2条记录-example.com和.example.com
    • action 行动
      • S3 bucket example-mail S3存储桶示例邮件
      • sns topic - example sns主题-示例
  • setup ip address filters: just in case with 0.0.0.0/0 and allow to make sure the it doesn't perform any ip filtering 设置ip地址过滤器:以防0.0.0.0/0,并确保不执行任何ip过滤
  • requested a send limit increase to move out of sandbox environment 请求增加发送限制以移出沙盒环境

S3 S3

  • created the example-mail bucket 创建了示例邮件存储桶
  • created the bucket policy: from the guide 创建了存储桶策略: 来自指南

SNS SNS

  • setup the example topic, subscribed my e-mail address and verified the subscriptioni 设置示例主题,订阅了我的电子邮件地址并验证了订阅
  • created the admin topic with verified e-mail address 使用已验证的电子邮件地址创建了管理员主题

And the problem 还有问题

When I send an e-mail to user86@example.com nothing happens. 当我发送电子邮件至user86@example.com时,什么都没有发生。 No mail in S3 nor SNS message. S3中没有邮件,也没有SNS消息。 If I change the recipients to info@example.com and send the mail to user86@example.com then the mail bounces. 如果我将收件人更改为info@example.com,然后将邮件发送至user86@example.com,则邮件会退回。

I tested the smtp with msmtp and outlook and it works fine so the SES is capable of receiving my e-mails on smtp level but it seems that after smtp did it's part everything goes to /dev/null and the e-mails do not reach the rule sets. 我用msmtp和Outlook测试了smtp,它工作正常,因此SES能够在smtp级别上接收我的电子邮件,但似乎在smtp完成之后,一切都变成了/ dev / null,并且电子邮件没有到达规则集。 Nothing comes to the admin topic. 管理员主题一无所获。 In the cloudWatch I should have an SES metric but I have none. 在cloudWatch中,我应该有一个SES指标,但没有。

Any idea ? 任何想法 ? I am really stuck :( 我真的被卡住了:(

Final answer capturing all the comments above: 最终答案包含了以上所有评论:

You normally use SES to send emails. 通常,您使用SES发送电子邮件。 When sending email it's the Amazon AWS SES email servers that are used. 发送电子邮件时,使用的是Amazon AWS SES电子邮件服务器。

When receiving emails you are using whatever server you have configured as your email server for the domain. 接收电子邮件时,您使用的是配置为域的电子邮件服务器的任何服务器。 This means that in your setup for incoming e-mails they don't go through SES. 这意味着在您设置的传入电子邮件中,它们不会通过SES。

To make them go through SES and implicitly have the rule you've configured above fire, you need to point the DNS MX record for your domain to the SES endpoint in the region you want to use to receive emails. 为了使它们通过SES并隐式地具有您在火灾中配置的规则,您需要将域的DNS MX记录指向要用于接收电子邮件的区域中的SES终结点。

See: https://aws.amazon.com/blogs/aws/new-receive-and-process-incoming-email-with-amazon-ses/ 参见: https : //aws.amazon.com/blogs/aws/new-receive-and-process-incoming-email-with-amazon-ses/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS - SES 不发送电子邮件 - 子网 - AWS - SES Not send e-mail - SUBNET 如何通过电子邮件通过电子邮件终端节点订阅Amazon SNS主题? - How to subscribe to Amazon SNS topic with e-mail endpoint via e-mail? 为适用于 Android 的 Amazon AWS SES 发送带附件的电子邮件? - Sending E-mail with Attachment for Amazon AWS SES for Android? 使用Go的AWS SES中的自定义电子邮件标题 - Custom e-mail headers in AWS SES using Go aws s3 事件 sns 主题通知邮件人类可读格式 - aws s3 events sns topic notification mail human readable format Laravel 5.7:通过 AWS SES 的按需电子邮件通知将我的收件人电子邮件视为发件人电子邮件并希望它被验证地址 - Laravel 5.7: On-Demand e-mail Notification via AWS SES treats my recipient e-mail as a sender e-mail and wants it to be verified address Amazon E-mail(SES)集成 - Amazon E-mail (SES) Integration 无法使用 AWS SES 发送电子邮件:我没有正确配置它吗? - Can't send e-mail using AWS SES: didn't I configure it properly? 邮件中仅需要S3更新的Key Object:SNS主题将发送整个Json - Need only S3 updated Key Object in Mail : SNS topic is sending whole Json Amazon SES - 电子邮件地址中的非ASCII字符 - Amazon SES - Non - ASCII Characters in e-mail address
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM