procmail
[Top] [All Lists]

Re: INCLUDERC & MAILDIR

2001-08-28 23:35:47
Andrew Edelstein <andrew(_at_)pure-chaos(_dot_)com> writes:
Until now I've been doing all my list mail sorting in my main .procmailrc, but
the number of lists to which I subscribe has grown to the point where it makes
sense to seperate them out into another RC file and include them via
INCLUDERC. In .procmailrc I have

MAILDIR=$HOME/mail

Would the following in the included rc file (.listrc) set $MAILDIR to
$HOME/mail/lists?

MAILDIR=$MAILDIR/lists

Yes.

(There's caveat involved if the last assignment to MAILDIR couldn't
be 'carried out' because the specified directory didn't exist.
But otherwise, yes.)



Obviously at the end of the include file (or uppon coming back to it in
.procmalrc) I need to reset MAILDIR back to it's previous value.
Something like (in .listrc)

ORIGMAILDIR=$MAILDIR
MAILDIR=$MAILDIR/lists
.
.
.
MAILDIR=$ORIGMAILDIR

That'll work if and only if you only use absolute paths for your MAILDIR
assignments.  Procmail doesn't (currently(?)) magically make MAILDIR
reflect the current absolute path.  The magic is only on assignment.
(I.e., MAILDIR is not like the various shell's PWD or CWD or cwd
variables.)


Philip Guenther
_______________________________________________
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>