Subject: Odd mail_search_full behaviour with mbox

From: Jochen Garcke <[email-masked]>
Date: Thu, 20 Mar 2003 11:26:19 +0100

Hi,

For mbox a " in the To: or From: seems to make problems 
in mail_search_full.
(actually I guess that is true for all fields with e-mail adresses.)

E.g.
"Jochen Garcke" <[email-masked]> 
does not get found whereas
Jochen Garcke <[email-masked]> 
does.

Seems a bit odd.

Regards,
  Jochen

-- 
Jochen Garcke                                     mail: [email-masked]
Institut fuer Angewandte Mathematik        Wegelerstraße 6, D-53115 Bonn
http://wissrech.iam.uni-bonn.de/people/garcke
GCD Deutschland (Die Comic Datenbank)           http://www.garcke.de/GCD
-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Thu, 20 Mar 2003 11:20:57 -0800 (Pacific Standard Time)

> Jochen Garcke <[email-masked]>

Is this the string in the mailbox, or the string that you are using to
search?

Note that the search is a string compare, not an RFC 2822 equivalency, so
if one string has " and the other does not, the search will not match.

So, it is better to search for
	Jochen Garcke
or
	[email-masked]

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.

---

From: Jochen Garcke <[email-masked]>
Date: Tue, 25 Mar 2003 20:34:21 +0100

On Fri, Mar 21, 2003 at 09:47:23AM +0100, Jochen Garcke wrote:
> On Thu, Mar 20, 2003 at 11:20:57AM -0800, Mark Crispin wrote:
> Yeah, I could have been clearer on that.
> is in the mbox file.
> That is why I find it quite odd.
> 
> Following is an actual mbox file with which I get this behaviour, here
> "Jochen Garcke" <[email-masked]>
> Jochen Garcke <[email-masked]>
> does, altough the To: has the former.

Looked a bit further into that. Added in mail_search_header an output
of this two variables.
hdr->data = Jochen Garcke <[email-masked]>
st->text = "Jochen Garcke" <[email-masked]>

The hdr->data represents the data from the actual mbox and is reproduced out
of the ENVELOPE data in mail_search_addr as far as I understand it. Somewhere
in that whole process the quotes get dropped. Could be the normal and wanted 
behaviour in other cases, but it seems to result in the odd behaviour that 
searching for an actual To: or From:-line which has quotes doesn't work.

If the dropping of the quotes is the wanted behaviour I will have to work around 
that for my stuff, no big deal.

Regards,
  Jochen

> 
> -----------------------------------------------------------------------
> 
> From [email-masked] Fri Mar 21 09:35:42 2003
> Received: (qmail 26305 invoked by uid 504); 21 Mar 2003 08:35:42 -0000
> Received: from [email-masked] by hermes.iam.uni-bonn.de by uid 501 with qmail-scanner-1.14 
>  (uvscan: v4.1.60/v4252. spamassassin: 2.43.  Clear:SA:0(-0.5/5.0):. 
>  Processed in 0.448133 secs); 21 Mar 2003 08:35:42 -0000
> X-Spam-Status: No, hits=-0.5 required=5.0
> Received: from unknown (HELO mailin.webmailer.de) (192.67.198.72)
>   by hermes.iam.uni-bonn.de with SMTP; 21 Mar 2003 08:35:42 -0000
> Received: from iam.uni-bonn.de (mail.iam.uni-bonn.de [131.220.223.6])
> 	by mailin.webmailer.de (8.12.8/8.8.7) with SMTP id h2L8ZfQZ000769
> 	for <[email-masked]>; Fri, 21 Mar 2003 09:35:41 +0100 (MET)
> Received: (qmail 26282 invoked from network); 21 Mar 2003 08:35:39 -0000
> Received: from unknown (HELO iam.uni-bonn.de) (131.220.223.9)
>   by hermes.iam.uni-bonn.de with SMTP; 21 Mar 2003 08:35:39 -0000
> Message-ID: <[email-masked]>
> Date: Fri, 21 Mar 2003 09:35:39 +0100
> From: Jochen Garcke <[email-masked]>
> User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.2.1) Gecko/20021130
> X-Accept-Language: de, en
> MIME-Version: 1.0
> To: "Jochen Garcke" <[email-masked]>
> Subject: TestMail
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 8bit
> Content-Length: 271
> Lines: 7
> X-IMAPbase: 1048235848 1
> Status: RO
> X-Status: 
> X-Keywords:                      
> X-UID: 1
> 
> 
> -- 
> -----------------------------------------------------------------------
> 
> --

---

From: Mark Crispin <[email-masked]>
Date: Tue, 25 Mar 2003 11:39:23 -0800 (PST)

> that for my stuff, no big deal.

Yes, the dropping of extraneous quotes is wanted behavior.

It can't be done in the search pattern (which would have solved the
problem) since an arbitrary string that doesn't parse as an address is
perfectly valid.

-- Mark --