procmail
[Top] [All Lists]

Re: existance of a field?

1997-05-21 13:32:00
Well, it appears that:

listname | formail -rxx-list-id:

Will not assign the contents of the field to the var "listname", as the
v3.10 "procmailrc" says it will do.
Either something has changed, or there is a character missing from this
version of the man page.
I'm going to check other procmailrc man pages, to see what's going on.

Thanks for clearing that up

Luke

On Wed, 21 May 1997, Lars Kellogg-Stedman wrote:

{
:0
* ^x-list-id:.*
listname | formail -rxx-list-id:

:0
noname
}

If I understand your intent correct, the above is not going to work.  In
particular, this looks odd to me:
 
  listname | formail -rxx-list-id:
 
That looks like you really meant:
 
  listname=| formail -rxx-list-id:
 
Which would extract the list name into the 'listname' variable, but still
wouldn't save the message to a folder.  Once you've set up the variable,
you need to *use* it somewhere.  I thought something like this would work
better: 

  # If there's an x-list-id: header, extract the value and then use
  # it as the name of a mail folder. 
  :0
  * ^x-list-id: \/.*
  $MATCH
 
  # Otherwise, put it in the noname folder.
  :0E
  noname
 
I've tested this, and it seems to work as intended (or at least, as I
interpreted the original message).  

-- Lars

---
Lars Kellogg-Stedman * lars(_at_)bu(_dot_)edu * (617)353-8277
Office of Information Technology, Boston University



<Prev in Thread] Current Thread [Next in Thread>