On Thu, 26 Apr 2007, Bart Schaefer wrote:
On 4/26/07, Udi Mottelo <uuddii(_at_)eng(_dot_)tau(_dot_)ac(_dot_)il> wrote:
The problem is that procmail couldn't create the log if
the directory doesn't exist. Instead of checking if the
directory exist every message over and over again I put
in my crontab:
Checking if the directory exists is pretty painless:
MAILDIR=/the/directory/that/should/exist
:0
* MAILDIR ?? ^^[.]^^
* ? mkdir -p /the/directory/that/should/exist
{ MAILDIR=/the/directory/that/should/exist }
You ought to have the error-checking code in procmailrc anyway in case
for some reason your cron job fails, so ...
If I make the dir at 12AM I have 12 hours to check and fix the
problem. The number of the tests will not be so big as the number
of the messages that procmail work on. The idea is to save as
much cycles as I can and write clean/readable procmailrc as
possible.
Bye,
Udi
____________________________________________________________
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