查看完整版本: 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[code]/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[/code]這樣就可以啦...
頁: [1]
查看完整版本: Postfix 上阻擋浮動IP發信的機制