MBOX-Line: From tss at iki.fi  Wed Feb 20 10:32:43 2008
To: imap-protocol@u.washington.edu
From: Timo Sirainen <tss@iki.fi>
Date: Fri Jun  8 12:34:41 2018
Subject: [Imap-protocol] SEARCH and addresses
Message-ID: <1203532363.4901.178.camel@hurina>

I'm adding support for verifying SEARCH correctness to my imaptest tool
and I'm wondering how I should verify FROM/TO/CC/BCC searches. Their
description in RFC 3501 clearly doesn't match what servers currently do:

      FROM <string>
         Messages that contain the specified string in the envelope
         structure's FROM field.

Envelope doesn't contain "user@domain" anywhere, but searching it works
fine with all servers and is used by clients (I assume). I did a few
tests with UW-IMAP:

1) From: user@domain.org

SEARCH FROM user@domain.org matches
SEARCH FROM <user@domain.org> doesn't match

2) From: <user@domain.org>

SEARCH FROM user@domain.org matches
SEARCH FROM <user@domain.org> doesn't match

3) From: User Name <user@domain.org>

SEARCH FROM "User Name <user@domain.org>" matches

4) From: user@domain.org (User Name)

SEARCH FROM "User Name <user@domain.org>" matches
SEARCH FROM "user@domain.org (User Name)" doesn't match

I suppose not all servers have that exact same logic, so what would be
valid matching searches? I'd guess:

1) user@domain
2) "User Name"
3) Group name

And with comments removed from all of those in case they exist.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part
URL: <http://mailman13.u.washington.edu/pipermail/imap-protocol/attachments/20080220/5e629c32/attachment.sig>
