#23 邮件地址黑名单

2023-12-25
  1. 退订
  2. FBL 举报
  3. 运营商反馈
  4. 收件人反馈(投诉)
  5. 地址不存在
  6. 邮箱容量已满
  7. 平台或客户手动指定的域名或地址
  8. 第三方提供的黑名单地址

有些是永久禁止,有些是临时禁止(比如一个月、三个月、半年)。

#22 关于自托管邮件服务

2023-06-10

看到科技爱好者周刊推荐的一篇文章,介绍了自托管邮件服务的一些现状,主要是 Gmail 这样的主流邮箱服务提供商(MSP)拒收来自自托管邮件服务的邮件(或标记成垃圾邮件),导致自托管邮件服务的运营遇到很大的困难。

电子邮件在因特网没有出现之前就已经诞生,简单、开放,易于开发和使用,人人都能成为 Email 网络中的一个节点。实际上,大部分人都是使用的一些大 MSP 的服务,但也有部分人(或者组织)使用的是自己部署的邮件服务。他们会发现哪怕所有应该做的都做了,比如 SPF,DKIM,DMARC,他们的邮件还是经常无法正常投递出去(被拒、限流等),或者在收件人的垃圾文件夹中。

在一定程度上,MSP 的做法也是可以理解的,垃圾邮件泛滥成灾,确实防不胜防。因为邮件服务本身是毫无门槛。除非上一个手机实名制这样的严格管控,或许能解决这个问题。

文章提出的主要价值点是,什么情况下我们有必要自建邮箱服务?

  1. 准备好投入很多时间和精力来维护这套系统
  2. 搭建系统
  3. 留意 SPF 和 DMARC 报告
  4. 有服务器管理能力(Linux,Docker)
  5. ISP 支持开放 25、143、465、587、993 端口
  6. 静态 IP + rDNS 配置权限
  7. 一个合适的域名

#21 SMTP 校验主机域名

2023-02-15

Python

import smtplib
import ssl

host = 'smtp.126.com'
s = smtplib.SMTP(host)
context = ssl.create_default_context()
context.check_hostname = True
s.starttls(context=context)
s.quit()

Golang

如果服务器支持 STARTTLS,标准库 net/smtp 的 SendMail 方法就会校验主机名。

package main

import (
    "crypto/tls"
    "fmt"
    "net/smtp"
)

func main() {
    host := "smtp.126.com"
    port := 25
    c, err := smtp.Dial(fmt.Sprintf("%s:%d", host, port))
    if err != nil {
        panic(err)
    }
    tlsConfig := &tls.Config{ServerName: host}
    if err := c.StartTLS(tlsConfig); err != nil {
        panic(err) // panic: x509: certificate is valid for xxx, not yyy
    }
    if err = c.Quit(); err != nil {
        panic(err)
    }
}

#20 ARC(Authenticated Received Chain)

2023-02-08

谷歌的邮件中看到 ARC-xxx 头,研究了一下,叫做 Authenticated Received Chain
好像中文资料还非常少,直译过来,可能应该叫做 可信邮件转发链
解决的问题是邮件经过一些服务进行中转过程中,原有的安全措施 —— SPF,DKIM,DMARC —— 会失效的问题。

#19 转载:是谁拉黑了你的 IP

2021-11-24

邮件无法送达的原因有很多,例如 取消订阅、服务器不可达、地址格式错误或不存在、被判定为垃圾邮件、发信人/收信人被拒等等等等…今天,我们来聊一下 IP、域名被拒。

#18 BIMI

2021-07-22

看到新闻,谷歌正式开始在 Gmail 中启用 BIMI,显示经过验证的图标。
BIMI 全名 Brand Indicators for Message Identification,可能是邮件品牌标识的意思,作用就是在邮件中显示一个图标,用来标识邮件是否是品牌邮件。
当然这个 BIMI 就需要邮件能够通过一些手段的检测,比如 SPF, DKIM, DMARC,来保证其可靠性。

#16 转载:邮件的 Return-Path 头是什么

2020-07-31

We can all agree that email communication is essential for successful businesses. However, for your emails to be successful and produce conversions, they have to land in the inbox. 
我们都同意电子邮件通信对于成功的企业至关重要。但是,要使您的电子邮件成功并产生转化,它们必须进入收件箱。

But what happens when emails don’t make it to the inbox? Where do they go when they bounce? How are they processed?
但是,当电子邮件没有进入收件箱时会发生什么?当它们反弹时,它们会去哪里?它们是如何处理的?

Enter return-path.
使用 Return-Path 。

Return-path is a hidden email header that indicates where and how bounced emails will be processed. This header, also referred to as a bounce address or reverse path, is an SMTP address that is separate from your original sending address, and is used specifically for collecting and processing bounced messages.
Return-Path 是一个隐藏的电子邮件标头,指示处理退回电子邮件的位置和方式。此标头(也称为退回地址或反向路径)是独立于原始发送地址的 SMTP 地址,专门用于收集和处理退回的邮件。

Having a clear return-path system in place is incredibly important for your email program. It acts as a safeguard, protecting senders by providing a separate location for processing bounced emails. Your original sending inbox isn’t crowded by those “failed delivery” emails and that bounced messages are kept organized and together. Having a clear, organized return-path for bounced messages can also help your email deliverability and maintain your sending reputation.
拥有清晰的 Return-Path 系统对于您的电子邮件程序非常重要。它作为一种保护措施,通过提供单独的位置来处理退回的电子邮件来保护发件人。您的原始发送收件箱不会被那些“传递失败”的电子邮件所拥挤,并且退回的邮件保持井井有条并在一起。为退回的邮件提供清晰、有组织的 Return-Path 还有助于您的电子邮件送达率并保持您的发送声誉。

Why is return-path important?(为什么 Return-Path 很重要?)

Return-path is an important tool to have at your disposal, especially for mass email sends. Let’s say you’re sending an email blast about an offer your company is promoting to your entire email list. While we don’t want to see bounced emails, the reality is that messages can and do bounce for a variety of reasons. 
Return-Path 是您可以使用的重要工具,尤其是对于群发电子邮件。假设您正在向整个电子邮件列表发送一封关于您的公司正在推广的优惠的电子邮件爆炸。虽然我们不希望看到退回的电子邮件,但现实情况是,由于各种原因,邮件可以并且确实会退回。

When you’re sending to large groups, you can get tens, maybe even hundreds of bounced messages depending on the size and nature of your campaign. These “failed delivery” messages then come back to haunt and crowd your original sending inbox. Instead, by having an established return-path, those messages are processed and stored separately in their own specified inbox.
当您向大型群组发送邮件时,您可能会收到数十甚至数百封退回的邮件,具体取决于广告系列的规模和性质。然后,这些“传递失败”消息会再次困扰并挤占您原来的发送收件箱。相反,通过建立 Return-Path ,这些邮件将单独处理并存储在其自己指定的收件箱中。

Return-path also helps with your deliverability and sending reputation by helping to validate your identity as a sender (i.e. whether or not you’re sending spam). Because return-path is a SMTP address, it can be used by servers and inbox providers to decide how or if they want to filter your messages. Having a properly set-up return-path can help provide credibility for your messages and subsequently you, the sender, which in turn boosts your sending reputation.
Return-Path 还有助于验证您作为发件人的身份(即您是否发送垃圾邮件),从而帮助您提高送达率和发送信誉。由于 Return-Path 是 SMTP 地址,因此服务器和收件箱提供商可以使用它来决定如何或是否要过滤您的邮件。正确设置 Return-Path 有助于为您的消息提供可信度,进而为您(发件人)提供可信度,从而提高您的发送声誉。

How return-path works(Return-Path 的工作原理)

Return-path works by directing where bounced messages should go when they cannot be delivered. It is usually set up by a developer or email platform provider, but can be customized using the Domain Authentication doc in our Knowledge Center
Return-Path 的工作原理是指示退回的邮件在无法传递时应去哪里。它通常由开发人员或电子邮件平台提供商设置,但可以使用 我们知识中心的域身份验证文档进行自定义。

When a server or inbox provider receives your message, they validate your identity as a sender as well as your sending reputation before pushing you through to your intended recipients’ inboxes. 
当服务器或收件箱提供商收到您的邮件时,他们会验证您作为发件人的身份以及您的发送信誉,然后再将您推送到目标收件人的收件箱。

In this validation process, DMARC and return-path work together to get you through these filters. DMARC examines your message to confirm that the domain provided in the “sent from” field matches the domain provided in the return-path field, which helps to validate your identity as a sender. Once these domains have been confirmed and matched by DMARC, you’ll have an easier time getting through filters set by servers and inbox providers.
在此验证过程中,DMARC 和 Return-Path 协同工作,帮助您通过这些过滤器。DMARC 会检查您的邮件,以确认“发件人”字段中提供的域与 Return-Path 字段中提供的域匹配,这有助于验证您作为发件人的身份。一旦DMARC确认并匹配了这些域名,您就可以更轻松地通过服务器和收件箱提供商设置的过滤器。

There are two types of bounced emails: hard bounces and soft bounces. Hard bounces occur when there are permanent issues with a recipient, including an invalid email address or typo in your mailing list. Soft bounces are more temporary and usually occur when there’s a problem with a recipient’s inbox, including file size or attachments issues or the possibility of a recipient having a full inbox. 
退回电子邮件有两种类型:硬退回邮件和软退回邮件。当收件人存在永久性问题(包括邮件列表中的电子邮件地址无效或拼写错误)时,就会发生硬退回。软退回邮件是临时性的,通常在收件人的收件箱出现问题时发生,包括文件大小或附件问题,或者收件人的收件箱可能已满。

When a message hard bounces, the general best practice is to check that there are no typos in the recipient’s address. If there are none, you should remove the address from your mailing list. Keeping email addresses that hard bounce can damage your reputation as a sender and affect your deliverability in the long run. 
当邮件被硬退回时,一般的最佳做法是检查收件人的地址中是否有拼写错误。如果没有,您应该从邮件列表中删除该地址。保留硬退回的电子邮件地址可能会损害您作为发件人的声誉,并从长远来看影响您的送达率。

When an email soft bounces, you have a little bit more wiggle room than with a hard bounce. Email addresses that soft bounce can be kept in your mailing list for future campaigns, but you’ll want to watch them to see if they bounce again. If they continue to bounce, they should be removed from your mailing list.
当电子邮件软退回时,与硬退回相比,您有更多的回旋余地。软退回的电子邮件地址可以保留在您的邮件列表中,以备将来的广告系列使用,但您需要观察它们,看看它们是否会再次退回。如果它们继续反弹,则应将其从您的邮件列表中删除。