procmail
[Top] [All Lists]

Re: x-loop non seen

2003-10-20 08:26:17
On Mon, 20 Oct 2003 20:28:12 +0530, François Patte <Francois(_dot_)Patte(_at_)math-info(_dot_)univ-paris5(_dot_)fr> wrote:

<!SNIP!>
:3 hc
* !^FROM_DAEMON
* !^X-Loop: $MOI
* ^Subject: Renouvellement
<!SNIP!>

Match on ! "^X-Loop: $MOI" why????? Here are the headers of this automatic reply:


Hello:
I'm pretty sure that you need to use a '$' to interpolate variables in the conditional rules. I think that is the problem: the '$' in your rule is being taken as an end-of-line regexp marker and the 'MOI' not as a variable, but as a literal string. Try this:

# Notice the '$' inthe X-Loop condition
:3 hc
*   !^FROM_DAEMON
* $ !^X-Loop: ${MOI}
*   ^Subject: Renouvellement
    |(formail -r -A"X-Loop: $MOI";\
echo "tu as reçu un message de $TOO_ à propos de $SUB")|$SENDMAIL -i $MOI
:0 a
$GOULP

According to the procmailrc man page, the '$' means:

"Evaluate the remainder of this condition according to sh(1) substitution rules inside double quotes, skip leading whitespace, then reparse it."
<http://www.uklinux.net/support/procmailrc.php>

        I hope this helps.

        -dZ.

--
| DZ vs. THE WORLD...
|  Hating anything, everything and everyone since 1994.
`----- - -- -  -   -     -

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