Provision Spam by domain and add X-Spam-Score to Messages
Document ID: 10331
Synopsis
If you have anti-spam filtering enabled per Mailbox, there could be a situation where the Mailbox delivery script which adds the X-Spam-Score or other Spam information is not applied to the
More Information
Provision Spam by domain and add X-Spam-Score to Messages
If you have anti-spam filtering enabled per Mailbox, there could be a situation where the Mailbox delivery script which adds the X-Spam-Score or other Spam information is not applied to the message due to a Mailbox Sieve filter.
To resolve this issue the best workaround is to add a Sieve filter to a Special mailbox that is in the Default Domain called 'mailboxtemplate'. This mailbox applies default settings to all accounts that MailSite is looking after in the Default and Virtual domains.
An example filter would be -
require ["x_spamtest","relational","comparator-i;ascii-numeric","x_editheader","x_variables"];
/*
RuleName: Append X-Spam-Score to header
RuleDescription: Add the X-Spam-Score at the MailBox level to all account with the mailboxtemplate account
*/
if spamtest :value "ne" :comparator "i;ascii-numeric" "0" {
/*This command is inserted to make the $spamscore variable available.*/
if spamtest :matches :comparator "i;ascii-numeric" "*" {set "spamscore" "$1";}
addheader "X-Spam-Score" "$spamscore";
}
/* This rule is inserted by Mailsite to make sure that the default delivery action is to deliver the message.*/
keep;
stop;