postfix 設定只能收信不能寄信
首先建立了一個/etc/postfix/reject_user, 填入要封鎖的帳號資料, 建立該db檔.
然後編輯 vi /etc/postfix/main.cf, 並將加入check_sender_access hash:/etc/postfix/reject_user在下面兩項敘述中
#若有其它設定用逗點分隔
smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/reject_user, permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/reject_user
vi /etc/postfix/reject_user
# REJECT 退信 , DISCARD 丟棄
user@test.com.tw REJECT
user2@ DISCARD
#建立map db檔
postmap hash:/etc/postfix/reject_user
重新啟動postfix
/etc/init.d/rd.d/postfix restart