On Mon, 2003-11-17 at 14:08, scott leonard wrote:
i've been using postfix's 'mailbox_command' directive to have it
forward mail to the maildrop local transport agent, but i'm interested
in using the "mailbox_transport" directive which uses the pipe command
in postfix's master.cf. however, all the howto's show this pipe
command setting the user to "vmail" or something for the purpose of
virtual accounts. anyway to generalize this so it will use vmail for
virtual and the users name for local accounts?
_
Use both. I use a MySQL transport_map that sends mail for the local
users to the "local:" transport, and for my virtual domains, to
"maildrop:". The Local transport delivers to the mailbox_command as the
local user. The Maildrop transport delivers to a virtual mailbox as
whatever Unix user specified in the master.cf file.
The Pipe delivery agent forces you to choose a non-root UID to drop
privileges, before it hands off to the MDA.
The other option, of course, is to then have Maildrop run setuid, allow
the mail user to switch users by specifying it when you compile
Maildrop, and provide some sort of map to Maildrop to specify the UID.
You can do this, too, in MySQL--and I'm pretty sure you can with LDAP
too.
Cheers,