procmail
[Top] [All Lists]

Re: recipe destination

2004-02-09 22:48:11
Robert Krueger asked:

If I use this simple recipe:

MAILDIR=$HOME/Maildir/

:0
* TO_procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
$MAILDIR

....does the mail end up in $HOME/Maildir/ or
$HOME/Maildir/$HOME/Maildir/ ?

Neither, but the former is closer to the right answer. Since the destination [is a variable that expands to a string that] begins with a slash, procmail takes it as an absolute path, not a relative one from $MAILDIR. So procmail won't double it to $HOME/Maildir/$HOME/Maildir. However, the destination also ends in a slash, so procmail will store the message as a file in $HOME/Maildir/new/, not in $HOME/Maildir itself.

Note, however, that the token for examining addressee fields is ^TO_ (or ^TO for the older form); without the caret, you're specifying literal text and it probably won't match. Further, ^TO_ is a poor way to identify mail through lists, but that's another topic. Also, you should escape the periods.

Anyhow, if you insist on using addressee fields to identify mail through lists, and you want mail through this list under the existing value of $MAILDIR in maildir-format (and I hope you already understand that the similarity of names between $MAILDIR and maildir is just an unfortunate overlap and the two mean different things),

 :0
 * ^TO_procmail(_at_)lists\(_dot_)rwth-aachen\(_dot_)de
 ./

....and does .procmailrc stop processing the email at this point?
( so that any other recipes beyond that point are not executed )

If delivery succeeds, yes, procmail stops. It is a delivering recipe, and you didn't give it a `c' flag to deliver a copy of the message instead.


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