Hi there,


Noll Janos schrieb am Thu, Nov 15, 2001 at 01:53:37AM +0100:
[...]
* 
* On 14-Nov-2001 Ian Castle wrote:
* > Duplicate elimnation is not a runtime or build option.
* 
*  I think it should be. (And, as it seems, I'm not the only one :-)
* 
* > However, it is probably worth checking that dupelim is used
* > consistently...
*  
*  It seems to be.
[...]
* 
* > If it does work, then the thing to do would be to add a config to
* > imapd.conf to control wether or not you want duplicate elimination.
* 
*  I'm also for that.

Me too ;-)


So here it comes, was fairly easy, see new imapd.conf(5).

I do not think the name of the option "duplicateelimination: yes|no" is
chosen very well, but I did not find a better one. Maybe we have some
creative folks here on the list?

The services work ok with it, you have to remove the "deliver" and "delprune"
lines from the default START and EVENT sections of /etc/cyrus.conf to avoid
slowdowns on that side.


Regards,

Birger

Common subdirectories: cyrus-imapd-2.0.16/imap/CVS and 
cyrus-imapd-2.0.16-dupelim.patch/imap/CVS
diff -u cyrus-imapd-2.0.16/imap/lmtpd.c cyrus-imapd-2.0.16-dupelim.patch/imap/lmtpd.c
--- cyrus-imapd-2.0.16/imap/lmtpd.c     Mon May 21 20:21:47 2001
+++ cyrus-imapd-2.0.16-dupelim.patch/imap/lmtpd.c       Thu Nov 15 15:54:28 2001
@@ -277,12 +277,17 @@
        return EC_SOFTWARE;
     }
 
-    /* initialize duplicate delivery database */
-    dupelim = 1;
-    if (duplicate_init(0) != 0) {
-       syslog(LOG_ERR, 
-              "deliver: unable to init duplicate delivery database\n");
-       dupelim = 0;
+    /* initialize duplicate delivery database if not switched off */
+    dupelim = config_getswitch("duplicateelimination", 1);
+    if (dupelim) {
+        if (duplicate_init(0) != 0) {
+           syslog(LOG_ERR, 
+                  "deliver: unable to init duplicate delivery database\n");
+           dupelim = 0;
+        }
     }
 
     /* so we can do mboxlist operations */
diff -u cyrus-imapd-2.0.16/imap/lmtpproxyd.c 
cyrus-imapd-2.0.16-dupelim.patch/imap/lmtpproxyd.c
--- cyrus-imapd-2.0.16/imap/lmtpproxyd.c        Thu Feb 22 20:27:18 2001
+++ cyrus-imapd-2.0.16-dupelim.patch/imap/lmtpproxyd.c  Thu Nov 15 15:55:13 2001
@@ -281,12 +281,17 @@
        return EC_SOFTWARE;
     }
 
-    /* initialize duplicate delivery database */
-    dupelim = 1;
-    if (duplicate_init(0) != 0) {
-       syslog(LOG_ERR, 
-              "deliver: unable to init duplicate delivery database\n");
-       dupelim = 0;
+    /* initialize duplicate delivery database if not switched off */
+    dupelim = config_getswitch("duplicateelimination", 1);
+    if (dupelim) {
+        if (duplicate_init(0) != 0) {
+            syslog(LOG_ERR,
+                   "deliver: unable to init duplicate delivery database\n");
+            dupelim = 0;
+        }
     }
 
     /* so we can do mboxlist operations */
diff -u cyrus-imapd-2.0.16/man/imapd.conf.5 
cyrus-imapd-2.0.16-dupelim.patch/man/imapd.conf.5
--- cyrus-imapd-2.0.16/man/imapd.conf.5 Sat Jun 23 03:01:50 2001
+++ cyrus-imapd-2.0.16-dupelim.patch/man/imapd.conf.5   Thu Nov 15 15:58:23 2001
@@ -166,6 +166,11 @@
 If enabled, deliver running in LMTP mode attempts to only write one
 copy of a message per partition and create hard links, resulting in a
 potentially large disk savings.
+.IP "\fBduplicateelimination:\fR yes" 5
+If enabled, the duplicate delivery databases will be initialized and
+processed to avoid the delivery of duplicate messages.  This should
+only switched off for performance reasons.  Disabling the use of the
+duplicate delivery database also disables sieve.
 .IP "\fBreject8bit:\fR no" 5
 If enabled, deliver rejects messages with 8-bit characters in the headers.
 Otherwise, 8-bit characters are changed to `X'.  (A proper soultion to

Reply via email to