postfix和dovecot配置常见问题

1.,foxmail 发送邮件提示  Relay access denied
relay_domains = $mydestination  看下mydestination值是否正确mysql

2,  postfix/sendmail[42725]:  fatal: chdir /var/spool/postfix: Permission denied
权限不对,chmod 755 /var/spool/postfix 便可。sql

3,邮件在队列里面,maillog有以下错误
Dec  6 19:40:19 xmail postfix/smtpd[58114]: warning: SASL: Connect to smtpd failed: No such file or directory
Dec  6 19:40:19 xmail postfix/smtpd[58114]: fatal: no SASL authentication mechanismsdom

缘由是设置 smtp_sasl_path 和smtp_sasl_auth_enable,恢复原状便可
注意smtp_sasl_auth_enable 和smtpd_sasl_auth_enable 是有区别的,要设置的是post

smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth测试

4,缘由同上编码

Dec  6 20:54:58 xmail postfix/smtp[58886]: fatal: specify a password table via the `smtp_sasl_password_maps' configuration parameter
Dec  6 20:54:59 xmail postfix/master[58880]: warning: process /usr/libexec/postfix/smtp pid 58886 exit status 1
Dec  6 20:54:59 xmail postfix/master[58880]: warning: /usr/libexec/postfix/smtp: bad command startup -- throttling

smtp_sasl_password_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf

Dec  6 21:06:40 xmail postfix/smtp[59141]: warning: unsupported SASL client implementation: dovecot
Dec  6 21:06:40 xmail postfix/smtp[59141]: fatal: SASL library initialization
Dec  6 21:06:41 xmail postfix/master[59135]: warning: process /usr/libexec/postfix/smtp pid 59141 exit status 1spa

Dec  6 21:06:41 xmail postfix/master[59135]: warning: /usr/libexec/postfix/smtp: bad command startup -- throttling日志

5,同域内部发信提示 Dec  7 22:17:16 xmail postfix/smtpd[61993]: NOQUEUE: reject: RCPT from unknown[61.139.126.8]: 550 5.1.1 <test@westhost.cn>: Recipient address rejected: User unknown in virtual alias table; from=<info@westhost.cn> to=<test@westhost.cn> proto=ESMTP helo=<Hex>
Dec  7 22:17:16 xmail postfix/smtpd[61993]: disconnect from unknown[61.139.126.8]regexp

缘由是virtual_alias_domains设置不当,注意区别。应该队列

virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf

6,默认postfix日志只记录了时间,状态邮箱地址等信息,能够经过设置header_checks 记录主题

header_checks = regexp:/etc/postfix/header_checks

在header_checks里面添加

 /^Subject: (.*)/   WARN

postfix reload 后发送测试,在日志里面有记录了,以下

Dec  7 22:43:30 xmail postfix/smtpd[63163]: 72865120F4E: client=unknown[61.139.126.8], sasl_method=LOGIN, sasl_username=test@westhost.cn
Dec  7 22:43:30 xmail postfix/cleanup[63175]: 72865120F4E: warning: header Subject: Re: AQSWDE from unknown[61.139.126.8]; from=<test@westhost.cn> to=<info@westhost.cn> proto=ESMTP helo=<Hex>
Dec  7 22:43:30 xmail postfix/cleanup[63175]: 72865120F4E: message-id=<2014120722424644857160@westhost.cn>

只有英文主题正常显示,中文的会显示乱码,好像是base64编码缘由,后面再研究!

相关文章
相关标签/搜索