<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mail on SiriusKoan blog</title><link>https://blog.siriuskoan.one/tags/mail/</link><description>Recent content in Mail on SiriusKoan blog</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 02 Jul 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.siriuskoan.one/tags/mail/index.xml" rel="self" type="application/rss+xml"/><item><title>The Complete Postfix Architecture: From SMTP Handshake to Final Delivery</title><link>https://blog.siriuskoan.one/posts/postfix-architecture/</link><pubDate>Thu, 02 Jul 2026 00:00:00 +0000</pubDate><guid>https://blog.siriuskoan.one/posts/postfix-architecture/</guid><description>&lt;style&gt;
.single-content pre.mermaid { overflow-x: auto; overflow-y: hidden; text-align: center; }
/* 大螢幕（&gt; 1024px）時讓圖破出文字欄、佔滿視窗寬度，文字維持原欄寬 */
@media screen and (min-width: 1025px) {
 html { overflow-x: hidden; }
 .single-content pre.mermaid { margin-left: calc(50% - 50vw + 2.5rem); margin-right: calc(50% - 50vw + 2.5rem); }
}
&lt;/style&gt;


&lt;p&gt;Postfix 的 &lt;code&gt;main.cf&lt;/code&gt; 中有大量 &lt;code&gt;smtpd_*_restrictions&lt;/code&gt;、&lt;code&gt;*_checks&lt;/code&gt;、&lt;code&gt;*_maps&lt;/code&gt;、&lt;code&gt;milter&lt;/code&gt;、&lt;code&gt;transport&lt;/code&gt; 等參數。初次設定時，往往難以判斷各參數在郵件流程中於何處生效，以及彼此的先後順序。&lt;/p&gt;
&lt;p&gt;本文完整說明 Postfix 從郵件進入到投遞完成的架構，涵蓋各道處理環節：&lt;code&gt;postscreen&lt;/code&gt;、&lt;code&gt;smtpd&lt;/code&gt; 各階段的 &lt;code&gt;*_restrictions&lt;/code&gt;、Milter、&lt;code&gt;cleanup&lt;/code&gt; 的位址改寫（canonical / virtual / masquerade）與 &lt;code&gt;header_checks&lt;/code&gt; / &lt;code&gt;body_checks&lt;/code&gt;、佇列系統、&lt;code&gt;qmgr&lt;/code&gt; 與 &lt;code&gt;trivial-rewrite&lt;/code&gt; 的路由決策，以至各類投遞代理（delivery agent）。&lt;/p&gt;
&lt;p&gt;本文以官方文件（&lt;a href="https://www.postfix.org"&gt;postfix.org&lt;/a&gt;）為準，文中預設值以 Postfix 3.10 分支（實測 3.10.5）為基準。&lt;/p&gt;</description></item></channel></rss>