Skip to content

Nuface Blog

隨意隨手記 Casual Notes

Menu
  • Home
  • About
  • Services
  • Blog
  • Contact
  • Privacy Policy
  • Login/Logout
Menu

Blog

Cleaning Up Unused Let’s Encrypt Certificates in a Docker Certbot Environment

Posted on 2025-12-052025-12-05 by Rico

How to safely remove expired or unused domain certificates from Certbot volumes When running Let’s Encrypt with Certbot inside Docker, it’s common to encounter a situation where: Some domains are no longer used, but Certbot still lists their certificates. This can cause unnecessary renewal attempts, clutter your certificate directory, and potentially confuse your web or…

Read more

使用 Docker Certbot 刪除不再使用的 Let’s Encrypt 憑證

Posted on 2025-12-052025-12-05 by Rico

在使用 Docker 版 Certbot 進行 SSL 憑證續約 (certbot renew) 的環境中,常會遇到一個問題: 「有些網域已經不用了,但 Certbot 仍然把它們列在憑證列表裡。」 這不但會讓 renew 過程變得冗長,也可能在 web server 或 mail server 設定上造成混亂。 本篇文章記錄如何在 Docker 環境下,安全地刪除不再使用的 Let’s Encrypt 憑證,包括: 📌 環境說明 Certbot 以 Docker 容器方式執行,並使用 named volumes 儲存資料: 1. 查看現有 Let’s Encrypt 憑證列表 使用以下指令查看目前所有憑證(lineage): 在實際執行後,我得到以下輸出(節錄): 從列表可見,有多張 nuface.tw 的憑證都已經不再使用,且全部過期。 2. 先排除 Certbot lock 問題(若遇到) 若出現: 代表 Vault…

Read more

Postfix + Let’s Encrypt + BIND9 + DANE Fully Automated TLSA Update Guide

Posted on 2025-12-032025-12-03 by Rico

— 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…

Read more

Postfix + Let’s Encrypt + BIND9 + DANE TLSA 指紋自動更新完整教學

Posted on 2025-12-032025-12-03 by Rico

📌 前言 在上一章介紹 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 伺服器上的完整自動化流程。 🧩 系統架構與前置條件 本文章以你的實際環境為例:…

Read more

Deploying DANE in Postfix

Posted on 2025-12-032025-12-03 by Rico

— 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….

Read more

如何在 Postfix 中部署 DANE

Posted on 2025-12-032025-12-03 by Rico

—— 以 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️⃣…

Read more

DANE: DNSSEC-Based TLS Protection

Posted on 2025-12-032025-12-03 by Rico

📌 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…

Read more

DANE:基於 DNSSEC 的 TLS 保護

Posted on 2025-12-032025-12-03 by Rico

📌 前言 在說明 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 的三項必要條件…

Read more

MTA-STS: SMTP Strict Transport Security

Posted on 2025-12-032025-12-03 by Rico

📌 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…

Read more

MTA-STS:SMTP 加密強制政策

Posted on 2025-12-032025-12-03 by Rico

📌 前言 電子郵件在傳輸過程中,本質上是明文的。如果中間遭遇 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) 範例:…

Read more

Posts pagination

  • Previous
  • 1
  • …
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • …
  • 37
  • Next

Recent Posts

  • When Lean Meets AI: From Value Stream Mapping to Intelligent Warehouse Transformation
  • 當精實管理遇上 AI:從 VSM(價值溪流圖)到智慧倉儲轉型
  • Planning and Key Considerations for IT Data Room Construction
  • IT 機房建置的規劃與考量
  • Token/s and Concurrency:

Recent Comments

  1. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on High Availability Architecture, Failover, GeoDNS, Monitoring, and Email Abuse Automation (SOAR)
  2. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on MariaDB + PostfixAdmin: The Core of Virtual Domain & Mailbox Management
  3. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on Daily Operations, Monitoring, and Performance Tuning for an Enterprise Mail System
  4. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on Final Chapter: Complete Troubleshooting Guide & Frequently Asked Questions (FAQ)
  5. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on Network Architecture, DNS Configuration, TLS Design, and Postfix/Dovecot SNI Explained

Archives

  • February 2026
  • January 2026
  • December 2025
  • November 2025
  • October 2025

Categories

  • AI
  • Apache
  • CUDA
  • Cybersecurity
  • Database
  • DNS
  • Docker
  • Fail2Ban
  • FileSystem
  • Firewall
  • Lean
  • Linux
  • LLM
  • Mail
  • MIS
  • N8N
  • OpenLdap
  • OPNsense
  • PHP
  • Python
  • QoS
  • Samba
  • Switch
  • Virtualization
  • VPN
  • VSM
  • WordPress
© 2026 Nuface Blog | Powered by Superbs Personal Blog theme