Alan Hou的个人博客

Linux下邮件相关命令

https://github.com/PHPMailer/PHPMailer
查看发送中的邮件 /var/spool/postfix/maildrop/
查看队列中的邮件 mailq
查看配置:postconf -n

删除队列中的邮件 postsuper -d ALL

队列中邮件重新发送postqueue -f

关闭邮件服务 /etc/init.d/postfix stop

邮件日志 /var/log/maillog

测试邮件mail -s test test@alanhou.org,若出现如下报错,请执行yum install mailx -y

-bash: mail: command not found

测试25端口 telnet alt2.gmail-smtp-in.l.google.com 25(这里以gmail为例,可选择其它网站)

出现类似connect to 127.0.0.1[127.0.0.1]:10024: Connection refused报错,尝试启动或重启amavis

service amavisd restart

yum install amavisd-new -y

amavis详细配置

http://wiki.centos.org/HowTos/Amavisd

http://www.inmotionhosting.com/support/email/email-troubleshooting/send-mail-via-gmail-when-server-ip-is-blocked

工具:

http://mxtoolbox.com/

http://www.mail-tester.com/

 

出现类似Recipient address rejected: Greylisting in effect, please come back later的报错,是postfix的greylisting在作祟,配置文件(CentOS iredmail)在/etc/policyd/cluebringer.conf中,但是也可以在 /etc/postfix/main.cf文件中删除 check_policy_service inet:127.0.0.1:10031相关内容在取消屏蔽

/etc/pmta/config自定配置

reply /delivery not authorized/ mode=backoff #针对gmail

 

dmarc记录

_dmarc.example.com TXT "v=DMARC1; p=none; rua=mailto:aggregate@thirdparty.com"
退出移动版