filter
channel keyword
The filter
channel keyword enables message filtering on
the channels to which it is applied. The keyword has one required
parameter which specifies the path to the filter files associated with
each envelope recipient who receives mail via the channel.
The syntax for the filter
channel keyword is
filter URL-patternwhere
URL-pattern
is a URL which, after
processing special substitution sequences, yields the path to the
filter file for a given recipient address.
URL-pattern
may contain special substitution
sequences which, when encountered, are replaced with strings derived
from the recipient address,
local-part@host.domainin question. These substitution sequences are given in Table 16-2 .
Sequence | Substitution string |
---|---|
$$
|
Substitute in the $ character |
$A ,
$a
|
Substitute in the address,
local-part@
host.domain
|
$D ,
$d
|
Substitute in
host.domain
|
$H ,
$h
|
Substitute in
host
|
$L ,
$l
|
Substitute in
local-part
|
$U ,
$u
|
Substitute in
local-part
less any underscore or tilde prefixes and less any subaddress postfix
|
$~
|
Substitute in the file path for the home directory associated with the local part of the address |
The filter
channel keyword may be used to specify filters
for the l (lowercase "L"), msgstore, and popstore channels.
Suggested usages of the filter
channel keyword are given
in Section 16.2.1.1 and Section 16.2.1.2 .
16.2.1.1 Keyword usage with the local channel
For the local channel, the suggested usage on OpenVMS systems is
filter file:///$~PMDF_MAILBOX_FILTER.This will place the mailbox filter file in each user's login directory. The name of the filter file will be
PMDF_MAILBOX_FILTER.;
and the file will be owned by the user.
On UNIX and NT platforms, the suggested usage is
filter file:///pmdf/user/l/$u.filterThis places the users' mailbox filter files in the PMDF user profile area,
/pmdf/user/
on UNIX, under the l
(lowercase L for "l"ocal channel) subdirectory. The mailbox
filter files will be owned by the user pmdf
.
16.2.1.2 Keyword usage with the msgstore and popstore channels
For a msgstore or popstore channel, use
filter popstore:$UNo other usage with msgstore or popstore channels is supported. The PMDF MessageStore and PMDF popstore will place each mailbox filter file in the same directory as the associated user's PMDF profile file. When a PMDF MessageStore or PMDF popstore user account is deleted, any associated mailbox filter file will be deleted. Likewise, when a PMDF MessageStore or PMDF popstore account is renamed, any associated filter file will be renamed.
The PMDF MessageStore considers subaddresses (see Section 3.1.2.6 ) to
indicate folders for delivery purposes. For msgstore channels that have
mailbox filtering enabled, use of the Sieve fileinto
operator may be enabled via use of the fileinto
channel
keyword on the channel. The usual usage is:
fileinto $U+$S@$Dso that a msgstore channel with mailbox filtering with
fileinto
enabled would look something like:
msgstore filter popstore:$U fileinto $U+$S@$D messagestore-domain-name