procmail
[Top] [All Lists]

Re: Procmail will not use a VAR as filename for mailbox

2003-01-13 05:09:17
Lars Andersen <laa(_at_)dmdata(_dot_)dk> schrieb:

:0 flags:
* ^Subject:.[Cr][Rr][Oo][Nn][Tt][Aa][Bb].*
SUCCESS=| formail -xSubject:
/home/rapport/status/${SUCCESS}

The procmail log showes this:

procmail: Skipped "lags:"

You maybe want a `$' in front of $flags.  You've
unintentionally created a filtering recipe, with the `f',
btw.  But that's an aside, and it was rejected by procmail,
anyway, per your log.  (Have you *read* your log?)


procmail: Match on "^Subject:.[Cc][Rr][Oo][Nn][Tt][Aa][Bb].*"

Procmail is case-insensitive by default.  You really don't
need that syntax at all, unless you're using the `D' flag
to invoke case-sensitivity.

procmail: Extraneous filter-flag ignored

That was your `f'.

procmail: Assigning "SUCCESS="
procmail: Executing "formail,-xSubject:"
procmail: Skipped "/home/rapport/status/${SUCCESS}"

"Skipped," because a recipe cannot hav two action lines.
That is your main problem.


Why will Procmail not write a mailboxfile with VAR ${SUCCESS} as name?

Btw, some builds of procmail have trouble with the

        var|= expression

syntax due to a bug.  I don't know whether that's biting you too,
but if SUCCESS really is empty for you, then that's why.  In that
case, switch to

        SUCCESS = `formail -xSubject:`

as an assignment statement (not as action in a recipe).

-- 
dman


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail