Hi,
I've been running Postfix on Mandrake for over a year now, with a mix of
local and virtual users. Virtual users are stored in MySQL, and I use
Courier-IMAP to get mail.
I'm trying to implement DSPAM, but the only way I can seem to get it to
work with Postfix is to use an external LDA. I've been using Procmail
for my local users, but because I can't figure out how to get it to work
with virtual users, I'm checking out Maildrop.
I compiled Maildrop with mysql support, set it all up, and hooked it up
to a test domain, using a Maildrop transport in Postfix. It worked
perfectly, first time--mails sent to a new address added to the database
got delivered to the correct maildir (after I made it with maildirmake,
of course). But... it's not working for local users.
The problem I'm having with delivering to local users is that the
default location for mail, in Mandrake 9.1, is /var/mail/$LOGNAME,
whereas the rest of my system uses $HOME/Maildir. So, I set up an
/etc/maildroprc to contain:
DEFAULT=$HOME/Maildir
This fixes the local delivery, but breaks the virtual delivery (because
the virtual users' mail is in /var/mail/virtual/<domainname>/$USER,
using a single "virtual" uid and gid.)
(by the way, to enable local delivery, I set mailbox_command =
/usr/local/bin/maildrop in main.cf, instead of using the maildrop:
transport. This seems to make postfix use the correct local UID to
deliver mail...)
When I delete the /etc/maildroprc, and attempt to deliver using the
"maildrop" command line, the mail gets delivered to /var/mail/$LOGNAME.
Argh!
So I grepped through /etc for environment variables, and changed two: in
/etc/login.defs, I changed MAIL_DIR to Maildir, and in /etc/profile, I
changed MAIL to $HOME/Maildir, and logged out and back in. This fixed
biff--I'm now getting mail notifications for new mail on the command
line, but maildrop is still delivering to the /var/mail/$LOGNAME
address.
Anybody have any suggestions of how to really change the default mail
delivery location in Mandrake 9.1, where it will get picked up by
maildrop without messing up virtual delivery?
Or do you have something I can put in the maildroprc file to only set
the DEFAULT mailbox for local users, or specify a maildroprc file to
maildrop on the command line in delivery mode, or any other solution?
I'm stumped.