Sieve duplicate extension

As of the 8.0 release, the MTA supports the Sieve duplicate extension specified in RFC 7352. The " " test is intended to assist in detecting and handling cases of so-called "duplicate" messages such as cases where a user receives both a personally addressed copy as well as a mailing list copy of a message.

The capability string to enable use of the " " test is " ": require "duplicate"; Furthermore, to permit " " tests, the  and    MTA options must have, respectively, a positive value and a valid  URL value. The  MTA option controls how many " " tests may be performed in a single Sieve script; the default is 2.

In the MTA&#x27;s implementation, the MTA maintains a memcache database recording "recent" duplicate message tracking data: this database is what allows comparing a current message with a prior message to detect a "duplicate". The  MTA option specifies where this duplicate tracking information       should be stored; at present the value must be a    URL of       the form: memcache://host:port/key-prefix If the host isn&#x27;t specified, it defaults to the value of the  MTA option. It is an error for  not to be set in this case. If the port isn&#x27;t specified, it defaults to the value of the   MTA option; if that option in turn isn&#x27;t specified, the default is 11211, the usual port for memcache servers.  , if specified, is prepended to the keys the duplicate extension sends to the memcache server.

Note that " " tests are performed during Sieve evaluation, but no memcache updates are performed at the Sieve evaluation stage. It is only after the message has been successfully processed that updates are done.

Also note that duplicate information is implicitly qualified by the owner of the Sieve. In the case of system-level Sieves, this will be the applicable postmaster address, so system-level Sieves operate in shared namespace(s). Note that the " " argument of the " " test can be used to force system-level Sieves to operate in their own namespace.

The syntax for the " " test is: duplicate" &#x5b;":handle" handle-string&#x5d;            &#x5b;":header" header-name-string /             ":uniqueid" value-string&#x5d;             &#x5b;":seconds" number&#x5d; &#x5b;":last"&#x5d; where the default is to test for previously seen (within a short period of time) values of the Message-id: header line, or previously seen values of another header line instead if " " is specified, or previously seen other values constructed as the Sieve chooses per the " " argument string. The time period for which the "seen" values are retained, so the time period within which duplicates may be detected, may be controlled by use of the " " argument, or if not specified defaults to the value of the   MTA option.

As of the 8.0 release, warnings that occur during Sieve evaluation such as issues with the duplicate extension (or issues involving the memcache protocol or the vacation extension),  plus any specifically specified warnng text specified via the  Sieve " " action will result in a " " clause in the    field of MTA message transaction log entries.

See also:
 * Sieve filter duplicate extension MTA options
 * max_duplicates MTA Option
 * duplicate_tracking_url MTA Option
 * Memcache MTA options
 * MTA URL types
 * Postmaster addresses
 * duplicate_timeout_default MTA Option
 * Sieve warn extension
 * Sieve vacation extension
 * log_filter MTA Option
 * MTA transaction logging
 * Sieve supported extensions
 * Sieve filters