I want to redirect all email, being marked as SPAM to special mailbox.
Works with Exim4, SpamAssassin Server version 3.3.1 on CentOS 6.5.
Rules from Exim in acl_check_data
block:
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}}
Next, in 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
And as result - spam really blocked:
2014-07-14 15:27:45 1X6fLq-0007x4-FI H=([117.208.154.131]) [117.208.154.131] I=[77...20]:25 F= rejected after DATA: Message scored 10.8 spam points
But I don't receive this email in my box [email protected].
0 Answers