changeset 2952:546214c0e6e9 HEAD

Added oe-ns-eoh workaround.
author Timo Sirainen <tss@iki.fi>
date Tue, 07 Dec 2004 03:19:10 +0200
parents 93cdd2b92650
children ce8ff2279fb2
files dovecot-example.conf src/pop3/commands.c src/pop3/common.h src/pop3/main.c
diffstat 4 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dovecot-example.conf	Tue Dec 07 03:02:04 2004 +0200
+++ b/dovecot-example.conf	Tue Dec 07 03:19:10 2004 +0200
@@ -449,6 +449,9 @@
   #   outlook-no-nuls:
   #     Outlook and Outlook Express hang if mails contain NUL characters.
   #     This setting replaces them with 0x80 character.
+  #   oe-ns-eoh:
+  #     Outlook Express and Netscape Mail breaks if end of headers-line is
+  #     missing. This option simply sends it if it's missing.
   #pop3_client_workarounds = 
 }
 
--- a/src/pop3/commands.c	Tue Dec 07 03:02:04 2004 +0200
+++ b/src/pop3/commands.c	Tue Dec 07 03:19:10 2004 +0200
@@ -328,6 +328,11 @@
 		(void)o_stream_send(client->output, "\r\n", 2);
 	}
 
+	if (!ctx->in_body && (client_workarounds & WORKAROUND_OE_NS_EOH) != 0) {
+		/* Add the missing end of headers line. */
+		(void)o_stream_send(client->output, "\r\n", 2);
+	}
+
 	client_send_line(client, ".");
 	fetch_deinit(ctx);
 	client->cmd = NULL;
--- a/src/pop3/common.h	Tue Dec 07 03:02:04 2004 +0200
+++ b/src/pop3/common.h	Tue Dec 07 03:19:10 2004 +0200
@@ -5,7 +5,8 @@
 #include "client.h"
 
 enum client_workarounds {
-	WORKAROUND_OUTLOOK_NO_NULS		= 0x01
+	WORKAROUND_OUTLOOK_NO_NULS		= 0x01,
+	WORKAROUND_OE_NS_EOH			= 0x02
 };
 
 extern struct ioloop *ioloop;
--- a/src/pop3/main.c	Tue Dec 07 03:02:04 2004 +0200
+++ b/src/pop3/main.c	Tue Dec 07 03:19:10 2004 +0200
@@ -26,6 +26,7 @@
 
 struct client_workaround_list client_workaround_list[] = {
 	{ "outlook-no-nuls", WORKAROUND_OUTLOOK_NO_NULS },
+	{ "oe-ns-eoh", WORKAROUND_OE_NS_EOH },
 	{ NULL, 0 }
 };