procmail
[Top] [All Lists]

Re: procmail using HOME instead of MAILDIR

2006-08-12 18:55:12
Luke Vanderfluit schreef:

according to some sources, the trailing slash indicates maildir

Yes, but that has nothing to do with the MAILDIR "variable".

This recipe

   :0
   Inbox/

delivers (all yet undelivered) mail to the directory $MAILDIR/Inbox/ in
maildir mode.
When $MAILDIR/Inbox doesn't exist yet, procmail creates it, and the
proper maildir structure (new/ cur/ tmp/, all with the credentials of
the current user).
If $MAILDIR/Inbox already exists as a file (like an mbox), procmail
can't create the directory $MAILDIR/Inbox/, so an error occurs.



It seems that procmai is choosing the './' option instead of MAILDIR.
Does this give any further clues?


Not "./" but "." (please really forget that trailing slash now).

You were not showing the log of when procmail tries to set MAILDIR to
"/newStore/mail", you were only showing many very uninteresting "No
match" lines. Put the "VERBOSE=ON" further up, and put a "VERBOSE=OFF"
just before the conditional recipes, to make your logfile only show
information about the problem at hand.

Info: setting (= changing the value of) MAILDIR is the chdir-command of
procmail.
And when that chdir fails, $MAILDIR becomes ".", so what you see is the
result of that failure.

Why do you want/need to create a directory in the root of your
filesystem for the mail of a particular user?
Can't you just create the "newStore/mail/" inside the $HOME of the user
to which the .procmailrc belongs?
(as I suggested before)


Something completely different:
From the log I can tell that your recipes are not efficient. (1) There
is no need to put ".*" at the end of a condition, unless you use \/ (the
MATCH operator) and wnat to capture up to the end of the line. (2) Your
recipes are likely very similar to each other, so most of them can
likely be replaced by just a single general recipe that uses \/ to reuse
the listname as the delivery name.

-- 
Groet, Ruud


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail