1 message in net.sourceforge.lists.courier-maildrop[maildropl] Problems with maildrop de...
FromSent OnAttachments
Fabian HugelshoferDec 22, 2003 3:52 pm 
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] Problems with maildrop delivering to virtual users (userdb)Actions...
From:Fabian Hugelshofer (huge@gmx.ch)
Date:Dec 22, 2003 3:52:40 pm
List:net.sourceforge.lists.courier-maildrop

Hello

I'm trying to get Sendmail using Maildrop to deliver to Maildirs of virtual users so that i can use those for the Courier-IMAP server.

I'm using Debian Woody packages of Sendmail (8.12.3) and Courier (1.4.3, maildrop 0.37.3). Sendmail hands mails over to Maildrop with the "FEATURE(`local_procmail', `/usr/bin/maildrop', `maildrop -d $u $h')dnl" statement in sendmail.mc. The IMAP server uses USERDB for authentication. Maildirs are located in /var/spool/couriermail/USERNAME/Maildir. The home path in userdb is the same but without the Maildir at the end. Later i would like something like couriermail/DOMAIN/USERNAME/Maildir. I created two userdb users "test" (which is also a real user) and "mailtest" and created Maildirs using maildirmake. IMAP works. Using these two usernames in an IMAP client I can access the Maildirs, copy mails and create folders. I added "MODIFY_MAILER_FLAGS(`LOCAL', `-w')dnl" to my sendmail.mc to prevent Sendmail from looking up usernames.

The Problem is, that Maildrop doesn't deliver to the couriermail/USERNAME/Maildir. Instead it tries to deliver to /home/USERNAME/Maildir. For user test i created this Maildir and maildrop delivers to it.

I created /etc/maildroprc with the following content: DEFAULT="/var/spool/couriermail/$LOGNAME/Maildir"

While the content was ignored i also created /etc/mail/maildroprc and /etc/courier/maildroprc, because i read somewhere (groops.google.com and man maildrop) that it could also be expected on that location. It didn't help so i wondered if they had to be executable. So i changemodded them. It didn't help eighter.

When I'm sending a mail to mailtest i get in /var/log/messages the following error message: Dec 22 23:50:18 habakuk sm-mta[3086]: hBMMoDAu003086: from=<te@habakuk.lan.mydom.ch>, size=0, class=0, nrcpts=1, proto=ESMTP, daemon=MTA, relay=birdflight.lan.mydom.ch [192.168.1.100] Dec 22 23:50:22 habakuk sm-mta[3086]: hBMMoDAw003086: from=<te@habakuk.lan.mydom.ch>, size=493, class=0, nrcpts=1, msgid=<002c01c3c8dd$ebd665d0$6401a8c0@birdflight>, proto=ESMTP, daemon=MTA, relay=birdflight.lan.mydom.ch [192.168.1.100] Dec 22 23:50:22 habakuk sm-mta[3090]: hBMMoDAw003086: to=<mail@habakuk.lan.mydom.ch>, delay=00:00:01, xdelay=00:00:00, mailer=local, pri=120470, dsn=4.0.0, stat=Deferred: local mailer (/usr/bin/maildrop) exited with EX_TEMPFAIL

I guess this means the username was not found, because it only happens for the virtual user mailtest. Maildrop doesn't look up the users in userdb. That's why it delivers to /home/USERNAME/Maildir. But why arent the users looked up? And why can't i change the delivery behaviour by maildroprc?

What do have I to do, to get it work? What made i wrong?

What do I need to change then, that it also work with multiple domains?

Because of using the mailer flag -w usernames aren't checked by sendmail. But now mails for unknown users hang in my mailqueue. Is there no way for maildrop to give an error message back to the sender and delete the mail?

Thank you for your help.