procmail
[Top] [All Lists]

Re: mail directories

2002-02-13 02:08:39
Niko Hiebaum <news(_at_)hiebaum(_dot_)org> writes:
I am defining my mail directory path once, at the beginning of my
.procmailrc.  If I want to specify a separate mail dir. path for a
specific recipe, I put MAILDIR at the beginning of this recipe.

My question is whether by doing this I define this new Maildir for all
further recipes or not? Would I have to repeat the standard maildir
afterwards?

Perhaps.  If you only need the MAILDIR assignment for the action of
recipe3 and not its conditions, then you can do something like:


        :0
        * condition1
        * condition2...etc
        {
                MAILDIR = $HOME/mail/special

                :0
                action-line
        }

That way, if the conditions don't match then procmail will not perform the
MAILDIR assignment.  However, if the recipe is not a delivering recipe or
if it fails, then procmail will continue on with the new MAILDIR value.


So, resetting MAILDIR may be the easiest solution.  You can always save
and restore the value using another variable:

        oldMD = $MAILDIR
        MAILDIR = $MAILDIR/special
        
        # recipe here
        ....

        MAILDIR = $oldMD


Do you really need to change MAILDIR, or would just using longer paths
in recipe3 work?


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>