Board logo

標題: [技巧] Postfix 上阻擋浮動IP發信的機制 [打印本頁]

作者: adj    時間: 2007-11-30 13:15     標題: Postfix 上阻擋浮動IP發信的機制

(1)於 /etc/postfix/main.cf 上加入
smtpd_client_restrictions = check_client_access regexp:/etc/postfix/DynamicIP

(2)新增一個檔案 /etc/postfix/DynamicIP
複製內容到剪貼板
代碼:
/dynamic\..+\.(net|com)+\.[a-z]+[a-z]+$/        DISCARD We can't allow dynamic IP to relay! By service@adj.idv.tw    R01
/dynamic\..+\.(net|com)+$/                      DISCARD We can't allow dynamic IP to relay! By service@adj.idv.tw    R02
/dyn\..+\.(net|com)+\.[a-z]+[a-z]+$/            DISCARD We can't allow dynamic IP to relay! By service@adj.idv.tw    R03
/dyn\..+\.(net|com)+$/                          DISCARD We can't allow dynamic IP to relay! By service@adj.idv.tw    R04
/dynamicIP\..+\.(net|com)+\.[a-z]+[a-z]+$/      DISCARD We can't allow dynamic IP to relay! By service@adj.idv.tw    R05
/dynamicIP\..+\.(net|com)+$/                    DISCARD We can't allow dynamic IP to relay! By service@adj.idv.tw    R06
/dial\..+\.(net|com)+\.[a-z]+[a-z]+$/           DISCARD We can't allow dynamic IP to relay! By service@adj.idv.tw    R07
/dial\..+\.(net|com)+$/                         DISCARD We can't allow dynamic IP to relay! By service@adj.idv.tw    R08
/dialup.*\..+\.(net|com)+\.[a-z]+[a-z]+$/       DISCARD We can't allow dynamic IP to relay! By service@adj.idv.tw    R09
/dialup.*\..+\.(net|com)+$/                     DISCARD We can't allow dynamic IP to relay! By service@adj.idv.tw    R10
/dial-up.*\..+\.(net|com)+\.[a-z]+[a-z]+$/      DISCARD We can't allow dynamic IP to relay! By service@adj.idv.tw    R11
/dial-up.*\..+\.(net|com)+$/                    DISCARD We can't allow dynamic IP to relay! By service@adj.idv.tw    R12
/(pool|pools)+.*\..+\.(net|com)+\.[a-z]+[a-z]+$/        DISCARD We can't allow dynamic IP to relay! By service@adj.idv.tw    R13
/(pool|pools)+.*\..+\.(net|com)+$/              DISCARD We can't allow dynamic IP to relay! By service@adj.idv.tw    R14
這樣就可以啦...




歡迎光臨 ADJ網路實驗室 (http://dz.adj.idv.tw/) Powered by Discuz! 6.0.0