Home | 简体中文 | 繁体中文 | 杂文 | 打赏(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎专栏 | Search | About

第 63 章 postfix - High-performance mail transport agent

目录

63.1. install
63.1.1. Ubuntu
63.1.2. CentOS
63.1.3. OSCM 通过配置管理脚本安装
63.2. 配置 Postfix
63.2.1. 转发配置
63.2.2. 拒收垃圾邮件
63.2.3. 收件箱配置
63.2.3.1. Mailbox 配置
63.2.3.2. Maildir 配置
63.2.3.3. 传统Unix风格邮箱配置
63.2.4. 邮件投递
63.2.5. 队列配置
63.2.6. 客户端
63.3. aliases
63.4. dkim
63.4.1. 增加域名
63.4.2. 测试
63.5. Rspamd
63.6. /var/log/maillog
63.6.1. 计算每分钟发送数量日志统计
63.6.2. 虚假地址统计
63.7. Post 命令
63.7.1. postconf - Postfix configuration utility
63.7.2. postsuper
63.7.3. postqueue - Postfix queue control
63.7.3.1. 列出队列
63.7.3.2. 刷新队列
63.7.4. postmulti - Postfix multi-instance manager
63.7.4.1. 绑定IP地址
63.7.4.2. postfix 多实例配置
63.7.4.3. 配置 iptables 让SMTPD发送邮件时依次轮询外发IP地址,这样就不会被封锁。
63.8. Example
63.8.1. 站内电邮发送
63.8.2. EDM 服务器
63.9. FAQ
63.9.1. SMTP ERROR: RCPT TO command failed: 501 5.1.3 Bad recipient address syntax
63.9.2. connect to gmail-smtp-in.l.google.com[2607:f8b0:400e:c00::1a]:25: Network is unreachable
63.9.3. opendkim[5762]: 3012A802C1DD: [49.213.11.18] [49.213.11.18] not internal
63.9.4. opendkim[12578]: 4CC5C802C382: no signature data
63.9.5. /etc/opendkim/keys/default.private: open(): No such file or directory

Postfix 主页

63.1. install

63.1.1. Ubuntu

$ sudo apt-get install postfix
			

configure

$ sudo dpkg-reconfigure postfix-config
			

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

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