最近遇到了信件被postfix裡的amavisd給誤判成垃圾信,因為此需要針對特定的Sender Address將它加入郵件過濾的白名單,設定方式如下:
先建立白名單列表
#vi /etc/amavisd/whitelist
test1@example.com #針對特定使用者郵箱放行
test2@example.org
testexample.net #針對特定某個網域放行
testexample.edu
修改amavisd的設定檔
#vi /etc/amavisd/amavisd.conf
#將原本的設定改為如下方所示
# This policy will perform virus checks only.
read_hash(\%whitelist_sender, '/etc/amavisd/whitelist');
@whitelist_sender_maps = (\%whitelist_sender);
$interface_policy{'10026'} = 'VIRUSONLY';
$policy_bank{'VIRUSONLY'} = { # mail from the pickup daemon
bypass_spam_checks_maps => ['@whitelist_sender_maps'], # don't spam-check this mail
bypass_banned_checks_maps => ['@whitelist_sender_maps'], # don't banned-check this mail
bypass_header_checks_maps => ['@whitelist_sender_maps'], # don't header-check this mail
};
存檔後,重啟郵件服務,讀入新的設定白名單
# service policyd restart
# service amavisd restart
# service postfix restart
之後在白名單中寄件者或網域便不會經過spam filter的掃描機制而Bypass了
同一位寄件者發出來的信件,有過濾和沒過濾的差別在於**Spam**的標記
沒有留言:
張貼留言