Dave Platt writes:

It turns out that the rules-of-the-game are rather different for
aliases defined by the Courier aliases/aliases.dat mechanism, and
for those which are defined via the QMail-style .courier-aliasname
mechanism.

For aliases defined in aliases.dat, the necessary rcptfilters go into
the .mailfilters in the home directory for the user ID specified
in the "aliasfilteracct" config file.  The name of the rcptfilter
for an alias "foo" would be [EMAIL PROTECTED]:tld (i.e.
"rcptfilter-alias-" followed by the fully-qualified email address
of the alias, with dots in the domain name changed to colons.  The
.mailfilters directory, and the rcptfilter-alias=* files, must be
owned by the "aliasfilteracct" user, and must not be accessible to
other users.  The maildrop scripts are run under this user/group ID.

This is documented in the localmailfilter man page.

For aliases defined by Qmail-style .courier files located in the
/etc/courier/aliasdir/ directory, the rules are different.  In these
cases, the filters go in /etc/courier/aliasdir/.mailfilters/ and
are simply named like "rcptfilter-foo" (no "-alias" and no @domain.tld). The directories and filters must be owned by whatever user/group ID you've specified in the esmtpd config file
(usually daemon.daemon) and are run under that user-ID.

This is not really documented explicitly, but can be inferred from other sources.

The dot-courier man page indicates that courier/aliasdir is the default catchall, and the rest can be inferred naturally, if you consider that courier/aliasdir as the mail account the message gets delivered to.

Attachment: pgpYjV2sGVgAB.pgp
Description: PGP signature

Reply via email to