procmail
[Top] [All Lists]

Re: maildirs

1999-11-25 05:31:06

   > Why don't you just compile the correct mailbox path into procmail?  Put
   >
   >  #define MAILSPOOLHOME "/.mail/"
   >
   > at the top of src/authenticate.c to have procmail deliver to $HOME/.mail/
   > (i.e., $HOME/.mail as a maildir folder) by default.  It'll even create
   > it as a directory for you then.
   >
   > Philip Guenther


Hmm... I've discovered a bug I think. I define MAILSPOOLHOME like
you suggest. Then I add a test user to the password file:

        gtest:x:110:110:Test:/tmp/gtest:/bin/sh

And create his home directory /tmp/gtest. Then I run procmail from the
command line to simulate a maildir message delivery:

        # procmail -f foo -d gtest

Now a directory called "/tmp/gtes" is created! The last character seems
to be stripped away. A system call trace looks like this:

stat("/tmp/gtes", 0xEFFFFB08)                   Err#2 ENOENT   <-- LOOK HERE!!
setregid(110, -1)                               = 0
setreuid(110, -1)                               = 0
setuid(110)                                     = 0
setegid(110)                                    = 0
mkdir("/tmp/gtes", 0777)                        = 0            <-- LOOK HERE!!
lstat("/tmp/gtest/.mail", 0xEFFFF918)           Err#2 ENOENT
mkdir("/tmp/gtest/.mail", 0777)                 = 0
lstat("/tmp/gtest/.mail", 0xEFFFF918)           = 0
lstat("/tmp/gtest/.mail/new", 0xEFFFF8A8)       Err#2 ENOENT
mkdir("/tmp/gtest/.mail/new", 0777)             = 0
lstat("/tmp/gtest/.mail/new", 0xEFFFF8A8)       = 0
lstat("/tmp/gtest/.mail/cur", 0xEFFFF8A8)       Err#2 ENOENT
mkdir("/tmp/gtest/.mail/cur", 0777)             = 0
lstat("/tmp/gtest/.mail/cur", 0xEFFFF8A8)       = 0
lstat("/tmp/gtest/.mail/tmp", 0xEFFFF8A8)       Err#2 ENOENT
mkdir("/tmp/gtest/.mail/tmp", 0777)             = 0
lstat("/tmp/gtest/.mail/tmp", 0xEFFFF8A8)       = 0
umask(077)                                      = 077
open("/etc/procmailrc", O_RDONLY)               Err#2 ENOENT

-- 
Gjermund Sorseth

<Prev in Thread] Current Thread [Next in Thread>