[Dovecot] NUL characters in POP3 conversation cause Outlook to hang

Timo Sirainen tss at iki.fi
Sat Jul 10 02:01:38 EEST 2004


On 10.7.2004, at 01:32, Matthew Reimer wrote:

> We're being bitten an Outlook bug [1,2] that is triggered by a NUL 
> character in a message being sent through POP3. I see that dovecot's 
> imap implementation converts 0x00 to 0x80, but this conversion is not 
> done for POP3. Would it be possible to add an option to do this 
> mapping for POP3 as well?

Probably another setting to client_workarounds then, because it looks 
like NUL is valid for RFC822 and POP3 places no other requirements for 
mail.

This should anyway help:

--- src/pop3/commands.c 23 Jun 2004 18:33:22 -0000      1.17
+++ src/pop3/commands.c 9 Jul 2004 23:00:35 -0000
@@ -242,6 +242,8 @@
                                 add = '.';
                                 i++;
                                 break;
+                       } else if (data[i] == '\0') {
+                               add = '\x80';
                         }
                 }

@@ -252,6 +254,8 @@
                         if (o_stream_send(output, &add, 1) < 0)
                                 return;
                         last = add;
+                       if (i < size && data[i] == '\0')
+                               i++;
                 } else {
                         last = data[i-1];
                 }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://dovecot.org/pipermail/dovecot/attachments/20040710/aed3e9de/attachment-0001.bin>


More information about the dovecot mailing list