7 messages in net.sourceforge.lists.courier-maildrop[maildropl] Re: [maildropl maildro ld...
FromSent OnAttachments
Daniel LudwigSep 5, 2005 3:31 am 
Tony EarnshawSep 5, 2005 8:27 am 
Tony EarnshawSep 5, 2005 8:57 am 
Daniel LudwigSep 7, 2005 9:54 am 
Andrew GarganSep 8, 2005 2:05 am 
Tony EarnshawSep 10, 2005 1:34 am 
Daniel LudwigSep 19, 2005 4:05 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[maildropl] Re: [maildropl maildro lda looku confusio ?Actions...
From:Tony Earnshaw (ton@billy.demon.nl)
Date:Sep 5, 2005 8:27:10 am
List:net.sourceforge.lists.courier-maildrop

man, 05.09.2005 kl. 12.35 skrev Daniel Ludwig:

I am running "postfix + courier-imap + LDAP + virtual-users" with postfix' virtual transport and would like to switch to maildrop.

What version of Postfix? You can't switch to maildrop from Postfix ;)

Postfix' virtual transport works fine but when I try to switch to "virtual_transport = maildrop" I get a "Cannot find system user"-error.

Don't do this. maildrop in Postfix (latest versions) and Courier maildrop are two different animals. Read on ...

Since version 1.8.0, maildrop uses the courier-authlib/authdaemon. So maildrop makes a ldap-lookup for the attributes that are defined in /etc/courier/authldaprc.

I test maildrop like this: vmail@hostname:~> /usr/local/bin/maildrop -V 9 -d us@mydomain.com < message maildrop: authlib: groupid=100 Cannot find system user us@mydomain.com maildrop: signal 0x06

This is for everyone in the world, not just for you ;)

Hand off to maildrop from Postfix with mailbox_command (for local users only) or a master.cf pipe transport (mostly for virtual users, but can be used for local users too, maildrop decides, it's what I use now for local users with an LDAP backend).

Examples are.

mailbox_command = /usr/bin/maildrop -d ${USER} -w 80

(Non chrooted)

maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -w 80 -d ${user} ${sender} ${recipient}
${extension} ${user}

user@mydomain.com is a virtual user account in LDAP, no system account !

below Kari Matsson's definitive (for me) post.

--Tonni

--

Giorgio Mandolfo wrote:

Thanks Milan and Jay for yours quick response.

Sorry that I have not mentioned that the system uses postfix as MTA, courier-imap (and imap-ssl). Users are stored into a LDAP database (so they are not real users, and they cannot have a .forward to use with maildrop/procmail).

Why? They should be able to. We use similar configuration:

Folks, I know this is a bit off-Courier-IMAP-only, but total solutions are the ones which count.

Postfix w/ virtual mailboxes, only two accounts on the system: vmail and root. vmail owns the Maildirs.

Few key lines from mail.cf (line continuations marked with \\\):

home_mailbox = Maildir/ mailbox_command = /usr/bin/maildrop -d "$USER" -f "$SENDER" \\\ "$SENDER" "$RECIPIENT" "$EXTENSION" "$USER" "$DOMAIN" "$LOCAL" mydestination = localhost $myhostname virtual_mailbox_domains = hash:/etc/postfix/virtual_mailbox_domains virtual_mailbox_base = /var/mail/virtual virtual_mailbox_maps = hash:/etc/postfix/virtual_mailbox_maps virtual_alias_maps = hash:/etc/postfix/virtual_alias_maps virtual_alias_domains = virtual_minimum_uid = 100 virtual_gid_maps = static:1980 virtual_uid_maps = static:1980 virtual_transport = maildrop maildrop_destination_recipient_limit = 1

The last 2 lines are what you (too) propably need. We were in the same situation first, as Postfix uses 'virtual' transport for those virtual mailboxes. Go for maildrop, and you get all the maildrop functionality.

We even call clamassassin to check for viruses and spamc for SpamAssassin on low volume servers. Very simple to maintain solution.

mailbox_command is only used for local mail accounts - not for the virtual ones.

Oh yes, there is a minor addition/change in Postfix master.cf, too:

maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -w 80 -d ${user}@${nexthop} ${sender} ${recipient} ${extension} ${user} ${nexthop}

And to be complete, few lines from our /etc/maildroprc, the "master" maildrop file:

DEFAULT="$HOME/Maildir/" MAILDIR="$HOME/Maildir" SHELL=/bin/bash # default shell is usually /bin/sh logfile "$HOME/maildrop.log" #VERBOSE=1 # sender="$1" recipient="$2" extension="$3" user="$4" domain="$5" # This is the $nexthop in virtual mailboxes. local="$6" # This is actually just '$user+$extension'. # local is defined only for user acct based mailboxes, not for virtuals.

`test -r $HOME/.mailfilter` if( $RETURNCODE == 0 ) { exception { include $HOME/.mailfilter } }

..and you are ready for full maildrop'ing. (Marvellous product -- easy to say after using procmail 10+ years.)

An example directory in this setup for user's private .mailfilter file:

/var/mail/virtual/domain/firs@domain.tld

You are using LDAP, so some parts are a bit different.

For autoreply/vacation with this solution, you want to check YAA (yet another autoresponder), as it is just about the only one out there/freely available. It suports LDAP :-)

But, if it is not possible to wrap mail deletion, or something similar, with courier-imap there is another way to get the job done, involving postfix and Mail::Audit (Perl module).

Thanks! Giorgio

//Kari