Timo Sirainen | 24 Mar 23:30
Picon
Picon
Favicon

Re: Address with whitespace shows as ""@MISSING_DOMAIN

On Tue, 2005-03-22 at 10:49 +0000, Chris Wakelin wrote:
> It seems that Dovecot gets confused when presented with a header like:
> 
> From:    someone <at> somewhere.org
> 
> i.e. with leading whitespace and no "friendly name"
> This shows up as ""@MISSING_DOMAIN in clients, such as Pine, that 
> believe what Dovecot tells them rather than parsing the headers 
> themselves (e.g. Thunderbird).

Whops. I was skipping spaces everywhere else except at the beginning.

Fixed in CVS for 1.0-test/stable. Or use this patch:

Index: src/lib-mail/message-address.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-mail/message-address.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- src/lib-mail/message-address.c	14 Mar 2005 19:08:59 -0000	1.11
+++ src/lib-mail/message-address.c	24 Mar 2005 22:27:38 -0000	1.12
@@ -277,6 +277,8 @@
 	ctx.pool = pool;
 	ctx.str = t_str_new(128);

+	rfc822_skip_lwsp(&ctx.parser);
+
 	(void)parse_address_list(&ctx, max_addresses);
 	if (!pool->datastack_pool)
(Continue reading)

Chris Wakelin | 28 Mar 13:24
Picon
Picon

Re: Address with whitespace shows as ""@MISSING_DOMAIN

Timo Sirainen wrote:
> On Tue, 2005-03-22 at 10:49 +0000, Chris Wakelin wrote:
> 
>>It seems that Dovecot gets confused when presented with a header like:
>>
>>From:    someone <at> somewhere.org
>>
>>i.e. with leading whitespace and no "friendly name"
>>This shows up as ""@MISSING_DOMAIN in clients, such as Pine, that 
>>believe what Dovecot tells them rather than parsing the headers 
>>themselves (e.g. Thunderbird).
> 
> 
> Whops. I was skipping spaces everywhere else except at the beginning.
> 

Now works except for my test of

From:     "someone <at> somewhere.org"

(which may not be legal. I've not seen any examples of this, anyway!)

Best Wishes,
Chris

--

-- 
--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-
Christopher Wakelin,                           c.d.wakelin <at> reading.ac.uk
IT Services Centre, The University of Reading,  Tel: +44 (0)118 378 8439
Whiteknights, Reading, RG6 2AF, UK              Fax: +44 (0)118 975 3094
(Continue reading)


Gmane