[wellylug] Re: Postfix -> Maildrop -> CourierIMAP integration
David Antliff
david.antliff at gmail.com
Mon Sep 4 13:18:04 NZST 2006
On Mon, 4 Sep 2006, David Antliff wrote:
> To cut a long story short, I seem to be completely unable to get the 'local'
> component of Postfix to invoke 'maildrop'. I have watched the logs (mail.log,
> mail.info) and turned on qmgr and local verbosity and no matter what I do
> with that main.cf file, the emails are still delivered directly to the
> maildir (by postfix/local).
I managed to get this working. For a start, the presence of '~/.forward'
completely broke Postfix - it was causing it to ignore any transport
settings, for some reason. So I removed this, which meant I had to add:
home_mailbox = Maildir/
in postfix/main.cf to allow Maildir delivery to continue working without
maildrop.
I had a lot of trouble with (postfix/main.cf):
mailbox_transport = maildrop
Because it was trying to use a special username 'vmail' that postfix/pipe
is meant to translate into the proper user when invoked. This didn't seem
to be working so the delivery would fail with:
postfix/pipe[14116]: fatal: get_service_attr: unknown username: vmail
I resolved this by using (in main.cf):
mailbox_command = /usr/bin/maildrop
to run maildrop directly.
I also had to add a new config for courier-maildrop that simply said
(/etc/courier/maildroprc):
DEFAULT="$HOME/Maildir"
otherwise maildrop would try to deliver to /var/mail/david as a Maildir...
> Supplementary question: does anyone know what I have to have
> '/home/david/Maildir' in my ~/.forward for email delivery to work at all? Is
> this the 'key' that makes CourierIMAP work? It's been a while since I did
> this and I never made a note why...
With Postfix and the home_mailbox option, this doesn't seem to be required
any more.
I also added (postfix/main.cf):
local_destination_concurrency_limit = 1
because maildrop can only handle single emails at a time.
I replied to myself just in case anyone ever finds themselves in the same
situation. Perhaps this will be of some help.
Incidentally, maildrop rules are FAR easier to write than procmail's. It
supports Perl-like regex, amongst other things.
--
David.
More information about the wellylug
mailing list