如何确认电子邮件来源 [英] how to confirm email source

查看:196
本文介绍了如何确认电子邮件来源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从smtp服务器发送电子邮件,例如,将设置为 anyemail@anydomain.com 。收件人将认为电子邮件来自 anydomain 。如何确认电子邮件来源?

I send an email from my smtp server, for example, setting From to anyemail@anydomain.com. The recipient will think that email comes from anydomain. How to confirm the email source?

推荐答案

有几种处理电子邮件伪造的方法:

There are several approaches to dealing with email forgery:


  • 使用 PGP SSL签名证书

  • 使用 SPF

  • 检查已收到标题(虽然这不可靠)

  • 回复发件人,询问他们是否实际发送。如果你知道发件人,可以亲自或通过电话问他们。

  • Use PGP or SSL signed certificates
  • Use SPF
  • check the Received headers (although this isn't reliable)
  • reply back to the sender and ask if they actually sent it. If you know the sender, maybe ask them in person or over the phone.

要实现的主要是,From:address没有任何形式的保证信息的发起人。

The main thing to realise is that the From: address isn't any form of guarantee about the originator of a message.

编辑:好的,我现在明白,你只是试图标记邮件的某种方式,以便你可以识别哪个服务器生成它(以非安全的方式)。以下是使用.NET的MailMessage的方式:

okay I now understand that you're just trying to tag the mail message somehow so that you can recognise which server generated it (in a non-secure way). Here's how using .NET's MailMessage:

System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage();
msg.Headers.Add("X-Is-Development", "true");

这篇关于如何确认电子邮件来源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆