On Wed, Apr 21, 2004 at 01:14:38AM -0700, ms419(_at_)freezone(_dot_)co(_dot_)uk
wrote:
The "procmailrc" manpage reads:
---
The environment variable assignments and recipes can be freely
intermixed in the rcfile.
But that doesn't mean "intermixed inside a recipe."
---
So I'd hoped:
---
:0 f
* ^FROM_BBC News | News Front Page | UK Edition
MAILBOX=bbc-news
---
Would set the "MAILBOX" environment variable. Mail is instead delivered
to "~/MAILBOX=bbc-news".
I guess this makes sense ... But what I need is to set the "MAILBOX"
environment variable based on a condition.
Why are you using the f flag? That can't be right. There is no such
thing as a "^FROM_" macro in procmail, so that will be interpreted as a
newline followed by literal text "From_BBC News" (no case-sensitivity,
remember) and is vanishingly, implausibly unlikely ever to match
anything in your headers. Your spacey OR-pipes without surrounding
parens are also a problem. You're saying "Look for '^FROM_BBC News'
followed by a space, or look for a space followed by 'News Front Page'
followed by a space (anywhere in the headers), or look for a space
followed by 'UK Edition' (anywhere in the headers).
And you don't have a lockfile.
Try this:
:0:
* ^From:.*(BBC News|News Front Page|UK Edition)
bbc-news
Have you read "man procmailex"?
--
dman
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail