Delivery_options MTA option

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

Direct LDAP attribute interpretation MTA options: delivery_options (list of strings)

The delivery_options MTA option controls the effect of possible values of the LDAP attribute named by the ldap_delivery_option MTA option, (by default, the mailDeliveryOption attribute). It takes a list of up to twenty strings. Each such string specifies the effect of a particular supported value for the mailDeliveryOption attribute. The syntax for an individual string (among the list of strings) is:


where Modifier consists of one or more of the optional modifier letters listed in the table Modifier letters for delivery_options, where Value is a supported value for the mailDeliveryOption attribute, and where Effect describes the intended effect of the corresponding mailDeliveryOption value. Note that if neither * nor & is present, then the delivery option entry is taken to apply to both users and groups.

Modifier letters for delivery_options
Modifier letter Meaning
* Entry applies to users
& Entry applies to groups
@ Expansion of this user or group should be deferred, by forcing to the reprocess channel
^ Inclusive time limit processing - Check for LDAP attributes specifying vacation start and end time; only apply this entry if the current time is after any specified start time and before any specified end time.
% (New in 7.0.5) Exclusive time limit processing - Check for LDAP attributes specifying vacation start and end time; only apply this entry if the current time is before any specified start time or after any specified end time.
# Entry is mailhost-independent; if all of a user or group's delivery options are mailhost-independent, then the MTA can act on the entry immediately rather than having to forward the message to the mailhost.
/ Force addresses produced by this delivery option to be sidelined in .HELD message files.
! Use internal autoreply mode -- that is, generate a Sieve "vacation" scriptlet (rather than using the obsolete autoreply channel).

For instance, mailbox normally has the modifier * meaning that it applies (only) to users, whereas members normally has the modifier & meaning that it applies (only) to groups.

And while autoreply normally has the modifier * meaning that it applies (only) to users (and so normally mailing list and group entries cannot use autoreply/vacation functionality), if it is desired to allow mailing list and groups to generate their own autoreply/vacation messages, then removing the * modifier from the autoreply clause will allow this---from the MTA point of view. (Note that the Sun schema as distributed normally does not expect/permit mailAutoReply* attributes to be set on mailing list or group entries. So for purposes of placating the Directory Server side, you will likely also need to either extend the schema, or disable schema checking.) As mentioned above, each Value should be a supported value for the mailDeliveryOption LDAP attribute (more precisely, the attribute named by the ldap_delivery_option MTA option). And each such supported value for mailDeliveryOption must have exactly one corresponding string in delivery_options describing its intended effect.

Each Effect specifies what happens to an original address that has a specified mailDeliveryOption value. For instance, a mailDeliveryOption value of mailbox (which is intended to mean delivery to the message store) is implemented by forcing the address local-part onto the ims-ms or tcp_lmtpcs channel (Message Store delivery channels); a mailDeliveryOption value of native is implemented by routing the address local-part to the legacy native channel (the UNIX native mailbox delivery channel). The Effect definition may make use of LDAP URL substitution sequences. In addition, an Effect of merely * means to simply substitute back in the original address specified; an Effect of ** means to substitute the value of the mailForwardingAddress attribute (more precisely, the attribute named by the ldap_forwarding_address MTA option).

The current default for this option is (note that line breaks below are present merely for typographic reasons---the actual default value should be considered to appear all on one line):


This value first appeared in 8.0.1. The previous value, established in 7.0.5, differed in that it failed to preserve subaddresses in held messages:


Note the addition of the new-in-7.0.5 "nomail" clause. Setting a user to have the "nomail" delivery option causes the address to act as a valid recipient but silently delete all messages; this setting is useful for setting up an LDAP entry for a valid-but-unmonitored e-mail address. Formerly, prior to 7.0.5, the default had been:


On a system doing LMTP delivery (via LMTP client channels), this option would normally be set to (on a MS 6.1 or later system):


where that assumes the use of rewrite rules along the lines of

.LMTP   $E$F$U%$H.LMTP@lmtpcs-daemon
.LMTP   $B$F$U%$H@$H@lmtpcs-daemon

and an outbound tcp_* channel, (typically but not necessarily named tcp_lmtpcs), corresponding to the lmtpcs-daemon; official channel host name, and where the channel is marked with the multigate channel option.

For another example of an alternate setting of delivery_options, see Additional ims-ms channels.

Since up to twenty comma-separated strings may be specified for this option, note that up to twenty different possible delivery option values can be supported.

Note that the value clauses in the first two positions have special meaning as far as being the default delivery approaches for users and groups, respectively, which is why those first two value clauses are normally set to define mailbox and members. (That is, in the case of a user who has no mailDeliveryOption value specified in their LDAP entry, the first value clause of delivery_options---normally mailbox---will be assumed: a user with no mailDeliveryOption set gets messages delivered to their mailbox. Similarly, a group that has no mailDeliveryOption value specified will get the treatment specified by the second value clause of delivery_options -- normally member: a group with no mailDeliveryOption set gets messages delivered to the members of the group.) Thus if defining additional, site-specific mailbox delivery option values, be sure to add the custom values later in the list of option values.

Also note that when setting this option in the legacy configuration MTA option file option.dat, if using the backslash continuation line character to continue to additional lines, be aware of a potential confusion with "comment characters". Any line that begins in column one with one of the MTA option file's comment characters (!, ;, #) will be interpreted as a comment regardless of whether the line above ended with a backslash. This issue can be worked around using the fact that the MTA ignores leading spaces after the comma separating individual strings within delivery_options; so you can use a definition such as


where note the critical initial space on the line that does the forward value definition.

New in 7.0-0.04, there is some "sanity checking" on individual clauses within delivery_options, with an MM initialization error issued ("Invalid delivery option clause:  clause") if such a check fails. Previously, certain sorts of problems in clauses would instead cause the clause to be silently ignored, with no warning or error.

In particular, prior to 7.0-0.04 the overall length limit for a clause was 81 characters, with at most 40 characters allowed left of the equals sign and at most 40 characters allowed right of the equals sign. As of 7.0-0.04, the overall length limit for each clause is 256 characters (though exceeding this limit will merely cause silent truncation rather than an error), with at most 40 characters not including leading modifier characters to the left of the equals sign (that is, at most 40 characters in the actual "name" in the clause), and whatever remains of the 256 characters allowed on the right of the equals sign. Furthermore, as of 7.0-0.04, omission of an equals sign in a supposed clause will result in an MM initialization error.

See also: