Tarball install
[1.] wget ftp://ftp4.tnc.edu.tw/pub1/Postfix/official/postfix-2.2.10.tar.gz
[2.]
tar zxvf postfix-2.2.10.tar.gz
cd postfix-2.2.10 ; make ; make install
如果有"make: don't know how to …"
make -f Makefile.init makefiles
如果從別台編譯後複製過來的,清除規則
make tidy
[3.]
postfix check
postfix start
[Trouble shotting:]
egrep '(reject|warning|error|fatal|panic):' /var/log/maillog
[Q.] more /var/log/maillog
relay=none, delay=3944, status=deferred (Name service error for domain recip.domain: Host not found, try again)
[A.] 查不到對方DNS的MX記錄,所以會有這錯誤
[Q.] 如果對方沒有設定 MX
[A.] 可以設定 ignore_mx_lookup_error = yes
[Q:] 不允許對方的連線 IP 沒有反解
[A:] main.cf中設定了 reject_unknown_client_hostname參數
smtpd_client_restrictions = permit_mynetworks, reject_unknown_client_hostname
[Q:] /var/log/maillog
Oct 23 19:09:57 lab100 postfix/smtpd[20028]: NOQUEUE: reject: RCPT from unknown[192.168.1.1]: 450 4.7.1 Client host rejected: cannot find your hostname, [192.168.1.1]; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<cross>
[A:] vi /etc/postfix/main.cf
smtpd_client_restrictions = permit_mynetworks, reject_unknown_reverse_client_hostname
[Q:] /var/log/maillog
Oct 23 19:21:31 lab100 postfix/smtpd[20179]: NOQUEUE: reject: RCPT from unknown[192.168.1.1]: 450 4.7.1 Client host rejected: cannot find your reverse hostname, [192.168.1.1]; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<cross>
[A:] 丟棄找不到 DNS 裡 MX / A 記錄的 hostname
smtpd_sender_restrictions = reject_unknown_sender_domain
ref:
http://www.huihoo.com/internet/postfix/pis/book1.html
留言