Mail Server Series — Part 5 In Part 4, we built a production-grade Postfix SMTP system with: In this article, we implement the other half of the mail delivery system — Dovecot, the component responsible for: Dovecot is the heart of your mail system — every email is ultimately stored and accessed through it. 🧩…
Blog
Dovecot:IMAP / POP3 / LMTP / SQL / SNI / Quota / Sieve / Spam 學習整合
【Mail Server 系列文:第 5 篇】 在上一章(第 4 篇)中,我們完成了 Postfix SMTP 核心: 本篇則要處理 Postfix 後端最關鍵的角色:Dovecot。 Dovecot 負責真實的信件儲存、認證、收信協定、Sieve、自動 Spam 學習等工作,是整個 Mail 系統運作品質的關鍵。 🧩 1. 本篇完成後你將擁有 ✔ IMAP(143/993)、POP3(110/995)、LMTP(24) 完整收信功能✔ Dovecot SQL 驗證(與 PostfixAdmin 資料庫整合)✔ 支援 SNI 多網域 TLS 憑證✔ 每個使用者的 mailbox quota✔ quota-warning 即時通知信✔ Sieve 過濾規則(含垃圾郵件學習)✔ IMAPSieve(使用 Roundcube 可實現「移動郵件 → 自動學習 Spam/Ham」)✔ SpamAssassin remote-learn 整合✔ 完整 Docker 化服務…
Postfix 3.10: Building a Modern SMTP Core with Docker, MySQL, SNI, Amavis & Milter
Mail Server Series — Part 4 In the previous chapters of this series, we completed: Now we move on to the heart of the mail system: Postfix. This chapter focuses on how we build a fully-featured Postfix 3.10.4 SMTP service from source code, package it into a Docker image, integrate it with MySQL, enable multi-domain…
Postfix 3.10:打造現代化 SMTP 服務核心(自建 Docker Image 完整教學)
【Mail Server 系列文:第 4 篇】 在本系列的前幾篇中,我們完成了: 本篇開始正式介紹整個郵件系統的「引擎」: 🚀 1. 為什麼 Postfix 需要自行編譯? 官方沒有提供 Postfix Docker image,而 apt 安裝的版本通常: 👉 因此本篇採用 Postfix 官方原始碼自行編譯出 Postfix 3.10.4,並包成 Docker image。 功能包括: ✔ MySQL maps✔ LMDB(tls_sni)✔ PCRE2✔ SASL (Cyrus)✔ TLS / SNI✔ 支援 PostfixAdmin 架構✔ 支援 Amavis(Virus + Spam 入口)✔ 支援 Piler Milter(X-Envelope-To) 🧱 2. 建立 Postfix Docker Image(Builder +…
MariaDB + PostfixAdmin: The Core of Virtual Domain & Mailbox Management
Mail Server Series — Part 3 In Part 2, we introduced the overall architecture and the motivation behind building a modern mail server.From this article onward, we move into the actual implementation. This third article focuses on two critical components: Together, they serve as the heart of virtual domain and mailbox management, allowing Postfix and…
MariaDB + PostfixAdmin:虛擬網域與信箱帳號管理核心
【Mail Server 系列文:第 3 篇】 在上一回(第 2 篇)我們完成了 架構導入動機 與 整體架構佈局 的說明。從這一篇開始,我們將逐步進入實作,本篇將介紹本郵件系統的核心管理組件: 這兩個元件負責管理: 也就是 Postfix + Dovecot 完整運作不可或缺的基礎。 🧩 一、架構角色說明 元件 作用 為什麼需要? MariaDB 儲存網域、帳號、密碼、轉寄設定 讓 Postfix / Dovecot 以「虛擬帳號」模式運作,不依賴系統帳號 PostfixAdmin 一個 PHP Web 介面,讓管理者新增/刪除帳號、重設密碼 不需要手動管理 SQL,不需登入主機即可管理 這一層建立之後,任何帳號/密碼/轉寄設定都在 Web UI 進行,安全又直覺。 🏗 二、MariaDB 容器建置 建立資料目錄: 啟動 MariaDB 容器(含每日備份): MariaDB 啟動後,建立 postfix 所需的資料表: 這兩個 SQL 檔負責建立:…
Network Architecture, DNS Configuration, TLS Design, and Postfix/Dovecot SNI Explained
Mail Server Series — Part 2 This article is Part 2 of the Mail Server series.In Part 1, we looked at the overall architecture and major service components.In this part, we focus on the foundational architecture required for a modern, secure, multi-domain mail server: This article provides the architectural foundation for the upcoming implementation chapters….
網路架構、DNS 設定、TLS 與 Postfix/Dovecot SNI 設計全面解析
【Mail Server 系列文:第 2 篇】 本篇文章是 Mail Server 系列的第二篇。在前一篇裡,我介紹了整體系統架構與服務角色。本篇將深入解釋: 這篇內容偏向架構篇,是後續實作篇(Postfix、Dovecot、Amavis、Piler、Roundcube)的基礎。 1. 系統網路架構概觀 以下是本文使用的 Mail Server 佈署架構(即你目前環境的版本): 🧩 核心概念:所有 Mail 功能都在同一個 Docker Network(intranet-net)之中 此設計的好處: ✨ Host(172.18.0.1)作為 Gateway 的價值 若 Host Firewall 規則錯誤(例如 REJECT ALL),容器之間會互相無法連線。 實務提醒:在 DOCKER-USER 加入一條允許 intranet-net 的規則非常重要 否則 Roundcube 會出現: 2. Mail Server 端口與防火牆規劃 Mail Server 涉及非常多 port,如果未先規劃好,會出現各種奇怪問題。 以下為本架構的實際使用端口: 服務 Port 用途 Postfix 25…
Building a Complete Enterprise-Grade Mail System (Overview)
Mail Server Series — Part 1 In most enterprise environments, a reliable, secure, and maintainable mail system is one of the most critical components of the IT infrastructure.This series will guide you through building a fully functional Docker-based mail ecosystem, covering: By the end of the series, you will have a production-ready, fully controllable email…
打造企業級郵件系統的完整指南(總綱篇)
【Mail Server 系列文:第 1 篇】 在大多數企業環境中,一套可靠、安全、可維運的郵件系統,是資訊基礎架構中最重要的核心服務之一。本系列文章將帶你從零開始,建構一套 完整的 Mail Server 生態系統:從郵件收發、內容過濾、防毒防垃圾信、使用者管理,到封存與全文檢索、Webmail 介面…全部使用可控、透明、可維護的 Docker-based 微服務架構。 🎯 系列目標 本系列將介紹如何建構一套具有以下特性的郵件系統: ✔ 支援多網域、虛擬使用者(MySQL)✔ Postfix + Dovecot —— 穩定又功能完整的核心✔ Amavis / ClamAV / SpamAssassin —— 垃圾信、病毒防護✔ Sieve + IMAPSieve —— 使用者層級的自動化信件規則✔ Quota + 使用者配額警告✔ Bayes + TxRep + Remote spam/ham learning✔ Piler 郵件封存 + Manticore 中文全文搜尋✔ Roundcube Webmail + Sieve 規則編輯✔…