procmail
[Top] [All Lists]

Re: extracting RE arguments from the matching string

2002-05-09 08:32:18
At 15:19 2002-05-09 +0100, Giles Constant did say:
:0
* ^List-Local:(.*)
$1

$1 is a variable for a parameter passed to procmail in it's invocation. It is NOT a positional regexp variable, such as you find in say, a Perl match operation. Parenthesis in procmail expressions only represent logical groupings - they do not group results for assignment to positional variables.

Note that you're missing a lockfile flag on the flags line.

In other words, on reciept of an email with header 'List-Local: foo', the
mail should be written to a mailbox called 'foo'.

:0:
* ^List-Local:[         ]*\/[^  ].*
$MATCH

Procmail has a SINGLE

HOWEVER, if I want to truely hose you, all I have to do is send a few forged messages with:

List-Local: /home/gilesc/some_file_you'd_just_as_soon_wasn't_mangled

Or equally ugly constructs.

Yet another reason why root mail on a system should be aliased to a non-privledged account (lest someone use /etc/passwd or /etc/hosts.deny etc).

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

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