procmail
[Top] [All Lists]

Re: scored weighting, and sort by size

1997-01-14 14:12:47
dattier(_at_)wwa(_dot_)com (David W. Tamkin) writes:
Philip Guenther revised his suggestion for Ken Marsh,

| Okay, how about this instead:
| 
| # preset or unset some variables
| R TOCOUNT=0 CCCOUNT=0
| 
| # set $R to be Resent- iff there are any headers that indicate this message
| # as having been resent.
| :0
| * ^Resent-(From|Date|To|Cc|Message-Id):
| { R="Resent-" }

How about just this?

 :0
 * ^Resent-
 { R=Resent- }

Well, a "Resent-Foo: bar" header shouldn't cause use to look for
Resent-To:  or Resent-Cc: headers, as "Resent-Foo:" is ignored by the
MTA.  I believe the ones listed above to be the only ones that force
the MTA to process Resent-To/Cc/etc instead of To/Cc/etc


...
You're right, Philip: if there are Resent- headers, then those without
"Resent-" don't matter and shouldn't be counted.  We should include
Apparently-(Resent-)To: as well, though.

There is no "Apparently-Resent-To:" (or "Resent-Apparently-To:") header.
Arguably, an "Apparently-To:" header should only be counted iff none of
the four headers (Resent-)To: and (Resent-)Cc: exist.  The following
recipe, to be added after the set I gave previously should do it:


# Check for "Apparently-To:" headers.  There should only be one address
# per header.  The 'E' flag is extraneous.
:0E
* ! ^(Resent-)?(To|Cc):
* 1^1 Apparently-To:
* -19^0
{ EXITCODE=77 HOST }


[Curiously, I've never seen commas in Apparently-(Resent-)To: lines.
Whenever there is more than one apparent recipient, they all get their own
fields.]

I think you're right, and have depended on it above.  Since
Apparently-To: was a pure sendmailism, this should be mostly
dependable.

Philip Guenther