pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/32369: maildrop assumes HAVE_COURIER and thus does not get maildir from mysql



The following reply was made to PR pkg/32369; it has been noted by GNATS.

From: mouss <usebsd%free.fr@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
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

 [Configuration]
 - virtual setup where the login is the email address.
 - mailstore belongs to vmail
 - unix home of vmail is /home/mail
 - mail for foo%example.net@localhost is to be stored in maildir format, with
   maildir = /home/mail/domains/example.net/foo/
 - 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 ("foo%example.net@localhost")
 and destination contains his maildir ("example.net/foo/") relative to
 the base (i.e. HOME_FILED, set to "/home/mail/domains")
 
 [authtest]
 # su vmail
 $ authtest root%example.net@localhost
 Authentication succeeded.
 
      Authenticated: root%example.net@localhost  (uid 7000, gid 7000)
     Home Directory: /home/mail/domains
            Maildir: example.net/root
              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 root%example.net@localhost < /tmp/tst1.msg
 maildrop: authlib: groupid=7000
 maildrop: authlib: userid=7000
 maildrop: authlib: logname=root%example.net@localhost, home=/home/mail/domains,
 mail=example.net/root
 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     HAVE_COURIER
         if (deliverymode && orig_uid == getuid())
         {
         const char *p;
 ...
                p=getenv("MAILDROPDEFAULT");
 
                 if (!p || !*p)
                 {
                         p=getenv("LOCAL");
 
                         if (p && *p)
                                 p=GetDefaultMailbox(p);
                         else
                                 p="./Maildir";
                 }
 ...
 
 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
 
 
 



Home | Main Index | Thread Index | Old Index