procmail
[Top] [All Lists]

Re: Procmail 3.22 with Qmail Maildirs

2001-10-16 00:07:16
Andrew Hill <list(_at_)fornax(_dot_)net> writes:
Sorry about jumping on list and asking for help, but I just can't figure 
this one out.

I'm trying to get procmail 3.22 deliver mail to my qmail maildir. Here's 
the way I have things set up:

1) Installed Procmail 3.22 from source, no changes made to Makefile and 
config.h

2) Calling procmail from .qmail file via wrapper script as advised in 
the Life with Qmail FAQ (see http://www.lifewithqmail.org/lwq.html#procmail)

3) The following is my .procmail file (just for testing :-):

####
PATH=/bin:/usr/bin:/usr/bin

I'm not sure what you intended this line to do.  Removing it is probably
the Right Thing.


MAILDIR=/home/andrew
DEFAULT=$MAILDIR/Maildir/
LOGFILE=$MAILDIR/procmail-log

Um, why bother setting MAILDIR if you're just going to qualify everything
after that with it?  Don't set MAILDIR unless you want procmail to
change directories.  I would suggest replacing the above three lines with:

        DEFAULT = $HOME/Maildir/
        LOGFILE = $HOME/procmail-log

I would also suggest moving the LOGFILE assignment to the very top of the
rcfile, before the VERBOSE assignment.


No error shows up in the mail log, and nothing at all shows up in 
/home/andrew/procmail-log. (Should anything show up here? LOGFILE is 
set, so surely it should log, and not mail me back?)

If you remove $HOME/procmail-log and send yourself an email, procmail
should recreate it.  Does it?  What are its permissions?  Does procmail
give any errors when you run it from the command line with something like
        procmail < /path/to/file/containing/one/email/message


Mail sent to the account bounces back from qmail with the errors:

####
procmail: Couldn't create "/var/spool/mail/andrew"
procmail: Lock failure on "/var/spool/mail/andrew.lock"
procmail: Error while writing to "/var/spool/mail/andrew"
####

If you want to change the mailspool location for the entire system, then
you should tell procmail the real location via the MAILSPOOL* #defines.


The examples/advanced file in the Procmail source advises me to edit 
config.h, and config.h advises me to edit the "MAILSPOOLDIR, 
MAILSPOOLSUFFIX, MAILSPOOLHASH or MAILSPOOLHOME" entries in 
src/authenticate.c.

Looking at these entries in the file, my guess is that I should have:

####
#define MAILSPOOLDIR    "~/Maildir/"
#define MAILSPOOLSUFFIX "/"

You didn't look far enough.  Eight lines further down in the
authenticate.c file are the lines:

/*#define MAILSPOOLHOME "/.mail"                      /* watch the leading / */
                                                  /* delivers to $HOME/.mail */

Try it again with just:

#define MAILSPOOLHOME "/Maildir/"


You don't need the MAILSPOOLSUFFIX setting; it's only needed/used when
MAILSPOOLHOME _isn't_ defined.


Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail