procmail
[Top] [All Lists]

Re: Folder: bounced

2004-12-14 06:45:01
Toen wij Dallman Ross kietelden, kwam er dit uit:

"MAILDIR", is not simply a static assignment but is a
process.  

Yes, but only when it is at the left of the equal sign.

The line *MAILDIR = "$HOME/mail"* will do two things: 

1. set a variable named 'MAILDIR' to the value '/home/u/us/user/mail' 
   (where the '/home/u/us/user' part is just an example)
   or to the value '.' if "$HOME/mail" doesn't exist 
2. change the current working directory to "$HOME/mail"

The erroneous version  MAILDIR = "$HOME/mail/"  (with an evil slash 
at the end) will do almost the same, but will cause problems when 
used in expressions.

In an expression, $MAILDIR will just return what you put into it. 
Unless the directory didn't exist, because in that case MAILDIR 
was set to '.' which stands for 'current working directory'.


My point, in summary, was that you should set DEFAULT to something,
but not to a process.

   DEFAULT = "$HOME/Maildir/.Inbox/"

But it is OK to use $MAILDIR in an expression.

   MAILDIR = $HOME/mail
   DEFAULT = $MAILDIR/.Inbox

Sometimes, quotes are required:

   MAILDIR = "$HOME/mail #1"
   DEFAULT = $MAILDIR/.Inbox


-- 
Grtz, Ruud

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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