Ms7 Search
Google 搜尋 翻譯
calendar
« 四月 2026 »
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      
近期文章
文章分類
網站連結
Syndicate

postfix 設定只能收信不能寄信

2016-01-28 @ 19:36 in Linux

首先建立了一個/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

引用

引用本文的文章標題:postfix 設定只能收信不能寄信