I wanted procmail to fail temporarily if my maildir wasn't accessible,
so I tried this:
EXITCODE = $EX_TEMPFAIL
MAILDIR = /oldbox/roderick/inbox
EXITCODE
I figured that procmail would exit if the chdir() failed, but it didn't,
it just logged
procmail: Couldn't chdir to "/oldbox/roderick/inbox"
and continued processing the configuration file. Now I'm using
MAILDIR = /oldbox/roderick/inbox
:0
* ? test x-"`pwd`" != x-"$MAILDIR"
{ EXITCODE = $EX_TEMPFAIL HOST }
and I think this works. This will fail if a symlink creeps into that
path, though.
Is there a better way?
--
Roderick Schertler
roderick(_at_)argon(_dot_)org