Subject: Duplicated header lines

From: Lawrence Greenfield <[email-masked]>
Date: 21 Jan 1999 22:29:41 -0500

The other day I received a mail message with multiple "To" lines, and
this got me thinking---what is the definition of the "header" test
when a header appears multiple times?

Currently, my implementation is broken---it tests only against the
first (or maybe last) header of that name---but it's quite possibly
that I want to see if I'm mentioned explicitly in the "To" header, and
this will break if there are multiple "To" headers.

I've thought about fixing this by appending the contents of a header
that appears multiple times together, possibly with a \r\n in
between.  (I'm lazy.)

Tim suggested that instead a header test be run against each instance
of the header, and the result OR'd together.  (But this is also easy.)

Thoughts?

Larry

---

From: Tim Showalter <[email-masked]>
Date: 22 Jan 1999 02:44:14 -0500

> Date: 21 Jan 1999 22:29:41 -0500
> From: Lawrence Greenfield <[email-masked]>
> 

> of the header, and the result OR'd together.  (But this is also easy.)

For the message fragment

	To: [email-masked]
	To: [email-masked]

the string "[email-masked]\r\[email-masked]" does not appear, but by the
first algorithm specified, it would match, but it never occurs.

This is nearly absurd for structured address headers but less so on
random other headers (perhaps Received).

Oh, whatever we called the address-in-header command should parse all
headers specified.

We are splitting hairs so fine the electrons are flying away from the protons.

-- 
Tim Showalter <[email-masked]>

---

From: Pete Resnick <[email-masked]>
Date: Fri, 22 Jan 1999 01:59:33 -0600

> when a header appears multiple times?

May I mention that you might want to take into consideration section 
4.5.3 of <draft-ietf-drums-msg-fmt-07.txt>.

pr
--
Pete Resnick <mailto:[email-masked]>
Eudora Engineering - QUALCOMM Incorporated
Ph: (217)337-6377 or (619)651-4478, Fax: (619)651-1102

---

From: Tim Showalter <[email-masked]>
Date: 22 Jan 1999 06:25:02 -0500

> Date: Fri, 22 Jan 1999 01:59:33 -0600
> From: Pete Resnick <[email-masked]>

> 4.5.3 of <draft-ietf-drums-msg-fmt-07.txt>.

So HEADER should match across address headers concatenated with a comma.

I still believe that non-address headers, such as Received, should not
be matched across headers.

---

From: Randall Gellens <[email-masked]>
Date: Mon, 25 Jan 1999 13:51:57 -0800

>of the header, and the result OR'd together.  (But this is also easy.)

My Sieve implementation runs the test against all instances of the header.
(I was specifically thinking of "Received" when I wrote the code, as I use
a number of spam filters that examine "Received" headers, but the code does
this for all headers.)