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編碼緣由,後面再研究!