Toen ik Professional Software Engineering kietelde, kwam er dit uit:
Ruud H.G. van Tol:
$MAILDIR is the PWD, so there is no need for it to be there.
The directory $MAILDIR/spam should exist.
cwd. current working directory.
pwd is "print working directory", which returns the same info, but isn't
the correct term.
There is quite some history that PWD (all-caps) means Present Working
Directory. That could well have started with a misconception of the
name of the pwd-command. But even in 'the environment' it is called
PWD, not CWD (on several systems I know). I agree that cwd is the
An improved version of your recipe:
Streamlined. I can't say that there's much of a difference between
explicitly declaring a dir over using the default.
There could well be some differences. When MAILDIR gets a fresh value,
an actual chdir occurs immediately. If that value contains a trailing
slash, most chdirs ignore that. But on some systems, a path with a
double slash in the filepath causes problems. So free the world from
those ugly $MAILDIR/dir/file constructs.
If the chdir fails, MAILDIR becomes ".". That's nice.
procmail mailing list