Sam Varshavchik writes:
I am using 'userdb' virtual users (same uid/gid). The main problem
is the @example.com aliases (no specific e-mail address).
Can I alias "@example.com: virtual" (where 'virtual' is the local UID
owning all the userdb users), then setup a .mailfilter in virtual's
$HOME to distibute the mail into Maildirs? I suppose this would mean
Well, first you need set up individual .courier files in virtual's home
directory, in order to provide delivery instructions for deliverable
addresses in the example.com domain.
If you want to dump all addresses into the same bucket, set up
.courier-default to provide delivery instructions for all addresses within
the example.com domain.
I assume that, by specifying "@example.com: virtual" in aliases,
an entry for jo...@example.com in userdb will be ignored by courier
(for the purposes of mail delivery). Therefore our "virtual" user
will receive mail for 100's of different domains which we host.
The best solution I can think of (for scalability) is to execute a
dynamic delivery script || from virtual's .courier-default. The
script would compare $RECIPIENT against the contents of userdb and
another alias-type file (unrelated to courier) defining my userdb
aliases. The script would return the correct Maildir to courier
(my virtual user would own each Maildir). Am I on the right track ?