java通过开源框架发邮件
The Sender Policy Framework (spf) was developed by Meng Weng Wong as a fork of Hadmut Danisch’s RMX and Gordon Fecyk’s DMP – both former efforts to battle email spam based for the most part on domain forging.
发件人策略框架 (spf)由Meng Weng Wong开发,是Hadmut Danisch的RMX和Gordon Fecyk的DMP的分支,这两个机构以前都曾致力于打击电子邮件垃圾邮件,而这些邮件大多基于域名伪造。
Wong is the founder and CTO of pobox.com and in 2004 pobox.com and Microsoft jointly submitted a draft for RFC status to the Internet Engineering Task Force (IETF) for spf and Sender ID (developed by Microsoft). There was controversy around Microsoft’s Sender ID as they filed for patents on part of the process – which would potentially hinder it from becoming a global open standard. The IETF abandoned consideration of the joint proposal for RFC status in late 2004. Microsoft has since re-submitted a new draft of Sender ID to the IETF.
Wong是pobox.com的创始人兼首席技术官,2004年,pobox.com和Microsoft共同向Internet工程任务组 (IETF)提交了sff和发件人ID的RFC身份草案(由Microsoft开发)。 微软的发件人ID在过程中申请专利时引起争议,这可能会阻止它成为全球开放标准。 IETF在2004年底放弃了关于RFC地位的联合提案的考虑。此后,Microsoft重新向IETF提交了新的发件人ID草案。
SPF for the time being is back on its own – and it is believed to be in use by more than one million domains.
SPF暂时不再依靠自己了,据信它已被超过一百万个域使用。
It seeks to battle spam by rejecting emails where the domain (namely a domain(s) under your management) is forged. It is done through DNS by specifying in DNS zones the only authorized hosts that can send mail from your domain and reconciling them to a public IP address.
它通过拒绝伪造该域(即您管理的域)的电子邮件来与垃圾邮件作斗争。 通过在DNS区域中指定唯一可以从您的域发送邮件并将其与公共IP地址协调的授权主机,可以通过DNS完成此操作。
Thus, someone forges the domain name and it is rejected as it does not match any existing approved domains in DNS. Similar to pure spam tools, there is whitelisting for exceptions and some control over whether the mail discovered to be forged is bounced, tagged or allowed through. This latter option helps with implementation testing prior to any serious use in production.
因此,有人伪造了域名,但由于它与DNS中任何现有的已批准域都不匹配,因此该域名被拒绝了。 与纯垃圾邮件工具类似,例外情况也列入白名单,并且可以控制被发现伪造的邮件是被退回,标记还是允许通过。 后一种选择有助于在产品中大量使用之前进行实施测试。
There is some debate in regard to using spf if SMTP authentication (SASL) should be mandatory. I have setup systems that use POP before SMTP as well as SASL – and could not imagine not using any sort of outgoing restrictions – however – not every environment is ready for SMTP authentication. That part is up to the system administrator and users.
是否应该强制使用SMTP身份验证(SASL),这与使用spf有关。 我的安装系统使用的是SMTP之前的POP以及SASL,并且无法想象不使用任何类型的传出限制,但是,并非所有环境都可以进行SMTP身份验证。 这部分取决于系统管理员和用户。
A very basic spf DNS record would look like this :
一个非常基本的spf DNS记录如下所示:
“v=spf1 a ~all”
“ v = spf1 a〜all”
This is spf at its elementary level for basic setups. This addition to your dns record states the domain myplace.com is the A record and also sends mail out from myplace.com. In this case the DNS zone did not have an MX record.
这是基本设置的spf。 您的dns记录的此附加内容表明域myplace.com是A记录,并且还从myplace.com发送邮件。 在这种情况下,DNS区域没有MX记录。
It does of course support standard scenarios, such as where MX records exist and a third-party may also send mail from your domain (i.e. a e-newsletter service like sparklist).
当然,它确实支持标准方案,例如存在MX记录的地方,并且第三方也可能从您的域发送邮件(即,电子通讯服务,如Sparklist)。
“v=spf1 mx include:sparklist.com ~all”
“ v = spf1 mx include:sparklist.com〜all”
This entry states mail sent through the MX record of your domain as well as originating from sparklist.com (an email newsletter) is legitimate.
该条目说明通过您的域的MX记录发送的邮件以及源自sparklist.com(电子邮件新闻稿)的邮件都是合法的。
The record can continue to grow by adding additional hosts and MX records to account for all hosts that can send mail for a specific domain.
通过添加其他主机和MX记录来说明可以为特定域发送邮件的所有主机,记录可以继续增长。
Adding an spf record to dns is straightforward. In BIND environments it is added into the zone file as:
将spf记录添加到dns很简单。 在BIND环境中,它以以下方式添加到区域文件中:
myplace.com IN TEXT “v=spf1 mx include:sparklist.com ~all”
myplace.com文字中的“ v = spf1 mx include:sparklist.com〜all”
It is added to Windows DNS as an “other new record” and selected as a text record.
它作为“其他新记录”添加到Windows DNS中,并选择为文本记录。
Before changing DNS though, you also have to ensure your MTA supports it. Of the three most popular open source MTAs, Postfix comes readily prepared for spf with an included plug-in called libspf2 ready to go. Sendmail is relatively straightforward to update for the process, with Qmail requiring easier than usual patching (surprise!).
但是,在更改DNS之前,您还必须确保MTA支持它。 在三种最受欢迎的开源MTA中,Postfix随时可以为spf做好准备,其中包括一个随时可用的名为libspf2的插件。 Sendmail更新过程相对简单 ,Qmail需要比通常的修补更容易(惊奇!)。
For those using Exim – there is an spf how to also.
对于使用Exim的用户-还有一个spf操作方法 。
翻译自: https://www.sitepoint.com/sender-policy-framework-option-to-battle-spam/
java通过开源框架发邮件
相关资源:jdk-8u281-windows-x64.exe