procmail
[Top] [All Lists]

Re: MAILDIR=/some/path/with/a/trailing/slash/

2003-12-12 17:07:43
At 14:42 2003-12-12 -0600, David W. Tamkin wrote:
Ruud wroote,

I assume that there should never be a slash at the end of the value
of MAILDIR. I also think that it doesn't hurt if it is there,
unless you make use of the value assuming that there is one.

It hurts by supporting a misconception. Several times I've found people believing that if they put a trailing slash onto the assignment of MAILDIR, it makes procmail write all messages out in maildir format. I don't know how that fallacy got started, but it's shown up a handful of times already.

Plus, for the most part, you shouldn't need to use $MAILDIR in a path spec, as it basically defined the cwd. Perhaps you want to run a program and for some reason ./ isn't good enough for your invocation, in which case, if you're going to use $MAILDIR for anything, you may as well include a trailing slash when you set it so that it's more similar to the manual spec.

OTOH, when invoked with -m, procmail defines $MAILDIR to '.', and when I actually checked on a 3.22 box, the default setting of $HOME/ (as per the manpage) actually doesn't include the trailing slash.

But setting it that way still should have no adverse effects, except for people who expect to use the variable (in which case it might help to note that a "//" in a path specification isn't generally harmful, unless you're parsing the string for "x" dirs back or something).

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>