Sieve addprefix and addsuffix extensions

From Messaging Server Technical Reference Wiki
Jump to: navigation, search

The MTA's private addprefix and addsuffix actions have been supported since Messaging Server 7.0u3. No capability name (no "require") clause need be used before using these actions. These actions take a single string argument specifying text to be added at the beginning or end, respectively, of the first plain text part of a message. (Note that the Sieve language's text: syntax for entering long, multi-line strings, may be convenient for specifying prefix or suffix text.)

The effects of "addprefix" or "addsuffix" are similar to the effects of the mgrpMsgPrefixText or mgrpMsgSuffixText group LDAP attributes (more precisely, the attributes named by the ldap_prefix_text and ldap_suffix_text MTA options), or the alias_prefix_text and alias_suffix_text alias options, or the [PREFIX_TEXT] and [SUFFIX_TEXT]alias file named parameters. Note, however, that the Sieve actions work in any sort of Sieve, not just Sieves attached to groups.

If multiple Sieves are active and more than one prefix or suffix is specified, they are concatenated.

When logging of Sieve filter actions applied has been enabled via the log_filter MTA option, note that only the name of the action, e.g., "addprefix" or "addsuffix", will be included in the logged field; the actual text added to the message will not be logged (as it might be very long).

There is an example of use of "addprefix" in the discussion of the Sieve editheader extension.

See also: