文章摘要
文章介绍了2026年有效的电子邮件混淆技术,包括纯文本、HTML实体、HTML注释、SVG、CSS隐藏、JS拼接、Rot18、JS转换和AES加密等方法,并提供了每种技术被垃圾邮件发送者破解的统计概率,从0%到100%不等。
文章总结
2026年有效的电子邮件混淆技术
本文探讨了多种保护电子邮件地址免受垃圾邮件收集者侵扰的技术方法,并提供了每种技术的实际防护效果数据。
一、纯文本保护技术
这些技术用于保护以纯文本形式显示的电子邮件地址(如"email@example.com")。最佳实践是组合使用多种技术,将电子邮件地址分段并用不同方法保护。
- 无保护措施:0%拦截率
- HTML实体编码:95%拦截率
- 虽然服务器端库可自动解码,但仍能阻止大多数收集器
- HTML注释插入:98%拦截率
- 仅能阻止最基本的HTML标签处理能力差的收集器
- SVG嵌入:100%拦截率
- 将地址隐藏在SVG文件中,需使用object元素而非img元素
- CSS隐藏法:100%拦截率
- 使用display:none隐藏部分地址,对屏幕阅读器友好
- JavaScript字符串拼接:100%拦截率
- 地址仍会出现在HTML源码中,安全性有限
- ROT18加密:100%拦截率
- 建议使用非13的字母旋转值和非5的数字旋转值
- 自定义转换函数:100%拦截率
- HTML中存储乱码,通过JavaScript函数转换
- AES加密:100%拦截率
- 使用浏览器内置的SubtleCrypto库,需HTTPS环境
- 用户交互触发:100%拦截率
- 需用户操作后才显示地址
破坏可用性的方法: - 符号替换(如用AT代替@) - 添加操作说明 - 使用图片显示地址 - CSS内容生成 - 文字方向反转
二、可点击链接保护技术
这些技术保护mailto链接,需注意若链接文本也包含地址,还需叠加纯文本保护技术。
- 无保护措施:0%拦截率
- HTML实体编码:100%拦截率
- URL编码:96%拦截率
- HTTP重定向:100%拦截率
- 将mailto链接转换为普通链接
- SVG嵌入:100%拦截率
- JavaScript字符串拼接:100%拦截率
- ROT18加密:100%拦截率
- 自定义转换函数:100%拦截率
- AES加密:100%拦截率
- 用户交互触发:100%拦截率
关键发现
- 大多数垃圾邮件收集器都很容易防范,简单的混淆技术就能有效阻止它们
- 收集器更倾向于追踪高流量页面,可能忽略低流量内容,但这不代表这些页面不需要保护
研究方法
本文本身就是一个"蜜罐"实验,每个技术保护的真实地址收到垃圾邮件时,就能知道哪个技术被破解。作者通过自有邮件服务器收集数据(避开了主流邮件服务的垃圾过滤),并尽可能去重以确保统计准确性。
注:统计数据会随着文章传播量的增加而变得更加精确。文章作者为Spencer Mortensen,所有示例代码均为公共领域。
评论总结
总结评论内容:
- 关于邮件地址混淆技术的有效性:
- 支持方认为简单的HTML实体编码就能有效阻止大多数爬虫: "Anecdotal, but I’ve used HTML entities... and yet I’ve not seen any spam" (newscracker) "I'm surprised that html entity substitution performs so well" (siruwastaken)
- 反对方认为这些方法对高级爬虫无效: "HTML entities are often decoded automatically... this technique should be worthless" (newscracker) "AFAICT it could reveal anything that wasn't relying on CSS tricks or JavaScript" (badsectoracula)
- 关于数据泄露与垃圾邮件的来源:
- 主要论点认为数据泄露才是垃圾邮件的主要来源: "The data-source are the enormous data breach... more intensive to collect more information on someone you already know" (ache) "Your E-mail address is not and can't be a secret. It will get into spammer databases eventually" (jwr)
- 替代解决方案:
- 使用高级过滤技术: "what works very well is spam filtering using LLMs... I see >97% accuracy" (jwr)
- 使用特殊地址标记: "I filter everything that does NOT include '+asdf' in the to:" (gfody)
- 创意混淆方法: "I use SVG... converted it to curves so the SVG doesn't have text any more" (fmajid) "obfuscate emails on my websites with [brainf*ck] language" (binaryturtle)
- 实用主义观点:
- 认为不必过度防护: "I stopped being concerned about email harvesting years ago... Spam handling is okay enough" (ciroduran) "personally i haven't bothered by email harvesting for years now since spam filters seem to do a decent job" (badsectoracula)
- 警告过度防护的风险: "make really sure you are in control... your account will be deleted" (jwr)
- 特殊技巧:
- 诱捕技术: "having an tarpit email address... block that IP for 24h" (Croak)
- 安全漏洞警告: "a 302 into a 'mailto:'... opens up my e-mail client without clicking" (xiconfjs)