Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | 51CTO学院 | CSDN程序员研修院 | OSChina 博客 | 腾讯云社区 | 阿里云栖社区 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏多维度架构

第 54 章 postfix - High-performance mail transport agent

目录

54.1. install
54.1.1. Ubuntu
54.1.2. CentOS
54.1.3. OSCM 通过配置管理脚本安装
54.2. 配置 Postfix
54.2.1. 转发配置
54.2.2. 拒收垃圾邮件
54.2.3. 收件箱配置
54.2.4. 邮件投递
54.2.5. 队列配置
54.2.6. 客户端
54.2.7. SMTP 发送权限相关配置
54.3. aliases
54.4. dkim
54.4.1. 增加域名
54.4.2. 测试
54.5. Rspamd
54.6. /var/log/maillog
54.6.1. 计算每分钟发送数量日志统计
54.6.2. 虚假地址统计
54.7. Post 命令
54.7.1. postconf - Postfix configuration utility
54.7.2. postsuper
54.7.3. postqueue - Postfix queue control
54.7.4. postmulti - Postfix multi-instance manager
54.8. Example
54.8.1. 站内电邮发送
54.8.2. EDM 服务器
54.8.3. SMTP 邮件发送服务器
54.9. FAQ
54.9.1. SMTP ERROR: RCPT TO command failed: 501 5.1.3 Bad recipient address syntax
54.9.2. connect to gmail-smtp-in.l.google.com[2607:f8b0:400e:c00::1a]:25: Network is unreachable
54.9.3. opendkim[5762]: 3012A802C1DD: [49.213.11.18] [49.213.11.18] not internal
54.9.4. opendkim[12578]: 4CC5C802C382: no signature data
54.9.5. /etc/opendkim/keys/default.private: open(): No such file or directory
54.9.6. fatal: parameter inet_interfaces: no local interface found for ::1
54.9.7. NOQUEUE: reject: MAIL from unknown[192.168.3.31]: 552 5.3.4 Message size exceeds fixed limit;
54.9.8. 452 4.3.1 Insufficient system storage
54.9.9. 454 Relay access denied

Postfix 主页

54.1. install

54.1.1. Ubuntu

				$ sudo apt install postfix
			

configure

				$ sudo dpkg-reconfigure postfix-config
			

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

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