— Example: mail.it.nuface.tw (DNSSEC-enabled) 📌 Introduction DANE (DNS-based Authentication of Named Entities) brings strong, DNSSEC-backed authentication to SMTP over TLS. By publishing a TLSA record protected by DNSSEC, you can let sending MTAs verify: When using the recommended mode: You bind the certificate’s SubjectPublicKeyInfo fingerprint (SHA-256) into DNS. ❗ Why automation is mandatory? Let’s Encrypt…
Category: Mail
About Mail
Postfix + Let’s Encrypt + BIND9 + DANE TLSA 指紋自動更新完整教學
📌 前言 在上一章介紹 DANE 時,我們提到 DANE(DNS-based Authentication of Named Entities)透過 DNSSEC 加簽的 TLSA 記錄,讓寄件端 MTA 在進行 SMTP over TLS(port 25)時: 若使用 TLSA(3 1 1)模式,就表示綁定的是「伺服器公鑰指紋」。因此只要 你的憑證更新,公鑰可能跟著變動 → TLSA 記錄也必須同步更新。 Let’s Encrypt 憑證 90 天更新一次。若 TLSA 沒同步更新,就會造成使用 DANE 的收件端拒收郵件,例如: 因此: 🎯 憑證自動更新 + TLSA 自動更新 + BIND DNSSEC 自動簽署 = 必須全自動化 這篇文章將示範我在 mail.it.nuface.tw 伺服器上的完整自動化流程。 🧩 系統架構與前置條件 本文章以你的實際環境為例:…
Deploying DANE in Postfix
— Real-World Example with mail.it.nuface.tw and BIND9 0. Environment Overview Goal: 1️⃣ Generate TLSA data (3 1 1) from your certificate We’ll use this common combination: So the TLSA record will look like: TLSA 3 1 1 <fingerprint> Run this inside your mail container: You’ll get something like: Keep this value for the TLSA record….
如何在 Postfix 中部署 DANE
—— 以 mail.it.nuface.tw + BIND9 自建 DNS 為實例 0. 環境說明 目標:✅ 為 mail.it.nuface.tw:25 建立 TLSA 記錄✅ 在 BIND9 zone 中加入 DANE✅ 讓 Postfix 對外寄信時啟用 DANE 驗證對方憑證✅ 對外來信者提供 DANE 能驗證的憑證資訊 1️⃣ 從憑證產生 TLSA 指紋(3 1 1) 我們使用常見且實務上最好用的組合: 也就是: TLSA 3 1 1 <指紋> 在你的 mail 容器裡執行(或掛載憑證後,在主機跑也可以): 輸出會像這樣(示意): 這一長串 64 個十六進位字元,就是 TLSA 3 1 1 要用的值。 2️⃣…
DANE: DNSSEC-Based TLS Protection
📌 Introduction As mentioned in the MTA-STS article, SMTP over TLS is vulnerable to downgrade and MITM attacks. MTA-STS improves security but still relies on HTTPS, CA certificates, and DNS TXT records, which may be intercepted or manipulated. For environments requiring even stronger, cryptographically verifiable security, there is DANE (DNS-based Authentication of Named Entities). DANE…
DANE:基於 DNSSEC 的 TLS 保護
📌 前言 在說明 MTA-STS 時,我們提到它可以「強制 TLS 加密」與「驗證憑證」,但仍存在以下限制: 因此,對安全性要求更高的企業或政府單位,更偏好採用 DANE(DNS-based Authentication of Named Entities)。 DANE 從根本上解決了憑證信任問題: 👉 「把 TLS 憑證資訊寫死在 DNS 中,並透過 DNSSEC 簽章保護」👉 任何憑證遭竄改、替換、MITM,都會立即被拒收 🔐 什麼是 DANE? DANE 是一種使用 DNSSEC 驗證 TLS 憑證的安全機制。 簡單說: DANE 比 MTA-STS 更安全,因為: ✔ 完全防止 MITM ✔ 無法被降級攻擊 ✔ 憑證必須與 DNSSEC 所公布的內容完全一致 ✔ 不需要 CA、甚至可用自簽憑證(但必須與 TLSA 匹配) 🧩 DANE 的三項必要條件…
MTA-STS: SMTP Strict Transport Security
📌 Introduction Traditional SMTP transmits email in plaintext, which makes it vulnerable to downgrade attacks, DNS spoofing, and man-in-the-middle (MITM) attacks. To strengthen email security, major providers like Google, Microsoft, and Yahoo introduced MTA-STS (Mail Transfer Agent – Strict Transport Security). The goal of MTA-STS is simple: 👉 Force all sending MTAs to use encrypted…
MTA-STS:SMTP 加密強制政策
📌 前言 電子郵件在傳輸過程中,本質上是明文的。如果中間遭遇 DNS 欺騙、降級攻擊(downgrade attack)或中間人攻擊(MITM),郵件的內容和憑證就可能被攔截或竄改。為提升郵件安全性,Google、Microsoft、Yahoo 等大型郵件供應商提出 MTA-STS(Mail Transfer Agent – Strict Transport Security)標準。 MTA-STS 的目的很簡單: 👉 強制所有寄件伺服器使用 TLS 加密,並驗證憑證,否則拒絕投遞。 🔐 什麼是 MTA-STS? MTA-STS 是一種針對 SMTP 的安全強化機制,允許網域擁有者發布政策,要求其他郵件伺服器: 如果寄件端無法建立安全連線,郵件就會被暫存或退回,而不是以明文方式傳輸。 🧩 MTA-STS 的四大組成 1️⃣ DNS TXT 記錄 宣告你的網域啟用 STS 服務: id 代表版本,只要政策更新就需要調整。 2️⃣ HTTPS 端點(固定 URL) 寄件方會透過 HTTPS 下載你的 STS 政策: 要求: 3️⃣ MTA-STS 政策檔案(Policy File) 範例:…
Strengthening Mail Server Security: TLS, SPF, DKIM, DMARC, MTA-STS, and DANE
Mail Server Series — Part 20 After completing all major components in the previous 19 articles—including Postfix, Dovecot, Amavis, SpamAssassin, SQL Bayes, Piler, Manticore Chinese search, Roundcube, and monitoring—we now reach the most critical layer of enterprise email infrastructure: Comprehensive Mail Security Hardening Modern email threats include: To counter these threats, today’s secure email systems…
郵件系統的全面資安強化:TLS、SPF、DKIM、DMARC、MTA-STS、DANE
【Mail Server 系列文:第 20 篇】 在前面 19 篇文章中,我們已經完成: 接下來要進入企業郵件系統最重要的一環: 郵件系統資安強化(Mail Security Hardening) 企業郵件最大的風險來源包括: 本篇將介紹郵件界最重要的 6 大保護機制: ✔ TLS(加密傳輸)✔ SPF(寄件來源驗證)✔ DKIM(郵件簽章)✔ DMARC(偽造防護、政策控制)✔ MTA-STS(SMTP 加密強制)✔ DANE(DNSSEC 保護 TLS) 這些強化後,你的郵件系統可達到: 1. TLS:郵件傳輸加密(基本但必要) SMTP 共有三種加密方式: Port 協定 功能 25 STARTTLS 與外部 Mail 互聯,一般不強制 587 Submission 用戶端寄信,必須強制 465 SMTPS 全程 TLS 我們採用: Let’s Encrypt 憑證實際掛載: 確保弱加密完全禁用: 若你的 SSL Labs 測試能到達…