RFC 3685 (rfc3685) - Page 2 of 9
SIEVE Email Filtering: Spamtest and VirusTest Extensions
Alternative Format: Original Text Document
RFC 3685 SIEVE Spamtest and VirusTest Extensions February 2004
1. Introduction and Overview
SIEVE scripts are frequently being used to do spam and virus
filtering based on either implicit script tests (e.g., tests for
'black-listed' senders directly encoded in the SIEVE script), or via
testing messages modified by some external spam or virus checker that
handled the message prior to SIEVE. The use of third-party spam and
virus checker tools poses a problem since each tool has its own way
of indicating the result of its checks. These usually take the form
of a header added to the message, the content of which indicates the
status using some syntax defined by the particular tool. Each user
has to then create their own SIEVE scripts to match the contents of
these headers to do filtering. This requires the script to stay in
synchronization with the third party tool as it gets updated or
perhaps replaced with another. Thus scripts become tied to specific
environments, and lose portability.
The purpose of this document is to introduce two SIEVE tests that can
be used to implement 'generic' tests for spam and viruses in messages
processed via SIEVE scripts. These tests return a string containing
a range of numeric values that indicate the severity of spam or
viruses in a message, or a string that indicates the message has not
passed through any spam or virus checking tools. The spam and virus
checks themselves are handled by the underlying SIEVE implementation
in whatever manner is appropriate, and the implementation maps the
results of these checks into the numeric ranges defined by the new
tests. Thus a SIEVE implementation can have a spam test that
implicitly checks for third-party spam tool headers and determines
how those map into the spamtest numeric range.
In order to do numeric comparisons against the returned strings,
server implementations MUST also support the SIEVE relational
[RELATIONAL] extension, in addition to the extensions described here.
All examples below assume the relational extension is present.
Conventions for notations are as in [SIEVE] section 1.1, including
use of [KEYWORDS].
The term 'spam' is used in this document to refer to unsolicited or
unwanted email messages. This document does not attempt to define
what exactly constitutes spam, or how it should be identified, or
what actions should be taken when detected.
The term 'virus' is used in this document to refer to any type of
message whose content can cause malicious damage. This document does
not attempt to define what exactly constitutes a virus, or how it
should be identified, or what actions should be taken when detected.
Daboo Standards Track