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…
Category: Mail
About Mail
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 規則編輯✔…
Before Building Your Mail Server: Understanding DNS & SNI Configuration
Before diving into setting up your own mail server, it’s essential to understand the DNS and TLS foundations that make email delivery secure and trustworthy.This article explains the DNS records your mail system depends on and how SNI (Server Name Indication) works in both Postfix and Dovecot. 1. Why DNS Configuration Matters for Mail Servers…
在建立 Mail Server 前,必須了解的 DNS 與 SNI 設定觀念
一、為什麼在架設 Mail Server 前要先處理 DNS? 電子郵件的收發行為是建立在 DNS 上的。無論是外部寄信給你,還是你寄信出去,DNS 都扮演「郵局導航系統」的角色。主要涉及四項紀錄: 記錄類型 功能 範例 MX (Mail Exchanger) 告訴全世界你的郵件要送到哪一台伺服器 example.com. MX 10 mail.example.com. SPF (Sender Policy Framework) 說明哪些主機有權代表你的網域寄信 v=spf1 ip4:1.2.3.4 include:_spf.google.com -all DMARC (Domain-based Message Authentication, Reporting and Conformance) SPF、DKIM 驗證結果的策略規範與報告 v=DMARC1; p=quarantine; rua=mailto:dmarc-report@example.com DKIM (DomainKeys Identified Mail) 利用簽章機制驗證郵件內容是否被竄改 在 DNS 上建立 default._domainkey.example.com TXT 💡 實際建議: 二、Postfix 的…