[Dovecot] Address with whitespace shows as ""@MISSING_DOMAIN

Timo Sirainen tss at iki.fi
Fri Mar 25 00:30:43 EET 2005


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)
 		t_pop();

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://dovecot.org/pipermail/dovecot/attachments/20050325/ebd2dc0b/attachment-0001.bin>


More information about the dovecot mailing list