简体   繁体   中英

Force SMTP server to only send mail via TLS

I'm developing an ASP.NET MVC application that needs to transmit sensitive information via email. I'm aware of using S/MIME to encrypt the email contents end-to-end, but I cannot use it for various reasons. I also realize, however, that the emails would be sent in plain-text from the web host's SMTP server to the destination email servers, opening up a serious man-in-the-middle vulnerability. Therefore, I need to ensure that the outgoing SMTP server will transmit a message ONLY IF it can establish a TLS/SSL connection with the destination mail server.

I've been searching for a while and can't even figure out where in the process that decision is made. Most answers address enforcing TLS between the application and the SMTP server, which I've already solved. Can anyone shed some light on this? Thanks.

What you are trying to do is not possible. Once you've submitted the mail to the mail server you've lost control over it. There is no way to instruct the server (and all following server in the path) to only deliver the mail with TLS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM