电子邮件实验:过滤外部图片
Email experiments: filtering out external images

原始链接: https://www.terracrypt.net/posts/email-experiments-image-filtering.html

作者注意到一个规律:大多数带有外部加载图片的邮件是自动邮件(新闻简报、营销邮件),而个人邮件很少使用它们,通常将图片作为附件发送。这引发了一个邮件过滤的想法。 考虑到自动加载外部图片可能涉及隐私问题,他们推测*检测*这些图片可以有效地将人工发送的邮件与自动邮件区分开来。他们实施了一个Sieve规则,将包含带有“https”源链接的图片标签的邮件自动归档到一个名为“自动邮件”的文件夹中。 初步结果出乎意料地有效,显著减少了收件箱的混乱。虽然一些重要的自动邮件仍然需要检查,但该过滤器大致将真正的个人邮件保留在主收件箱中。作者计划通过排除联系人来完善该规则,以防止错误归档。这属于一个更大的个人项目“2025年12月大冒险”,专注于改进邮件管理。

一个黑客新闻的讨论围绕着过滤不需要的邮件。一位用户分享了一种个人方法,即自动将包含“unsubscribe”字样的邮件归类到一个单独的文件夹中,假设没有该字样的邮件很可能是重要的交易信息。 然而,另一位用户指出这种方法可能违反加拿大的反垃圾邮件法(CASL),该法律*要求*所有邮件,甚至交易邮件,都必须包含退订机制。第三位评论者建议一个有用的过滤器:主题行中带有表情符号的邮件——特别是那个大的红色感叹号——通常是营销推广而非合法通知。 这场讨论突出了有效管理邮件混乱的挑战以及围绕邮件通信的不同法律要求。
相关文章

原文

I had a realization the other day that, on almost every email in my inbox, my mail client has a "show external images" option. Most email I receive references externally loaded images via HTML. There are good reasons for this (not needing to send a copy of an image in every email on a newsletter) as well as nefarious reasons (the remote server can track where/when you load the image). So most mail clients I've used don't load them by default for obvious privacy reasons.

This got me thinking about the reverse, though: what email do I receive that does not include external images? And the answer is, mostly, email sent manually by a real human! I'm fairly certain I've never sent an email to another person in my personal life with an externally loaded image in it. When I have, it's been work email with a standard corporate email signature (that I'm sure was being tracked, natch). Mostly, when sending images to someone, they're sent as attachments to the email.

So I had a realization that, if I wanted to naturally filter email that was sent by hand from email sent from an automated system, this might be a decent proxy for that. Here's the sieve rule I landed on for now:

if body :regex "<img[^>]*src=\"https" {
  fileinto "Inbox.Automated";
}

(Yes, it's typically folly to regex on HTML. This is a simple enough match though that I hope it's fine!)

So far, after a day or so of usage, it's been shockingly effective. There's enough potentially important stuff in my Automated folder that I will need to check that fairly frequently, but the one email that's made it through this filter into my normal inbox is one sent by hand to a mailman list. Honestly, I'll take it! This makes the volume of email in my normal inbox much much more manageable, and I expect most mail that lands there will be things I actually do want to pay attention to.

Probably you'll want to have another rule that prevents you from running this for email from people in your contacts. I haven't done that yet, but that'll be a natural next step.

This is part of my December Adventure 2025 series.

联系我们 contact @ memedata.com