[Dovecot] Address with whitespace shows as ""@MISSING_DOMAIN
It seems that Dovecot gets confused when presented with a header like:
From: someone@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).
Here's a sample IMAP session:
xyz FETCH 728 ENVELOPE
- 728 FETCH (ENVELOPE ("Tue, 22 Mar 2005 10:10:50 +0100 (BST)" "Test" ((NIL NIL "" "MISSING_DOMAIN")) ((NIL NIL "c.d.wakelin" "reading.ac.uk")) ((NIL NIL "" "MISSING_DOMAIN")) ((NIL NIL "" "MISSING_DOMAIN")) NIL NIL NIL "Pine.GSO.3.96.1010704101043.17798B-100000@suma3")) xyz OK Fetch completed.
Here's UW-IMAP on the same mailbox:
. FETCH 729 ENVELOPE
- 729 FETCH (ENVELOPE ("Tue, 22 Mar 2005 10:10:50 +0100 (BST)" "Test" ((NIL NIL "c.d.wakelin" "reading.ac.uk")) ((NIL NIL "c.d.wakelin" "reading.ac.uk")) ((NIL NIL "c.d.wakelin" "reading.ac.uk")) ((NIL NIL "c.d.wakelin" "reading.ac.uk")) NIL NIL NIL "Pine.GSO.3.96.1010704101043.17798B-100000@suma3")) . OK FETCH completed
I'm not sure I read the RFC correctly, but it looks like whitespace is allowed (and if it wasn't, I'd expect our MTA, Exim to fix it on delivery).
There's a particular member of one of the UK academic computing mailing lists who always seems to do this, but I'm not sure how common a problem it is!
Best Wishes, Chris
--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-- Christopher Wakelin, c.d.wakelin@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
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@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();
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@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@somewhere.org"
(which may not be legal. I've not seen any examples of this, anyway!)
Best Wishes, Chris
-- --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+- Christopher Wakelin, c.d.wakelin@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
participants (2)
-
Chris Wakelin
-
Timo Sirainen