Home | 簡體中文 | 繁體中文 | 雜文 | 打賞(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎專欄 | Search | Email

第 61 章 postfix - High-performance mail transport agent

目錄

61.1. install
61.1.1. Ubuntu
61.1.2. CentOS
61.1.3. OSCM 通過配置管理腳本安裝
61.2. 配置 Postfix
61.2.1. 轉發配置
61.2.2. 拒收垃圾郵件
61.2.3. 收件箱配置
61.2.3.1. Mailbox 配置
61.2.3.2. Maildir 配置
61.2.3.3. 傳統Unix風格郵箱配置
61.2.4. 郵件投遞
61.2.5. 隊列配置
61.2.6. 客戶端
61.3. dkim
61.3.1. 增加域名
61.3.2. 測試
61.4. Rspamd
61.5. /var/log/maillog
61.5.1. 計算每分鐘發送數量日誌統計
61.5.2. 虛假地址統計
61.6. Post 命令
61.6.1. postconf - Postfix configuration utility
61.6.2. postsuper
61.6.3. postqueue - Postfix queue control
61.6.3.1. 列出隊列
61.6.3.2. 刷新隊列
61.6.4. postmulti - Postfix multi-instance manager
61.6.4.1. 綁定IP地址
61.6.4.2. postfix 多實例配置
61.6.4.3. 配置 iptables 讓SMTPD發送郵件時依次輪詢外發IP地址,這樣就不會被封鎖。
61.7. Example
61.7.1. 站內電郵發送
61.7.2. EDM 伺服器
61.8. FAQ
61.8.1. SMTP ERROR: RCPT TO command failed: 501 5.1.3 Bad recipient address syntax
61.8.2. connect to gmail-smtp-in.l.google.com[2607:f8b0:400e:c00::1a]:25: Network is unreachable
61.8.3. opendkim[5762]: 3012A802C1DD: [49.213.11.18] [49.213.11.18] not internal
61.8.4. opendkim[12578]: 4CC5C802C382: no signature data
61.8.5. /etc/opendkim/keys/default.private: open(): No such file or directory

Postfix 主頁

61.1. install

61.1.1. Ubuntu

$ sudo apt-get install postfix
			

configure

$ sudo dpkg-reconfigure postfix-config
			

61.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/
			

61.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