Wishlist 0 ¥0.00

SPF 记录:原理、语法及配置方法简介

SPF,全称为 Sender Policy Framework,即发件人策略框架。

当前 Email 通信,还是在使用 SMTP 这个协议。SMTP 的全称为 Simple Mail Transfer Protocol,即「简单邮件传输协议」。正如它的名字锁暗示的,SMTP 实际上是一个非常简单(甚至简陋)的传输协议,本身并没有很好的安全措施。根据 SMTP 的规则,发件人的邮箱地址是可以由发信方任意声明的。在 SMTP 协议制定的时候也许还好,但在垃圾和诈骗邮件横行的今天,这显然是极不安全的。

SPF 出现的目的,就是为了防止随意伪造发件人。

SPF 记录的原理

SPF 记录实际上是服务器的一个 DNS 记录,原理其实很简单:

假设邮件服务器收到了一封邮件,来自主机的 IP 是173.194.72.103,并且声称发件人为This email address is being protected from spambots. You need JavaScript enabled to view it.。为了确认发件人不是伪造的,邮件服务器会去查询example.com的 SPF 记录。如果该域的 SPF 记录设置允许 IP 为173.194.72.103的主机发送邮件,则服务器就认为这封邮件是合法的;如果不允许,则通常会退信,或将其标记为垃圾/仿冒邮件。

因为不怀好心的人虽然可以「声称」他的邮件来自example.com,但是他却无权操作example.com的 DNS 记录;同时他也无法伪造自己的 IP 地址。因此 SPF 是很有效的,当前基本上所有的邮件服务提供商(例如 Gmail、QQ 邮箱等)都会验证它。

SPF 记录的语法

一条 SPF 记录定义了一个或者多个 mechanism,而 mechanism 则定义了哪些 IP 是允许的,哪些 IP 是拒绝的。

这些 mechanism 包括以下几类:

all | ip4 | ip6 | a | mx | ptr | exists | include

每个 mechanism 可以有四种前缀:

"+"  Pass(通过)
"-"  Fail(拒绝)
"~"  Soft Fail(软拒绝)
"?"  Neutral(中立)

测试时,将从前往后依次测试每个 mechanism。如果一个 mechanism 包含了要查询的 IP 地址(称为命中),则测试结果由相应 mechanism 的前缀决定。默认的前缀为+。如果测试完所有的 mechanisms 也没有命中,则结果为 Neutral。

除了以上四种情况,还有 None(无结果)、PermError(永久错误)和 TempError(临时错误)三种其他情况。对于这些情况的解释和服务器通常的处理办法如下:

结果 含义 服务器处理办法
Pass 发件 IP 是合法的 接受来信
Fail 发件 IP 是非法的 退信
Soft Fail 发件 IP 非法,但是不采取强硬措施 接受来信,但是做标记
Neutral SPF 记录中没有关于发件 IP 是否合法的信息 接受来信
None 服务器没有设定 SPF 记录 接受来信
PermError 发生了严重错误(例如 SPF 记录语法错误) 没有规定
TempError 发生了临时错误(例如 DNS 查询失败) 接受或拒绝

注意,上面所说的「服务器处理办法」仅仅是 SPF 标准做出的建议,并非所有的邮件服务器都严格遵循这套规定。

Mechanisms

下面介绍上面提到的 mechanism:

all

表示所有 IP,肯定会命中。因此通常把它放在 SPF 记录的结尾,表示处理剩下的所有情况。例如:

"v=spf1 -all" 拒绝所有(表示这个域名不会发出邮件)
"v=spf1 +all" 接受所有(域名所有者认为 SPF 是没有用的,或者根本不在乎它)

ip4

格式为ip4:<ip4-address>或者ip4:<ip4-network>/<prefix-length>,指定一个 IPv4 地址或者地址段。如果prefix-length没有给出,则默认为/32。例如:

"v=spf1 ip4:192.168.0.1/16 -all"
只允许在 192.168.0.1 ~ 192.168.255.255 范围内的 IP

ip6

格式和ip4的很类似,默认的prefix-length/128。例如:

"v=spf1 ip6:1080::8:800:200C:417A/96 -all"
只允许在 1080::8:800:0000:0000 ~ 1080::8:800:FFFF:FFFF 范围内的 IP

a 和 mx

这俩的格式是相同的,以a为例,格式为以下四种之一:

a
a/<prefix-length>
a:<domain>
a:<domain>/<prefix-length>

会命中相应域名的 a 记录(或 mx 记录)中包含的 IP 地址(或地址段)。如果没有提供域名,则使用当前域名。例如:

"v=spf1 mx -all"
允许当前域名的 mx 记录对应的 IP 地址。

"v=spf1 mx mx:deferrals.example.com -all"
允许当前域名和 deferrals.example.com 的 mx 记录对应的 IP 地址。

"v=spf1 a/24 -all"
类似地,这个用法则允许一个地址段。

例如,这是一个比较常见的 SPF 记录,它表示支持当前域名的 a 记录和 mx 记录,同时支持一个给定的 IP 地址;其他地址则拒绝:

v=spf1 a mx ip4:173.194.72.103 -all

include

格式为include:<domain>,表示引入<domain>域名下的 SPF 记录。注意,如果该域名下不存在 SPF 记录,则会导致一个PermError结果。例如:

"v=spf1 include:example.com -all" 即采用和 example.com 完全一样的 SPF 记录

exists

格式为exists:<domain>。将对<domain>执行一个 A 查询,如果有返回结果(无论结果是什么),都会看作命中。

ptr

格式为ptr或者ptr:<domain>。使用ptr机制会带来大量很大开销的 DNS 查询,所以连官方都不推荐使用它。

关于v=spf1

这是必须的,这个表示采用 SPF 1 版本,现在它的最新版本就是第 1 版。

Modifiers

SPF 记录中还可以包括两种可选的 modifier;一个 modifier 只能出现一次。

redirect

格式为redirect=<domain>

将用给定域名的 SPF 记录替换当前记录。

exp

格式为exp=<domain>,目的是如果邮件被拒绝,可以给出一个消息。而消息的具体内容会首先对<domain>执行 TXT 查询,然后执行宏扩展得到。

如何用 SPF 保护我的域名

如果你拥有自己的域名,并且用它发送邮件,那么你应该为它添加 SPF。通过域名服务商提供的「域名解析」、「DNS Editor」或者「DNS Zone Editor」等功能添加,并填写正确的 SPF 数据就可以了。

严格来说,SPF 数据应该创建为 SPF 记录。但是鉴于很多 DNS 服务商不支持 SPF 记录,甚至有的邮件服务器也不支持 SPF 记录,因此也可以创建为一条 TXT 记录。目前,你应该至少创建一条 TXT 记录。

因为本质上 SPF 的作用是为一个域名指定合法的发件 IP,所以你需要知道自己使用的邮件服务器的发件 IP 是什么。如果你使用第三方的域名邮箱服务(比如腾讯的域名邮箱),那么他们应该有相应的文档告诉你该怎么填写。如果你用虚拟主机,则主机提供商也应该会告诉你。

生效时间

SPF 记录本质上是一个 DNS 记录,所以并不是修改之后立即生效的——通常需要几个小时的时间。

一些工具

虽然我不能帮你决定 SPF 该填什么,但是这里有一些非常好用的工具可以帮助你,点击它们在新窗口打开:

  • Open SPF:官方网站,有很多资料,值得一看。
  • RFC 4408:SPFv1 的规范全文。
  • SPF Recored Testing Tools:帮助你验证域名是否存在 SPF 记录、记录的语法是否正确,以及输入 IP 和 host 来测试是不是真正管用。
  • SPF: Why?:为什么我发的邮件被拒绝了?
  • Beveridge Hosting DNS Lookup:图形界面的dig,也可以显示查询到的 SPF 信息。
  • Beveridge SPF Test:另一个根据 IP 和 host 验证 SPF 是否通过的工具。
  • Gmail:如果你有 Gmail 的话,可以给自己的 Gmail 邮箱发一封邮件,然后用 Gmail 独有的 Show Original 功能查看 Gmail 服务器的 SPF 判断结果。

hmailserver配置步骤(SMTP)

1.新增域:rongdaitong.dev

2.新增帐户:This email address is being protected from spambots. You need JavaScript enabled to view it.  并设置密码

3.协议:仅勾选SMTP

4.日志:启用SMTP日志

5.禁用auto-ban

6.IP范围:internet 全部禁用   mycomputer全部启用

7.高性能:100  100  100  highest

8.SMTP  Delivery of e-mail   :本机IP地址  127.0.0.1  或者外网IP地址  

9.Setting-Protocols-smtp-delivery of e-mail -重试次数设置为0,避免无效重试

 

 

 
 

Missing MEAISM.dll

Missing MEAISM.dll

  •  

Post by pcapozzi » Sat Jan 03, 2015 6:08 pm

After install and opening the management console I try to add a post office. I get an error

It seems to be not finding the file Meaism.dll. Stack strace is below. Please help.


System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DllNotFoundException: Unable to load DLL 'MEAISM.DLL': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at MailEnable.Administration.Domain.SetCurrentHost(String& CurrentHost)
at MailEnable.Administration.Domain.SetHost()
at MailEnable.Administration.Console.modMain.DomainExists(String& sDomain, String& sAccount)
at MailEnable.Administration.Console.NewPostoffice.ValidateControl(String& ErrorMessage)
at MailEnable.Administration.Console.NewItem.OKButton_Click(Object sender, EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
--- End of inner exception stack trace ---
at Microsoft.ManagementConsole.Internal.SnapInMessagePumpProxy.OnThreadException(Object sender, ThreadExceptionEventArgs e)
at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at MailEnable.Administration.Console.PostOfficesNode.CreatePostoffice(PostOfficesNode& nodePostoffices, String HostAddress)
at MailEnable.Administration.Console.PostOfficesNode.PerformAction(Action action, AsyncStatus status)
at MailEnable.Administration.Console.MmcDoubleClickListView.OnAction(Action action, AsyncStatus status)
 
MailEnable-Ian
 
Site Admin
Posts: 9308
Joined: Mon Mar 22, 2004 4:44 am
Location: Melbourne, Victoria, Australia

Re: Missing MEAISM.dll

  •  

Post by MailEnable-Ian » Wed Jan 07, 2015 12:15 am

Hi,

Try and reinstall and ensure you right click on the install file for MailEnable and select to "Run as administrator". Also ensure that you are logged into the server with administrative rights to the server when installing MailEnable.
Regards,

Ian Margarone
MailEnable Support

修复MEAISM.dll丢失或找不到错误消息

Fix MEAISM.dll is Missing or Not Found Error Messages

 

What is MEAISM.dll?

MEAISM.dll is a dynamic link library file that is part of developed by MailEnable. The version of the software: is usually about in size, but the version you have may differ. DLL files are a file format for dynamic link libraries that is used to store several codes and procedures for Windows programs. DLL files have been created to allow several programs to use their information simultaneously, thus preserving memory. It also allows the user to modify the encoding of several applications at once without changing the applications themselves. DLLs can be converted to static libraries using MSIL disassemble or DLL to Lib 3.00. The file format of.EXE files is similar to that of DLL. DLL files, and both types of files contain code, data and resources.

The most important facts about MEAISM.dll:

  • Name: MEAISM.dll
  • Software: MailEnable Messaging Services for Microsoft Windows
  • Publisher: MailEnable
  • Publisher URL: www.mailenable.com
  • Help file:
  • Known to be up to 15.43 MB in size on most Windows;

 

Is MEAISM.dll safe, or is it a virus or malware?

The answer is no, in itself, MEAISM.dll should not damage your computer.

Unlike executable programs, such as those with the EXE extension, DLL files cannot be executed directly, but must be called by another code that is already executed. However, DLLs have the same format as EXEs and some can even use the .EXE extension. While most dynamic link libraries end with the .DLL extension, others can use.OCX, .CPL or .DRV.

DLL files are useful because they allow a program to separate its different components into individual modules, which can then be added or deleted to include or exclude certain features. If the software works this way with DLLs, the program can use less memory because it does not need to load everything at the same time.

On the other hand, if the .dll file is attached to an executable that is intended to damage your computer, it is possible that it is dangerous. We recommend you run a scan of your system with a tool like this that can help identify any issues that may exist.

That's why normally when you see a new .dll file on your computer, there will be an .exe file somewhere.

Make sure you scan both together so you don't have to worry about your computer being infected with something bad.

Can I remove or delete MEAISM.dll?

 

According to various sources online, 7% of people remove this file, so it may be harmless, but it is recommended that you check the trustworthiness of this executable yourself to determine if it is safe or a virus.

Software programs store DLL files in one or more folders during installation. These files contain code that explains the operation to the programs.

If you are considering deleting MEAISM.dll, it is probably best to leave it alone. The reason for this logic is that some programs share these files, so deleting a particular DLL file can unintentionally cause problems. This means that deleting MEAISM.dll may cause one or more other programs to stop working, or only to a limited extent.

Some software can also install DLL files in several folders outside the Program Files folder (where most programs are installed). Finding these DLL files can be very difficult, and deleting them can be dangerous.

As mentioned above, if you are not sure if MEAISM.dll is being used by another program, we recommend that you leave it alone. However, if you need to delete the file, we recommend that you first make a copy. If you then have a problem with another program that requires you to use the recently deleted DLL file, you can restore the file from the backup.

 

Common MEAISM.dll error messages

As you can imagine, some DLLs appear more often in error messages than others. Here are some of the DLLs that are best known to cause problems.

  • The application failed to start because MEAISM.dll was not found. Re-installing the application may fix this problem.
  • MEAISM.dll Not Found
  • MEAISM.dll Is Missing
  • Required DLL MEAISM.dll Not Found
  • The application or MEAISM.dll is not a valid Windows image
  • MEAISM.dll is either missing or corrupt
  • Cannot find MEAISM.dll
  • Cannot start MEAISM.dll. A required component is missing: MEAISM.dll. Please install MEAISM.dll again.

How to fix MEAISM.dll




 

If MEAISM.dll is missing or corrupted, it can impact many applications, including the operating system, which can prevent you from doing your job or using critical features in critical software.

Run SFC

sfc for corrupted DLL

The safest way to repair missing or corrupted MEAISM.dll file caused by your Windows operating system, is to run the built-in System File Checker, which replaces missing or corrupted system files.

To do this, right-click the Start button on your Windows 10 computer to open the WinX menu and click the Command Prompt (Admin) link.

In the CMD window, copy the following command and press Enter :

sfc /scannow

The scan may take 10 minutes, and if it is successfully completed, you must restart your PC. Running sfc /scannow in safe mode or at startup can give better results.

 

Update drivers

 

Update-Drivers

 

Sometimes, you’ll get a missing MEAISM.dll file error while using hardware, such as a printer. This error can be due to an older version of the driver that is not compatible with the updated .dll file, so the printer is looking for a wrong .dll file and can’t find it.

Update your device’s drivers to see if this fixes the problem.

 

Startup repair

startup repair tool

Startup repair is another way to restore all .dll files like MEAISM.dll to their original working condition. However, this fix can cause problems in other programs, especially if a program has updated the .dll files.

 

Download or reinstall MEAISM.dll

 

replace missing DLL files

In most tutorials and guides, authors warn their readers not to download missing MEAISM.dll files from random and unusable websites that could provide them with malware. This is not without reason, of course. The truth is that the Internet is full of websites that promise users to solve their problems by opening certain applications or programs as soon as possible. Unfortunately, very few can really meet your expectations.

Although less common, a potentially much worse problem is that DLLs that you download from sources other than the provider can sometimes be loaded with viruses or other malware that can infect your PC. This is especially true for websites that are not too careful about where their files come from. And it's not as if these sites will do anything to tell you about their high-risk sources.

Fortunately, the process of installing MEAISM.dll is quite simple. In short, all you have to do is copy the original DLL file into C:\Windows\System32. Once the .DLL has been copied, run the following command: regsvr32 MEAISM.dll and your .DLL will be successfully installed.

The only way to ensure that you get a stable, up-to-date and clean MEAISM.dll is to get it from the source from which it comes.

About Us

Since 1996, our company has been focusing on domain name registration, web hosting, server hosting, website construction, e-commerce and other Internet services, and constantly practicing the concept of "providing enterprise-level solutions and providing personalized service support". As a Dell Authorized Solution Provider, we also provide hardware product solutions associated with the company's services.
 

Contact Us

Address: No. 2, Jingwu Road, Zhengzhou City, Henan Province

Phone: 0086-371-63520088 

QQ:76257322

Website: 800188.com

E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.