changeset 5889:8117a34abdbd HEAD

Don't bother setting POP3 settings to IMAP processes and vice versa.
author Timo Sirainen <tss@iki.fi>
date Wed, 04 Jul 2007 04:47:00 +0300
parents a4cd1f37d022
children 989abd5017a4
files src/master/mail-process.c
diffstat 1 files changed, 27 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/src/master/mail-process.c	Tue Jul 03 20:44:08 2007 +0300
+++ b/src/master/mail-process.c	Wed Jul 04 04:47:00 2007 +0300
@@ -297,20 +297,34 @@
 				set->mailbox_idle_check_interval));
 	env_put(t_strdup_printf("MAIL_MAX_KEYWORD_LENGTH=%u",
 				set->mail_max_keyword_length));
-	env_put(t_strdup_printf("IMAP_MAX_LINE_LENGTH=%u",
-				set->imap_max_line_length));
-	if (*set->imap_capability != '\0') {
-		env_put(t_strconcat("IMAP_CAPABILITY=",
-				    set->imap_capability, NULL));
+
+	if (set->protocol == MAIL_PROTOCOL_IMAP) {
+		env_put(t_strdup_printf("IMAP_MAX_LINE_LENGTH=%u",
+					set->imap_max_line_length));
+		if (*set->imap_capability != '\0') {
+			env_put(t_strconcat("IMAP_CAPABILITY=",
+					    set->imap_capability, NULL));
+		}
+		env_put(t_strconcat("IMAP_CLIENT_WORKAROUNDS=",
+				    set->imap_client_workarounds, NULL));
 	}
-	env_put(t_strconcat("IMAP_CLIENT_WORKAROUNDS=",
-			    set->imap_client_workarounds, NULL));
-	env_put(t_strconcat("POP3_UIDL_FORMAT=",
-			    set->pop3_uidl_format, NULL));
-	env_put(t_strconcat("POP3_CLIENT_WORKAROUNDS=",
-			    set->pop3_client_workarounds, NULL));
-	env_put(t_strconcat("POP3_LOGOUT_FORMAT=",
-			    set->pop3_logout_format, NULL));
+	if (set->protocol == MAIL_PROTOCOL_POP3) {
+		env_put(t_strconcat("POP3_CLIENT_WORKAROUNDS=",
+				    set->pop3_client_workarounds, NULL));
+		env_put(t_strconcat("POP3_LOGOUT_FORMAT=",
+				    set->pop3_logout_format, NULL));
+		if (set->pop3_no_flag_updates)
+			env_put("POP3_NO_FLAG_UPDATES=1");
+		if (set->pop3_reuse_xuidl)
+			env_put("POP3_REUSE_XUIDL=1");
+		if (set->pop3_enable_last)
+			env_put("POP3_ENABLE_LAST=1");
+		if (set->pop3_lock_session)
+			env_put("POP3_LOCK_SESSION=1");
+	}
+
+	/* We care about POP3 UIDL format in all process types */
+	env_put(t_strconcat("POP3_UIDL_FORMAT=", set->pop3_uidl_format, NULL));
 
 	if (set->mail_save_crlf)
 		env_put("MAIL_SAVE_CRLF=1");
@@ -332,14 +346,6 @@
 		env_put("DEBUG=1");
 	if (set->mail_full_filesystem_access)
 		env_put("FULL_FILESYSTEM_ACCESS=1");
-	if (set->pop3_no_flag_updates)
-		env_put("POP3_NO_FLAG_UPDATES=1");
-	if (set->pop3_reuse_xuidl)
-		env_put("POP3_REUSE_XUIDL=1");
-	if (set->pop3_enable_last)
-		env_put("POP3_ENABLE_LAST=1");
-	if (set->pop3_lock_session)
-		env_put("POP3_LOCK_SESSION=1");
 	if (set->mbox_dirty_syncs)
 		env_put("MBOX_DIRTY_SYNCS=1");
 	if (set->mbox_very_dirty_syncs)