--- configure.in.orig	Thu Mar 14 16:18:00 2002
+++ configure.in	Wed Mar 13 19:03:36 2002
@@ -250,6 +250,8 @@
   --with-fcgi           Compile with fastcgi support
   --without-ispell      Do not compile ispell support
   --with-ispell=prog    Pathname to ispell (if not in default path)
+  --enable-autorenamesent  Enable Autorename Sent folder periodically (default)
+  --disable-autorenamesent Disable Autorename Sent folder periodically
   --enable-https          Generate https:// URLs for all accesses
   --enable-https=login    Use https:// URLs for password transmission only 
   --enable-hardtimeout=7200  Hard session timeout (2hrs default)
--- sqwebmail/configure.in.orig	Thu Mar 14 16:18:43 2002
+++ sqwebmail/configure.in	Wed Mar 13 17:25:47 2002
@@ -96,6 +96,16 @@
 
 AM_CONDITIONAL(ISPELL, test "$ispell" != "")
 
+AC_ARG_ENABLE(autorenamesent, [
+  --enable-autorenamesent   Enable Autorename Sent folder periodically (default)
+  --disable-autorenamesent  Disable Autorename Sent folder periodically
+], , enable_autorenamesent=yes)
+if test ! "$enable_autorenamesent" = no; then
+        AC_DEFINE(AUTORENAMESENT, yes)
+else
+        AC_DEFINE(AUTORENAMESENT, no)
+fi
+
 dnl Checks for libraries.
 
 AC_CHECK_LIB(sun,getpwnam)
--- sqwebmail/acconfig.h.orig	Thu Mar 14 16:18:22 2002
+++ sqwebmail/acconfig.h	Wed Mar 13 16:57:21 2002
@@ -67,3 +67,6 @@
 
 /* Whether to include unicode-based translation */
 #undef	HAVE_SQWEBMAIL_UNICODE
+
+/* Status of autorename Sent folder */
+#undef AUTORENAMESENT
--- sqwebmail/sqwebmail.c.orig	Thu Mar 14 16:19:03 2002
+++ sqwebmail/sqwebmail.c	Thu Mar 14 16:09:41 2002
@@ -2426,7 +2426,14 @@
 #endif
 #endif
 				(void)maildir_create(DRAFTS);
-				(void)rename_sent_folder();
+				{
+					const char *autorenamesent="AUTORENAMESENT";
+					const char *p=getenv("SQWEBMAIL_AUTORENAMESENT");
+					if (p && *p)
+						autorenamesent = p;
+					if ( strncmp(autorenamesent, "no", 2) != 0 )
+						(void)rename_sent_folder();
+				}
 				(void)maildir_create(SENT);
 				(void)maildir_create(TRASH);
 				pref_init();
