procmail
[Top] [All Lists]

Re: procmail using HOME instead of MAILDIR

2006-08-12 21:34:38
Hi.

Thanks again for your help (-:

It turned out to be an seLinux problem.
Apparently this applies kernel level security to certain disk areas.
So procmail wasn't able to write to the appropriate areas.

Problem is now solved.

Kind regards.
Luke.

13Aug2006 @ 12:50 Luke Vanderfluit thusly spake
Hi.

13Aug2006 @ 03:51 Ruud H.G. van Tol thusly spake
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.

The VERBOSE=ON is right at the top of the file
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VERBOSE=ON
LOGABSTRACT=ALL
MAILDIR=/newStore/mail  # Youd better make sure it exists
DEFAULT=$MAILDIR/Inbox
LOGFILE=$MAILDIR/logFile
VERBOSE=OFF
\______________________________

the logFile now shows this:
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
procmail: Assigning "VERBOSE=OFF"
From edencane(_at_)gmail(_dot_)com  Sun Aug 13 12:08:42 2006
 Subject: [unclassified] test14
  Folder: ./Inbox                                                          
2044
\_______________________________

That's all. No setting of MAILDIR is show in the log.
So maybe it's not getting set.
What do you think?


 
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.


You are right. I should do that (-8

Thanks.
Kind regards.
Luke


-- 
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


____________________________________________________________
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


____________________________________________________________
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