SES 的 AWS TLS 1.2 警报 - 如何修复?

问题描述 投票:0回答:1

因此,我在 AWS Beanstalk 上运行 SaaS 应用程序,但在通过 SES 发送电子邮件时没有收到使用 TLS 1.0/1.1 的通知。

这是我收到的通知电子邮件的示例:

请参阅以下内容,了解有关在 2023 年 7 月 16 日至 2023 年 7 月 30 日期间使用简单邮件传输协议 (SMTP) 从您的帐户到 SES 检测到的 TLS 1.0 或 TLS 1.1 连接的更多详细信息。我们无法为这些提供 UserAgent连接,因为它是 HTTP 协议的一部分,但不是 SMTP 连接的一部分。

Region  |  Event |  Message ID | Source IP  |  TLS Version
eu-west-1 | SMTP Message|010201896d2c1920-XXXXXXXX-bb4e-420e-8b0b-6a6939642cf8-000000 | 18X.XXX.XXX.175 | TLSv1 |
eu-west-1 | SMTP Message|01020189868f3ff5-XXXXXXXX-8943-42d7-827c-c41b0c393b1c-000000 | 18X.XXX.XXX.175 | TLSv1 |
eu-west-1 | SMTP Message|010201898ceadb71-XXXXXXXX-0198-4694-8c7d-3ad1f58bb21a-000000 | 18X.XXX.XXX.175 | TLSv1 |
eu-west-1 | SMTP Message|0102018973eba89d-XXXXXXXX-1158-4f05-94f0-04e52a683646-000000 | 18X.XXX.XXX.175 | TLSv1 |
eu-west-1 | SMTP Message|01020189a5e5638e-XXXXXXXX-2439-400f-a68e-98219e97061f-000000 | 13X.XXX.XXX.219 | TLSv1 |
eu-west-1 | SMTP Message|01020189914b2df8-XXXXXXXX-fb08-43d7-9c68-d3df15674757-000000 | 18X.XXX.XXX.59 | TLSv1 |

这是一个在 Framework 4.7.2 上运行的 .Net 应用程序,使用 System.Net.Mail 发送电子邮件。下面是自定义 SendMail() 函数代码示例:

// create the mail message
MailMessage mail = new MailMessage { BodyEncoding = System.Text.Encoding.UTF8, IsBodyHtml = true, From = new MailAddress(senderAddress, senderName) };

//set the addresses
mail.To.Add(receiverAddress);
mail.Subject = subject;
mail.Body = message;

NetworkCredential nwc = new NetworkCredential(System.Configuration.ConfigurationManager.AppSettings["GenesisMailCredentialsEmail"], System.Configuration.ConfigurationManager.AppSettings["GenesisMailCredentialsPassword"]);
SmtpClient smtp = new SmtpClient(System.Configuration.ConfigurationManager.AppSettings["GenesisMailSMTP"].ToString()) { Port = port, UseDefaultCredentials = false, Credentials = nwc, EnableSsl = useSSL };
smtp.Send(mail);

我已按照 AWS 的建议将所有服务器环境更新到最新版本,但我仍然收到这些通知电子邮件。当我从应用程序发送电子邮件时,如何启用 TLS 1.2?任何帮助将不胜感激。

amazon-web-services tls1.2
1个回答
0
投票
出于某些古老的兼容性原因,.NET 将使用旧版本的 TLS。 你可以使用Tls1.3

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls13;


    

© www.soinside.com 2019 - 2024. All rights reserved.