Subject: Re: pkg/32369: maildrop assumes HAVE_COURIER and thus does not get
To: None <,,>
From: mouss <>
List: pkgsrc-bugs
Date: 12/24/2005 00:25:04
The following reply was made to PR pkg/32369; it has been noted by GNATS.

From: mouss <>
Subject: Re: pkg/32369: maildrop assumes HAVE_COURIER and thus does not get
 maildir from mysql
Date: Tue, 24 Dec 2002 01:20:35 +0100

 - virtual setup where the login is the email address.
 - mailstore belongs to vmail
 - unix home of vmail is /home/mail
 - mail for is to be stored in maildir format, with
   maildir = /home/mail/domains/
 - users are stored in mysql.
 - here are the relevant infos from /usr/pkg/etc/authlib/authmysqlrc
 MYSQL_UID_FIELD         '7000'
 MYSQL_GID_FIELD         '7000'
 MYSQL_LOGIN_FIELD       email
 MYSQL_HOME_FIELD        '/home/mail/domains'
 MYSQL_MAILDIR_FIELD     destination
 The field 'email' contains the user email address ("")
 and destination contains his maildir ("") relative to
 the base (i.e. HOME_FILED, set to "/home/mail/domains")
 # su vmail
 $ authtest
 Authentication succeeded.
      Authenticated:  (uid 7000, gid 7000)
     Home Directory: /home/mail/domains
              Quota: (none)
 Encrypted Password: REMOVED
 Cleartext Password: REMOVED
            Options: (none)
 [works without patch-ab]
 The configuration has been working for a long time.
 [with patch-ab]
 Here is a test (I remove maildroprc just to make sure it is not causing
 the problem. but mine have MAILDIR=$DEFAULT at the top, and when using
 it with -V, maildrop shows that it is using "./Maildir").
 # su vmail
 $ ls /home/mail/Maildir
 ls: /home/mail/Maildir: No such file or directory
 # mv /usr/pkg/etc/courier/maildroprc /usr/pkg/etc/courier/maildroprc.bak
 $ maildrop -V10 -d < /tmp/tst1.msg
 maildrop: authlib: groupid=7000
 maildrop: authlib: userid=7000
 maildrop: authlib:, home=/home/mail/domains,
 maildrop: Changing to /home/mail
 Message start at 0 bytes, envelope sender=vmail
 maildrop: Attempting .mailfilter
 maildrop: Delivering to ./Maildir
 maildrop: Flock()ing ./Maildir.
 maildrop: Appending to ./Maildir.
 maildrop: Delivery complete.
 $ ls -l /home/mail/Maildir
 -rw-------  1 vmail  vmail  93 Dec 24 01:09 /home/mail/Maildir
 As you can see, maildrop gets the correct infos (home= and mail= above),
 but uses "./Maildir" anyway.
 [from the source code]
 maildrop/main.C contains
         if (deliverymode && orig_uid == getuid())
         const char *p;
                 if (!p || !*p)
                         if (p && *p)
 and the original configure script only sets HAVE_COURIER if it finds
 ../courier. while the patch-ab sets this unconditionally (It adds 'if
 true || ' ...).
 --- mouss