Home | 簡體中文 | 繁體中文 | 雜文 | 知乎專欄 | Github | OSChina 博客 | 雲社區 | 雲棲社區 | Facebook | Linkedin | 視頻教程 | 打賞(Donations) | About
知乎專欄多維度架構 微信號 netkiller-ebook | QQ群:128659835 請註明“讀者”

第 62 章 postfix - High-performance mail transport agent

目錄

62.1. install
62.1.1. Ubuntu
62.1.2. CentOS
62.1.3. OSCM 通過配置管理腳本安裝
62.2. 配置 Postfix
62.2.1. 轉發配置
62.2.2. 拒收垃圾郵件
62.2.3. 收件箱配置
62.2.3.1. Mailbox 配置
62.2.3.2. Maildir 配置
62.2.3.3. 傳統Unix風格郵箱配置
62.2.4. 郵件投遞
62.2.5. 隊列配置
62.2.6. 客戶端
62.2.7. SMTP 發送權限相關配置
62.3. aliases
62.4. dkim
62.4.1. 增加域名
62.4.2. 測試
62.5. Rspamd
62.6. /var/log/maillog
62.6.1. 計算每分鐘發送數量日誌統計
62.6.2. 虛假地址統計
62.7. Post 命令
62.7.1. postconf - Postfix configuration utility
62.7.2. postsuper
62.7.3. postqueue - Postfix queue control
62.7.3.1. 列出隊列
62.7.3.2. 刷新隊列
62.7.4. postmulti - Postfix multi-instance manager
62.7.4.1. 綁定IP地址
62.7.4.2. postfix 多實例配置
62.7.4.3. 配置 iptables 讓SMTPD發送郵件時依次輪詢外發IP地址,這樣就不會被封鎖。
62.8. Example
62.8.1. 站內電郵發送
62.8.2. EDM 伺服器
62.8.3. SMTP 郵件發送伺服器
62.9. FAQ
62.9.1. SMTP ERROR: RCPT TO command failed: 501 5.1.3 Bad recipient address syntax
62.9.2. connect to gmail-smtp-in.l.google.com[2607:f8b0:400e:c00::1a]:25: Network is unreachable
62.9.3. opendkim[5762]: 3012A802C1DD: [49.213.11.18] [49.213.11.18] not internal
62.9.4. opendkim[12578]: 4CC5C802C382: no signature data
62.9.5. /etc/opendkim/keys/default.private: open(): No such file or directory
62.9.6. fatal: parameter inet_interfaces: no local interface found for ::1
62.9.7. NOQUEUE: reject: MAIL from unknown[192.168.3.31]: 552 5.3.4 Message size exceeds fixed limit;
62.9.8. 452 4.3.1 Insufficient system storage
62.9.9. 454 Relay access denied

Postfix 主頁

62.1. install

62.1.1. Ubuntu

				$ sudo apt install postfix
			

configure

				$ sudo dpkg-reconfigure postfix-config
			

62.1.2. CentOS

				# yum install -y postfix
			
				myhostname = mail.example.com
				mydomain = example.com
				myorigin = $mydomain
				inet_interfaces = all
				mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
				#mynetworks = 192.168.0.0/24, 127.0.0.0/8
				#relay_domains =
				home_mailbox = Maildir/
			

62.1.3. OSCM 通過配置管理腳本安裝

				Postfix Install

				# Centos Init
				curl -s https://raw.githubusercontent.com/oscm/shell/master/os/centos7.sh | bash
				curl -s https://raw.githubusercontent.com/oscm/shell/master/os/selinux.sh | bash
				curl -s https://raw.githubusercontent.com/oscm/shell/master/os/iptables/iptables.sh | bash
				curl -s https://raw.githubusercontent.com/oscm/shell/master/os/ntpd/ntp.sh | bash
				curl -s https://raw.githubusercontent.com/oscm/shell/master/os/ssh/sshd_config.sh | bash

				# Install Postfix
				curl -s
				https://raw.githubusercontent.com/oscm/shell/master/mail/postfix/postfix.sh | bash