Ubuntu

未載入對 main.cf 的後綴更改

  • February 24, 2013

Ubuntu 10.04 LTS

root@vm1613:/etc/postfix# vim /etc/postfix/main.cf

[...]
# default restrictions
smtpd_sender_restrictions = check_sender_access hash:/var/spool/postfix/plesk/blacklists, permit_sasl_authenticated, check_client_access pcre:/var/spool/postfix/plesk/non_auth.re
smtpd_client_restrictions = permit_mynetworks
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
[...]

root@vm1613:/etc/postfix# postfix check
root@vm1613:/etc/postfix#

root@vm1613:/etc/courier# service postfix restart
* Stopping Postfix Mail Transport Agent postfix                                                                                                                                                                                                                        [ OK ]
* Starting Postfix Mail Transport Agent postfix   

當我檢查smtpd_recipient_restrictions結果是:

root@vm1613:/etc/courier# postconf -d smtpd_recipient_restrictions
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination

為什麼?

為什麼 main.cf 沒有“載入”到 Postfix 中?

您正在執行“postconf -d”,請查看手冊頁。這將列印預設設置而不是實際設置。將“-d”從您的命令中刪除,您應該會看到您所期望的。

引用自:https://serverfault.com/questions/481993