我想将所有电子邮件redirect到被标记为垃圾邮件的特殊邮箱。
在CentOS 6.5上使用Exim4 , SpamAssassin服务器版本3.3.1。
acl_check_data块中来自Exim的规则:
warn message = X-Redirect-To: [email protected] hosts = !+relay_from_hosts spam = nobody warn spam = nobody:true hosts = !+relay_from_hosts message = X-Spam-Level: $spam_bar warn spam = nobody:true hosts = !+relay_from_hosts condition = ${if >{$spam_score_int}{29}{1}{0}} message = X-Spam-Status: $spam_report deny message = Message scored $spam_score spam points spam = nobody:true condition = ${if >{$spam_score_int}{100}{yes}{no}}
接下来,在routers :
spam_redirect: driver = redirect condition = ${if def:h_X-Redirect-To: {1}{0}} headers_add = X-Original-Recipient: $local_part@$domain data = $h_X-Redirect-To: headers_remove = X-Redirect-To redirect_router = dovecot_user
结果呢 – 垃圾邮件真的被封锁了:
2014-07-14 15:27:45 1X6fLq-0007×4-FI H =([117.208.154.131])[117.208.154.131] I = [77。 。 .20]:25 F =拒绝DATA:消息得分10.8垃圾分
但是我在我的信箱[email protected]没有收到这封电子邮件。