Adding your own header filter to sieve
I recently came up with the idea of using sieve scripts that I installed using Joel’s article to filter my spam. I work for a University that filters all mail that comes to our site mail server through spamassassin. Messages that they suspect are spam get marked with the header X-SPAM-Level: and a number of stars. This header was unavailable in the sieve plugin of squirrelmail. I found that under /usr/share/squirelmail/plugins/avelsieve/config.php there is an array that holds the values of the headers you can use. I added my specific header in, saved it, went back to squirrelmail, applied it, and everything worked great. I sent a faked out test message with a spam level that I specified and it bounced back with the message “I don’t like SPAM!” so I know it worked.
You will want to search for something looking like this in your config.php file.
/* Headers to display in listbox widget, when adding a new header rule. */
$headers = array(
'From', 'To', 'Cc', 'Bcc', 'Subject', 'Reply-To', 'Sender', 'List-Id',
'MailingList', 'X-ML-Name', 'X-List', 'X-Mailer', 'X-MailingList',
'X-Mailing-List', 'X-Spam-Flag', 'X-Spam-Status', 'X-Spam-Level', 'X-Priority', 'Importance',
'X-MSMail-Priority', 'Precedence');
Recent Comments