summaryrefslogtreecommitdiff
path: root/imapd
diff options
context:
space:
mode:
authorThomas Arendsen Hein <thomas@intevation.de>2007-07-17 14:59:33 (GMT)
committerThomas Arendsen Hein <thomas@intevation.de>2007-07-17 14:59:33 (GMT)
commitb43f75a568a55946348a166c5e2f9d84088f73d8 (patch)
tree50871488cf453b4b3cc6d10b5c6c1fbff5e8abce /imapd
parent192f281e78e87b6cb5fcae2818a6db1ec2eef3b2 (diff)
downloadserver-b43f75a568a55946348a166c5e2f9d84088f73d8.tar.gz
Removed files that are not part of Kolab server 2.2-beta1
Many patches have been accepted upstream or exist as patches to the used OpenPKG versions. obmtool is mostly superceded by the 'openpkg build' command.
Diffstat (limited to 'imapd')
-rw-r--r--imapd/.cvsignore1
-rw-r--r--imapd/Makefile48
-rw-r--r--imapd/README12
-rw-r--r--imapd/cyradm.annotate.patch78
-rw-r--r--imapd/imapd-goodchars.patch52
-rw-r--r--imapd/imapd-murder.patch20
-rw-r--r--imapd/imapd.annotate.patch118
-rw-r--r--imapd/imapd.folderchar.patch140
-rw-r--r--imapd/imapd.group2.patch20
-rw-r--r--imapd/imapd.morelogging.patch100
-rw-r--r--imapd/kolab-ldap.patch137
-rw-r--r--imapd/kolab.patch110
12 files changed, 0 insertions, 836 deletions
diff --git a/imapd/.cvsignore b/imapd/.cvsignore
deleted file mode 100644
index 77fcdcb..0000000
--- a/imapd/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.src.rpm
diff --git a/imapd/Makefile b/imapd/Makefile
deleted file mode 100644
index 62d96d4..0000000
--- a/imapd/Makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-ifeq "x$(KOLABPKGURI)" "x"
- KOLABPKGURI = ftp://ftp.openpkg.org/release/2.5/SRC
-endif
-ifeq "x$(KOLABRPMSRC)" "x"
- KOLABRPMSRC = /kolab/RPM/SRC
-endif
-ifeq "x$(KOLABRPMPKG)" "x"
- KOLABRPMPKG = /kolab/RPM/PKG
-endif
-ifeq "x$(KOLABCVSDIR)" "x"
- KOLABCVSDIR = $(CURDIR)
-endif
-
-PACKAGE=imapd
-VERSION=2.2.12
-RELEASE=2.5.0
-KOLABRELEASE=2.5.0_kolab2
-
-RPM=/kolab/bin/openpkg rpm
-KOLABPKGURI:=`/kolab/bin/openpkg register -R $(KOLABPKGURI)`
-
-PATCHES=$(KOLABCVSDIR)/cyradm.annotate.patch \
- $(KOLABCVSDIR)/imapd.annotate.patch \
- $(KOLABCVSDIR)/imapd.morelogging.patch \
- $(KOLABCVSDIR)/imapd.group2.patch \
- $(KOLABCVSDIR)/imapd-goodchars.patch \
- $(KOLABCVSDIR)/imapd.folderchar.patch \
- $(KOLABCVSDIR)/kolab-ldap.patch
-
-all: $(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm
-
-$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm: $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm $(KOLABCVSDIR)/kolab.patch $(PATCHES) Makefile
- $(RPM) -ihv $(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm
-
- cp $(PATCHES) $(KOLABRPMSRC)/$(PACKAGE)/
-
- cp $(KOLABCVSDIR)/kolab.patch $(KOLABRPMSRC)/$(PACKAGE)/ # Patch for imapd.spec
- cd $(KOLABRPMSRC)/$(PACKAGE) && patch < $(KOLABCVSDIR)/kolab.patch && $(RPM) -ba $(PACKAGE).spec --define 'with_group yes' --define 'with_atvdom yes' --define 'with_annotate yes' --define 'with_ldap yes' --define 'with_goodchars yes' --define 'with_morelogging yes'
- cp -p $(KOLABRPMPKG)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm $(KOLABCVSDIR)
-
-imapd-$(VERSION)-$(RELEASE).src.rpm:
- wget -c $(KOLABPKGURI)/imapd-$(VERSION)-$(RELEASE).src.rpm
-
-dist: all
- cp $(KOLABCVSDIR)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm ../stage/
-
-clean:
- rm -rf /kolab/RPM/TMP/cyrus-imapd* cyrus* imapd* rc.imapd vhosthack.patch fsl.imapd groupfile.patch $(KOLABCVSDIR)/$(PACKAGE)-$(VERSION)-$(KOLABRELEASE).src.rpm
diff --git a/imapd/README b/imapd/README
deleted file mode 100644
index ef7c124..0000000
--- a/imapd/README
+++ /dev/null
@@ -1,12 +0,0 @@
-for a short time, maintain a patch for the openpkg source rpm
-
-to build imapd for kolab run make
-
-Patches maintained here:
-========================
-
-imapd.annotate.patch: Allow for custom annotation.
-imapd.group2.patch: Patch based on OpenPKG Patch: compare groupnames case insensitively
-imapd-murder.patch: Patch to the OpenPKG specfile: build with murder
-kolab-ldap.patch: Patch to support virtdomains: ldap (parse domain from "email" field an LDAP user entry)
-kolab.patch: Patch to the OpenPKG specfile
diff --git a/imapd/cyradm.annotate.patch b/imapd/cyradm.annotate.patch
deleted file mode 100644
index 1af2887..0000000
--- a/imapd/cyradm.annotate.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-diff -upr ../cyrus-imapd-2.2.12.orig/doc/man/cyradm.1.html ./doc/man/cyradm.1.html
---- ../cyrus-imapd-2.2.12.orig/doc/man/cyradm.1.html 2005-02-14 19:02:26.000000000 +0100
-+++ ./doc/man/cyradm.1.html 2005-08-29 04:35:21.000000000 +0200
-@@ -191,6 +191,10 @@ Indicates that the mailbox should have a
- <DD>
- Sets an email address to which messages injected into the server via NNTP
- will be sent.
-+<P></P>
-+<DT><STRONG><A NAME="item__2fexplicit_2fannotation"><CODE>/explicit/annotation</CODE></A></STRONG><BR>
-+<DD>
-+Sets the annotation <EM>/explicit/annotation</EM> on <EM>mailbox</EM> to <EM>value</EM>.
- <P></P></DL>
- <DT><STRONG><A NAME="item_renamemailbox_%5B%2D%2Dpartition_partition%5D_oldn"><CODE>renamemailbox</CODE> [<CODE>--partition</CODE> <EM>partition</EM>] <EM>oldname</EM> <EM>newname</EM></A></STRONG><BR>
- <DD>
-diff -upr ../cyrus-imapd-2.2.12.orig/perl/imap/cyradm.sh ./perl/imap/cyradm.sh
---- ../cyrus-imapd-2.2.12.orig/perl/imap/cyradm.sh 2004-01-15 15:35:34.000000000 +0100
-+++ ./perl/imap/cyradm.sh 2005-08-29 04:28:51.000000000 +0200
-@@ -225,6 +225,10 @@ Indicates that the mailbox should have a
- Sets an email address to which messages injected into the server via NNTP
- will be sent.
-
-+=item C</explicit/annotation>
-+
-+Sets the annotation I</explicit/annotation> on I<mailbox> to I<value>.
-+
- =back
-
- =item C<renamemailbox> [C<--partition> I<partition>] I<oldname> I<newname>
-diff -upr ../cyrus-imapd-2.2.12.orig/perl/imap/IMAP/Admin.pm ./perl/imap/IMAP/Admin.pm
---- ../cyrus-imapd-2.2.12.orig/perl/imap/IMAP/Admin.pm 2004-02-19 23:50:12.000000000 +0100
-+++ ./perl/imap/IMAP/Admin.pm 2005-08-29 04:02:38.000000000 +0200
-@@ -789,12 +789,12 @@ sub mboxconfig {
- return undef;
- }
-
-- if(!exists($values{$entry})) {
-- $self->{error} = "Unknown parameter $entry";
-+ if(exists($values{$entry})) {
-+ $entry = $values{$entry};
-+ } else {
-+ $self->{error} = "Unknown parameter $entry" unless substr($entry,0,1) eq "/";
- }
-
-- $entry = $values{$entry};
--
- my ($rc, $msg);
-
- $value = undef if($value eq "none");
-diff -upr ../cyrus-imapd-2.2.12.orig/perl/imap/IMAP/Shell.pm ./perl/imap/IMAP/Shell.pm
---- ../cyrus-imapd-2.2.12.orig/perl/imap/IMAP/Shell.pm 2004-01-15 15:35:35.000000000 +0100
-+++ ./perl/imap/IMAP/Shell.pm 2005-08-29 04:02:38.000000000 +0200
-@@ -126,7 +126,7 @@ my %builtins = (exit =>
- [\&_sc_info, '[mailbox]',
- 'display mailbox/server metadata'],
- mboxcfg =>
-- [\&_sc_mboxcfg, 'mailbox [comment|news2mail|expire|squat] value',
-+ [\&_sc_mboxcfg, 'mailbox [comment|news2mail|expire|squat|/<explicit annotation>] value',
- 'configure mailbox'],
- mboxconfig => 'mboxcfg',
- reconstruct =>
-@@ -1339,7 +1339,7 @@ sub _sc_mboxcfg {
- while (defined ($opt = shift(@argv))) {
- last if $opt eq '--';
- if ($opt =~ /^-/) {
-- die "usage: mboxconfig mailbox [comment|news2mail|expire|squat] value\n";
-+ die "usage: mboxconfig mailbox [comment|news2mail|expire|squat|/<explicit annotation>] value\n";
- }
- else {
- push(@nargv, $opt);
-@@ -1348,7 +1348,7 @@ sub _sc_mboxcfg {
- }
- push(@nargv, @argv);
- if (@nargv < 2) {
-- die "usage: mboxconfig mailbox [comment|news2mail|expire|squat] value\n";
-+ die "usage: mboxconfig mailbox [comment|news2mail|expire|squat|/<explicit annotation>] value\n";
- }
- if (!$cyrref || !$$cyrref) {
- die "mboxconfig: no connection to server\n";
diff --git a/imapd/imapd-goodchars.patch b/imapd/imapd-goodchars.patch
deleted file mode 100644
index b338704..0000000
--- a/imapd/imapd-goodchars.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff -upr ../cyrus-imapd-2.2.12.orig/imap/imapd.c ./imap/imapd.c
---- ../cyrus-imapd-2.2.12.orig/imap/imapd.c 2005-02-14 07:39:55.000000000 +0100
-+++ ./imap/imapd.c 2005-04-21 00:59:50.865255448 +0200
-@@ -3923,10 +3923,12 @@ void cmd_rename(const char *tag,
- }
- }
-
-+#ifdef notdef
- /* verify that the mailbox doesn't have a wildcard in it */
- for (p = oldmailboxname; !r && *p; p++) {
- if (*p == '*' || *p == '%') r = IMAP_MAILBOX_BADNAME;
- }
-+#endif
-
- /* attempt to rename the base mailbox */
- if (!r) {
-Kun i ./imap: imapd.c.orig
-diff -upr ../cyrus-imapd-2.2.12.orig/imap/mboxlist.c ./imap/mboxlist.c
---- ../cyrus-imapd-2.2.12.orig/imap/mboxlist.c 2004-07-26 20:08:03.000000000 +0200
-+++ ./imap/mboxlist.c 2005-04-21 00:59:50.874254080 +0200
-@@ -476,10 +476,12 @@ mboxlist_mycreatemailboxcheck(char *name
- free(acl);
- return IMAP_PERMISSION_DENIED;
- }
-+#ifdef notdef
- /* disallow wildcards in userids with inboxes. */
- if (strchr(mbox, '*') || strchr(mbox, '%') || strchr(mbox, '?')) {
- return IMAP_MAILBOX_BADNAME;
- }
-+#endif
-
- /*
- * Users by default have all access to their personal mailbox(es),
-diff -upr ../cyrus-imapd-2.2.12.orig/imap/mboxname.c ./imap/mboxname.c
---- ../cyrus-imapd-2.2.12.orig/imap/mboxname.c 2005-02-14 07:39:57.000000000 +0100
-+++ ./imap/mboxname.c 2005-04-21 00:59:50.879253320 +0200
-@@ -649,8 +649,13 @@ int mboxname_netnewscheck(char *name)
- /*
- * Apply site policy restrictions on mailbox names.
- * Restrictions are hardwired for now.
-- */
-+
-+ * original definition
- #define GOODCHARS " +,-.0123456789:=@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~"
-+ */
-+
-+#define GOODCHARS " #$%'()*+,-.0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~"
-+
- int mboxname_policycheck(char *name)
- {
- unsigned i;
-Kun i ./imap: mboxname.c.orig
diff --git a/imapd/imapd-murder.patch b/imapd/imapd-murder.patch
deleted file mode 100644
index 89d1d4f..0000000
--- a/imapd/imapd-murder.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- imapd.spec.orig 2004-06-24 00:51:48.000000000 +0200
-+++ imapd.spec 2004-06-24 00:56:57.000000000 +0200
-@@ -41,6 +41,7 @@ Release: 20040620
- %option with_group no
- %option with_atvdom no
- %option with_drac no
-+%option with_murder no
-
- # list of sources
- Source0: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-imapd-%{version}.tar.gz
-@@ -177,7 +178,8 @@ AutoReqProv: no
- --without-ucdsnmp \
- --with-cyrus-prefix=%{l_prefix} \
- --with-cyrus-user=%{l_rusr} \
-- --with-cyrus-group=%{l_rgrp}
-+ --with-cyrus-group=%{l_rgrp} \
-+ --enable-murder=%{with_murder}
-
- # redirect the hard-coded file paths
- %{l_shtool} subst \
diff --git a/imapd/imapd.annotate.patch b/imapd/imapd.annotate.patch
deleted file mode 100644
index a6ac192..0000000
--- a/imapd/imapd.annotate.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-diff -upr ../cyrus-imapd-2.2.6/imap/annotate.c ./imap/annotate.c
---- ../cyrus-imapd-2.2.6/imap/annotate.c 2004-05-22 05:45:48.000000000 +0200
-+++ ./imap/annotate.c 2004-07-05 11:59:13.000000000 +0200
-@@ -1598,6 +1598,11 @@ const struct annotate_st_entry mailbox_r
- { NULL, 0, ANNOTATION_PROXY_T_INVALID, 0, 0, NULL, NULL }
- };
-
-+const struct annotate_st_entry vendor_entry =
-+ { NULL, ATTRIB_TYPE_STRING, BACKEND_ONLY,
-+ ATTRIB_VALUE_SHARED | ATTRIB_VALUE_PRIV,
-+ ACL_ADMIN, annotation_set_todb, NULL };
-+
- int annotatemore_store(char *mailbox,
- struct entryattlist *l,
- struct namespace *namespace,
-@@ -1610,6 +1615,7 @@ int annotatemore_store(char *mailbox,
- struct attvaluelist *av;
- struct storedata sdata;
- const struct annotate_st_entry *entries;
-+ struct annotate_st_entry * working_entry;
- time_t now = time(0);
-
- memset(&sdata, 0, sizeof(struct storedata));
-@@ -1631,37 +1637,55 @@ int annotatemore_store(char *mailbox,
- while (e) {
- int entrycount, attribs;
- struct annotate_st_entry_list *nentry = NULL;
-+ struct annotate_st_entry *ientry = NULL;
-
- /* See if we support this entry */
-+ working_entry = NULL;
- for (entrycount = 0;
- entries[entrycount].name;
- entrycount++) {
- if (!strcmp(e->entry, entries[entrycount].name)) {
-+ working_entry = &(entries[entrycount]);
- break;
- }
- }
-- if (!entries[entrycount].name) {
-- /* unknown annotation */
-- return IMAP_PERMISSION_DENIED;
-+ if (working_entry==NULL) {
-+ /* test for generic vendor annotation */
-+ if ((strncmp("/vendor/", e->entry, strlen("/vendor/"))==0) &&
-+ (strlen(e->entry)>strlen("/vendor/"))) {
-+ working_entry = &(vendor_entry);
-+ }
-+ else {
-+ /* unknown annotation */
-+ return IMAP_PERMISSION_DENIED;
-+ }
- }
-
- /* Add this entry to our list only if it
- applies to our particular server type */
-- if (entries[entrycount].proxytype == PROXY_AND_BACKEND
-+ if (working_entry->proxytype == PROXY_AND_BACKEND
- || (proxy_store_func &&
-- entries[entrycount].proxytype == PROXY_ONLY)
-+ working_entry->proxytype == PROXY_ONLY)
- || (!proxy_store_func &&
-- entries[entrycount].proxytype == BACKEND_ONLY)) {
-+ working_entry->proxytype == BACKEND_ONLY)) {
-+ ientry = xzmalloc(sizeof(struct annotate_st_entry));
-+ ientry->name = e->entry;
-+ ientry->type = working_entry->type;
-+ ientry->proxytype = working_entry->proxytype;
-+ ientry->attribs = working_entry->attribs;
-+ ientry->acl = working_entry->acl;
-+ ientry->set = working_entry->set;
-+ ientry->rock = working_entry->rock;
- nentry = xzmalloc(sizeof(struct annotate_st_entry_list));
- nentry->next = sdata.entry_list;
-- nentry->entry = &(entries[entrycount]);
-+ nentry->entry = ientry;
- nentry->shared.modifiedsince = now;
- nentry->priv.modifiedsince = now;
- sdata.entry_list = nentry;
- }
-
- /* See if we are allowed to set the given attributes. */
-- attribs = entries[entrycount].attribs;
-+ attribs = working_entry->attribs;
- av = e->attvalues;
- while (av) {
- const char *value;
-@@ -1671,7 +1695,7 @@ int annotatemore_store(char *mailbox,
- goto cleanup;
- }
- value = annotate_canon_value(av->value,
-- entries[entrycount].type);
-+ working_entry->type);
- if (!value) {
- r = IMAP_ANNOTATION_BADVALUE;
- goto cleanup;
-@@ -1697,7 +1721,7 @@ int annotatemore_store(char *mailbox,
- goto cleanup;
- }
- value = annotate_canon_value(av->value,
-- entries[entrycount].type);
-+ working_entry->type);
- if (!value) {
- r = IMAP_ANNOTATION_BADVALUE;
- goto cleanup;
-@@ -1797,6 +1821,12 @@ int annotatemore_store(char *mailbox,
- /* Free the entry list */
- while (sdata.entry_list) {
- struct annotate_st_entry_list *freeme = sdata.entry_list;
-+ if (freeme != NULL){
-+ struct annotate_st_entry *freeme2 = freeme->entry;
-+ if (freeme2 != NULL) {
-+ free( freeme2 );
-+ }
-+ }
- sdata.entry_list = sdata.entry_list->next;
- free(freeme);
- }
diff --git a/imapd/imapd.folderchar.patch b/imapd/imapd.folderchar.patch
deleted file mode 100644
index 8195748..0000000
--- a/imapd/imapd.folderchar.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-diff -Naurp ../cyrus-imapd-2.2.12.orig/lib/bsearch.c ./lib/bsearch.c
---- ../cyrus-imapd-2.2.12.orig/lib/bsearch.c 2003-02-13 21:15:39.000000000 +0100
-+++ ./lib/bsearch.c 2006-07-15 22:49:05.000000000 +0200
-@@ -213,3 +213,22 @@ int bsearch_compare(const char *s1, cons
- s2++;
- }
- }
-+
-+int bsearch_ncompare(const char *s1, int l1, const char *s2, int l2)
-+{
-+ int min = l1 < l2 ? l1 : l2;
-+ int cmp = 0;
-+
-+ while (min-- > 0 && (cmp = TOCOMPARE(*s1) - TOCOMPARE(*s2)) == 0) {
-+ s1++;
-+ s2++;
-+ }
-+ if (min >= 0) {
-+ return cmp;
-+ } else {
-+ if (l2 > l1) return -1;
-+ else if (l1 > l2) return 1;
-+ else return 0;
-+ }
-+}
-+
-diff -Naurp ../cyrus-imapd-2.2.12.orig/lib/bsearch.h ./lib/bsearch.h
---- ../cyrus-imapd-2.2.12.orig/lib/bsearch.h 2003-02-13 21:15:39.000000000 +0100
-+++ ./lib/bsearch.h 2006-07-14 15:06:24.000000000 +0200
-@@ -51,4 +51,6 @@ extern int bsearch_mem(const char *word,
-
- extern int bsearch_compare(const char *s1, const char *s2);
-
-+extern int bsearch_ncompare(const char *s1, int l1, const char *s2, int l2);
-+
- #endif /* INCLUDED_BSEARCH_H */
-diff -Naurp ../cyrus-imapd-2.2.12.orig/lib/cyrusdb_skiplist.c ./lib/cyrusdb_skiplist.c
---- ../cyrus-imapd-2.2.12.orig/lib/cyrusdb_skiplist.c 2004-06-08 21:55:17.000000000 +0200
-+++ ./lib/cyrusdb_skiplist.c 2006-07-15 22:51:08.000000000 +0200
-@@ -68,6 +68,7 @@
- #include "retry.h"
- #include "util.h"
- #include "xmalloc.h"
-+#include "bsearch.h"
-
- #define PROB (0.5)
-
-@@ -787,24 +788,6 @@ int myclose(struct db *db)
- return dispose_db(db);
- }
-
--static int compare(const char *s1, int l1, const char *s2, int l2)
--{
-- int min = l1 < l2 ? l1 : l2;
-- int cmp = 0;
--
-- while (min-- > 0 && (cmp = *s1 - *s2) == 0) {
-- s1++;
-- s2++;
-- }
-- if (min >= 0) {
-- return cmp;
-- } else {
-- if (l1 > l2) return 1;
-- else if (l2 > l1) return -1;
-- else return 0;
-- }
--}
--
- /* returns the offset to the node asked for, or the node after it
- if it doesn't exist.
- if previous is set, finds the last node < key */
-@@ -824,7 +807,7 @@ static const char *find_node(struct db *
-
- for (i = db->curlevel - 1; i >= 0; i--) {
- while ((offset = FORWARD(ptr, i)) &&
-- compare(KEY(db->map_base + offset), KEYLEN(db->map_base + offset),
-+ bsearch_ncompare(KEY(db->map_base + offset), KEYLEN(db->map_base + offset),
- key, keylen) < 0) {
- /* move forward at level 'i' */
- ptr = db->map_base + offset;
-@@ -875,7 +858,7 @@ int myfetch(struct db *db,
-
- ptr = find_node(db, key, keylen, 0);
-
-- if (ptr == db->map_base || compare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
-+ if (ptr == db->map_base || bsearch_ncompare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
- /* failed to find key/keylen */
- r = CYRUSDB_NOTFOUND;
- } else {
-@@ -963,7 +946,7 @@ int myforeach(struct db *db,
- while (ptr != db->map_base) {
- /* does it match prefix? */
- if (KEYLEN(ptr) < (bit32) prefixlen) break;
-- if (prefixlen && compare(KEY(ptr), prefixlen, prefix, prefixlen)) break;
-+ if (prefixlen && bsearch_ncompare(KEY(ptr), prefixlen, prefix, prefixlen)) break;
-
- if (!goodp ||
- goodp(rock, KEY(ptr), KEYLEN(ptr), DATA(ptr), DATALEN(ptr))) {
-@@ -1116,7 +1099,7 @@ int mystore(struct db *db,
- newoffset = tp->logend;
- ptr = find_node(db, key, keylen, updateoffsets);
- if (ptr != db->map_base &&
-- !compare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
-+ !bsearch_ncompare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
-
- if (!overwrite) {
- myabort(db, tp); /* releases lock */
-@@ -1282,7 +1265,7 @@ int mydelete(struct db *db,
-
- ptr = find_node(db, key, keylen, updateoffsets);
- if (ptr == db->map_base ||
-- !compare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
-+ !bsearch_ncompare(KEY(ptr), KEYLEN(ptr), key, keylen)) {
- /* gotcha */
- offset = ptr - db->map_base;
-
-@@ -1825,11 +1808,11 @@ static int myconsistent(struct db *db, s
- const char *q = db->map_base + offset;
- int cmp;
-
-- cmp = compare(KEY(ptr), KEYLEN(ptr), KEY(q), KEYLEN(q));
-+ cmp = bsearch_ncompare(KEY(ptr), KEYLEN(ptr), KEY(q), KEYLEN(q));
- if (cmp >= 0) {
- fprintf(stdout,
- "skiplist inconsistent: %04X: ptr %d is %04X; "
-- "compare() = %d\n",
-+ "bsearch_ncompare() = %d\n",
- ptr - db->map_base,
- i,
- offset, cmp);
-@@ -2058,7 +2041,7 @@ static int recovery(struct db *db, int f
- if (TYPE(ptr) == ADD) {
- keyptr = find_node(db, KEY(ptr), KEYLEN(ptr), updateoffsets);
- if (keyptr == db->map_base ||
-- compare(KEY(ptr), KEYLEN(ptr), KEY(keyptr), KEYLEN(keyptr))) {
-+ bsearch_ncompare(KEY(ptr), KEYLEN(ptr), KEY(keyptr), KEYLEN(keyptr))) {
- /* didn't find exactly this node */
- keyptr = NULL;
- }
diff --git a/imapd/imapd.group2.patch b/imapd/imapd.group2.patch
deleted file mode 100644
index 088ae36..0000000
--- a/imapd/imapd.group2.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- ../cyrus-imapd-2.2.6.kolab-orig/lib/auth_unix.c 2004-10-09 00:07:45.000000000 +0200
-+++ lib/auth_unix.c 2004-10-09 00:29:58.000000000 +0200
-@@ -274,7 +274,7 @@ static struct group* fgetgrnam(const cha
- if (!groupfile) groupfile = fopen("/etc/group", "r");
- if (groupfile) {
- while ((grp = fgetgrent(groupfile))) {
-- if (strcmp(grp->gr_name, name) == 0) {
-+ if (strcasecmp(grp->gr_name, name) == 0) {
- fclose(groupfile);
- return grp;
- }
-@@ -386,7 +386,7 @@ struct auth_state *auth_newstate(const c
- if (groupfile) {
- while ((grp = fgetgrent(groupfile))) {
- for (mem = grp->gr_mem; *mem; mem++) {
-- if (!strcmp(*mem, identifier)) break;
-+ if (!strcasecmp(*mem, identifier)) break;
- }
-
- if (*mem || (pwd && pwd->pw_gid == grp->gr_gid)) {
diff --git a/imapd/imapd.morelogging.patch b/imapd/imapd.morelogging.patch
deleted file mode 100644
index 9fa02e9..0000000
--- a/imapd/imapd.morelogging.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-diff -upr cyrus-imapd-2.2.12.orig/imap/append.c cyrus-imapd-2.2.12/imap/append.c
---- cyrus-imapd-2.2.12.orig/imap/append.c 2004-05-22 05:45:48.000000000 +0200
-+++ cyrus-imapd-2.2.12/imap/append.c 2005-09-17 19:45:53.000000000 +0200
-@@ -636,6 +636,9 @@ int append_fromstage(struct appendstate
- /* ok, we've successfully added a message */
- as->quota_used += message_index.size;
-
-+ syslog(LOG_DEBUG, "append_fromstage: message %d added to %s",
-+ message_index.uid, mailbox->name );
-+
- return 0;
- }
-
-Only in cyrus-imapd-2.2.12/imap: append.c~
-diff -upr cyrus-imapd-2.2.12.orig/imap/imapd.c cyrus-imapd-2.2.12/imap/imapd.c
---- cyrus-imapd-2.2.12.orig/imap/imapd.c 2005-02-14 07:39:55.000000000 +0100
-+++ cyrus-imapd-2.2.12/imap/imapd.c 2005-09-17 23:29:45.000000000 +0200
-@@ -3652,6 +3652,8 @@ char *sequence;
- else {
- prot_printf(imapd_out, "%s OK %s\r\n", tag,
- error_message(IMAP_OK_COMPLETED));
-+ syslog(LOG_DEBUG, "cmd_expunge: user %s, mailbox %s, sequence %s",
-+ imapd_userid, imapd_mailbox->name, sequence ? sequence : "''");
- }
- }
-
-Only in cyrus-imapd-2.2.12/imap: imapd.c~
-diff -upr cyrus-imapd-2.2.12.orig/imap/lmtpd.c cyrus-imapd-2.2.12/imap/lmtpd.c
---- cyrus-imapd-2.2.12.orig/imap/lmtpd.c 2004-12-17 17:32:15.000000000 +0100
-+++ cyrus-imapd-2.2.12/imap/lmtpd.c 2005-09-17 19:41:05.000000000 +0200
-@@ -299,7 +299,10 @@ int deliver_mailbox(struct protstream *m
- prot_rewind(msg);
- r = append_fromstage(&as, stage, now,
- (const char **) flag, nflags, !singleinstance);
-- if (!r) append_commit(&as, quotaoverride ? -1 : 0, NULL, &uid, NULL);
-+ if (!r) {
-+ append_commit(&as, quotaoverride ? -1 : 0, NULL, &uid, NULL);
-+ syslog( LOG_INFO, "Delivered: %s to mailbox: %s", id, mailboxname );
-+ }
- else append_abort(&as);
- }
-
-diff -upr cyrus-imapd-2.2.12.orig/imap/lmtpproxyd.c cyrus-imapd-2.2.12/imap/lmtpproxyd.c
---- cyrus-imapd-2.2.12.orig/imap/lmtpproxyd.c 2004-12-17 17:32:16.000000000 +0100
-+++ cyrus-imapd-2.2.12/imap/lmtpproxyd.c 2005-09-17 19:41:05.000000000 +0200
-@@ -471,6 +471,11 @@ static void runme(struct mydata *mydata,
- /* this is the only delivery we're attempting for this rcpt */
- msg_setrcpt_status(msgdata, j, lt->rcpt[i].r);
- mydata->pend[j] = done;
-+
-+ if (lt->rcpt[i].result == RCPT_GOOD) {
-+ syslog (LOG_NOTICE, "Message: %s delivered to: %s@%s",
-+ msgdata->id, d->to, d->server);
-+ }
- break;
- case done:
- case s_done:
-diff -upr cyrus-imapd-2.2.12.orig/imap/lmtp_sieve.c cyrus-imapd-2.2.12/imap/lmtp_sieve.c
---- cyrus-imapd-2.2.12.orig/imap/lmtp_sieve.c 2004-06-01 15:47:16.000000000 +0200
-+++ cyrus-imapd-2.2.12/imap/lmtp_sieve.c 2005-09-17 19:41:05.000000000 +0200
-@@ -339,6 +339,7 @@ static int sieve_redirect(void *ac,
- if (sievedb) duplicate_mark(buf, strlen(buf),
- sievedb, strlen(sievedb), time(NULL), 0);
-
-+ syslog( LOG_INFO, "sieve redirected: %s to: %s", m->id, rc->addr);
- snmp_increment(SIEVE_REDIRECT, 1);
- return SIEVE_OK;
- } else {
-@@ -406,6 +407,7 @@ static int sieve_reject(void *ac,
- origreceip, sd->username,
- rc->msg, md->data)) == 0) {
- snmp_increment(SIEVE_REJECT, 1);
-+ syslog( LOG_INFO, "sieve rejected: %s to: %s", md->id, md->return_path);
- return SIEVE_OK;
- } else {
- if (res == -1) {
-diff -upr cyrus-imapd-2.2.12.orig/imap/mailbox.c cyrus-imapd-2.2.12/imap/mailbox.c
---- cyrus-imapd-2.2.12.orig/imap/mailbox.c 2005-02-14 07:39:57.000000000 +0100
-+++ cyrus-imapd-2.2.12/imap/mailbox.c 2005-09-17 19:41:05.000000000 +0200
-@@ -1911,6 +1911,8 @@ mailbox_expunge(struct mailbox *mailbox,
- /* Delete message files */
- *fnametail++ = '/';
- for (msgno = 0; msgno < numdeleted; msgno++) {
-+ syslog(LOG_DEBUG, "mailbox_expunge: removing mail %s:%d",
-+ mailbox->name, deleted[msgno]);
- if (iscurrentdir) {
- char shortfnamebuf[MAILBOX_FNAME_LEN];
- mailbox_message_get_fname(mailbox, deleted[msgno],
-@@ -1925,6 +1927,11 @@ mailbox_expunge(struct mailbox *mailbox,
- }
- }
-
-+ if (numdeleted > 0) {
-+ syslog (LOG_NOTICE, "Deleted %d messages from %s",
-+ numdeleted, mailbox->name);
-+ }
-+
- free(buf);
- if (deleted) free(deleted);
-
diff --git a/imapd/kolab-ldap.patch b/imapd/kolab-ldap.patch
deleted file mode 100644
index 4f19fed..0000000
--- a/imapd/kolab-ldap.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-diff -urp ../cyrus-imapd-2.2.8.orig/configure ./configure
---- ../cyrus-imapd-2.2.8.orig/configure 2004-07-29 18:22:18.000000000 +0200
-+++ ./configure 2005-01-10 12:56:16.000000000 +0100
-@@ -14422,7 +14422,7 @@ for flag in ${ldflags} ${default_ldflags
- done
-
- IMAP_COM_ERR_LIBS="${COM_ERR_LIBS}"
--IMAP_LIBS="${LIB_SASL} ${LIBS}"
-+IMAP_LIBS="${LIB_SASL} -lldap -llber ${LIBS}"
-
-
-
-diff -urp ../cyrus-imapd-2.2.8.orig/imap/global.c ./imap/global.c
---- ../cyrus-imapd-2.2.8.orig/imap/global.c 2004-05-22 05:45:49.000000000 +0200
-+++ ./imap/global.c 2005-01-10 13:40:19.000000000 +0100
-@@ -52,6 +52,9 @@
- #include <netinet/in.h>
- #include <sys/stat.h>
-
-+#include <ldap.h>
-+#include <lber.h>
-+
- #if HAVE_UNISTD_H
- # include <unistd.h>
- #endif
-@@ -349,6 +352,18 @@ char *canonify_userid(char *user, char *
- char *domain = NULL;
- int len = strlen(user);
- char buf[81];
-+ const char *uri;
-+ const char *base;
-+ const char *binddn;
-+ const char *bindpw;
-+ struct timeval timeout;
-+ char filter[255];
-+ LDAP *handle;
-+ LDAPMessage *res;
-+ LDAPMessage *entry;
-+ char ** vals;
-+
-+ int rc;
-
- /* check for domain */
- if (config_virtdomains &&
-@@ -367,6 +382,47 @@ char *canonify_userid(char *user, char *
- }
-
- if (config_virtdomains) {
-+ if (config_virtdomains == IMAP_ENUM_VIRTDOMAINS_LDAP) {
-+ uri = config_getstring(IMAPOPT_LDAP_URI);
-+ base = config_getstring(IMAPOPT_LDAP_BASE);
-+ binddn = config_getstring(IMAPOPT_LDAP_BIND_DN);
-+ bindpw = config_getstring(IMAPOPT_LDAP_PASSWORD);
-+ timeout.tv_sec = config_getint(IMAPOPT_LDAP_TIME_LIMIT);
-+ timeout.tv_usec = 0;
-+ sprintf(filter, "(uid=%s)", user);
-+ rc = ldap_initialize(&handle, uri);
-+ if (rc != LDAP_SUCCESS) {
-+ syslog(LOG_ERR, "ldap_initialize failed (%s)", uri);
-+ } else {
-+ rc = ldap_simple_bind_s(handle, binddn, bindpw);
-+ if (rc != LDAP_SUCCESS) {
-+ syslog(LOG_ERR, "ldap_simple_bind() failed %d (%s)", rc, ldap_err2string(rc));
-+ } else {
-+ rc = ldap_search_st(handle, base, LDAP_SCOPE_SUBTREE, filter, NULL, 0, &timeout, &res);
-+ if (rc != LDAP_SUCCESS) {
-+ syslog(LOG_ERR, "ldap_search_st failed %d (%s)", rc, ldap_err2string(rc));
-+ } else {
-+ if ( (entry = ldap_first_entry(handle, res)) != NULL ) {
-+ // read mail attribute from entry
-+ if ( (vals = ldap_get_values(handle, entry, "mail")) ) {
-+ if (strchr(vals[0], '@')) {
-+ static char buf[81]; /* same size as in auth_canonifyid */
-+ strncpy( buf, vals[0], sizeof(buf) );
-+ buf[80] = '\0'; /* make sure it's null-terminated */
-+ ldap_value_free( vals );
-+ ldap_msgfree( res );
-+ ldap_unbind_s(handle); /* also frees handle */
-+ return auth_canonifyid( buf, 0) ;
-+ }
-+ ldap_value_free( vals );
-+ }
-+ }
-+ ldap_msgfree( res );
-+ }
-+ }
-+ ldap_unbind_s(handle); /* also frees handle */
-+ }
-+ }
- if (domain) {
- if (config_defdomain && !strcasecmp(config_defdomain, domain+1)) {
- *domain = '\0'; /* trim the default domain */
-@@ -379,7 +435,7 @@ char *canonify_userid(char *user, char *
- user = buf;
- }
- }
-- else if (config_virtdomains != IMAP_ENUM_VIRTDOMAINS_USERID) {
-+ else if (config_virtdomains != IMAP_ENUM_VIRTDOMAINS_USERID && config_virtdomains != IMAP_ENUM_VIRTDOMAINS_LDAP) {
- socklen_t salen;
- int error;
- struct sockaddr_storage localaddr;
-Kun i ./imap: global.c~
-diff -urp ../cyrus-imapd-2.2.8.orig/lib/imapoptions ./lib/imapoptions
---- ../cyrus-imapd-2.2.8.orig/lib/imapoptions 2004-07-21 21:07:45.000000000 +0200
-+++ ./lib/imapoptions 2005-01-10 12:56:16.000000000 +0100
-@@ -839,7 +839,7 @@ are listed with ``<none>''.
- mailbox hierarchy. The default is to use the netnews separator
- character '.'. */
-
--{ "virtdomains", "off", ENUM("off", "userid", "on") }
-+{ "virtdomains", "off", ENUM("off", "userid", "ldap", "on") }
- /* Enable virtual domain support. If enabled, the user's domain will
- be determined by splitting a fully qualified userid at the last '@'
- or '%' symbol. If the userid is unqualified, and the virtdomains
-diff -urp ../cyrus-imapd-2.2.8.orig/lib/imapopts.c ./lib/imapopts.c
---- ../cyrus-imapd-2.2.8.orig/lib/imapopts.c 2004-07-29 18:22:18.000000000 +0200
-+++ ./lib/imapopts.c 2005-01-10 12:56:16.000000000 +0100
-@@ -186,7 +186,7 @@ struct imapopt_s imapopts[] =
- { IMAPOPT_USERPREFIX, "userprefix", 0, {(void *)("Other Users")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
- { IMAPOPT_UNIX_GROUP_ENABLE, "unix_group_enable", 0, {(void*)1}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
- { IMAPOPT_UNIXHIERARCHYSEP, "unixhierarchysep", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
-- { IMAPOPT_VIRTDOMAINS, "virtdomains", 0, {(void *)(IMAP_ENUM_VIRTDOMAINS_OFF)}, OPT_ENUM, { { "off" , IMAP_ENUM_VIRTDOMAINS_OFF }, { "userid" , IMAP_ENUM_VIRTDOMAINS_USERID }, { "on" , IMAP_ENUM_VIRTDOMAINS_ON }, { NULL, IMAP_ENUM_ZERO } } },
-+ { IMAPOPT_VIRTDOMAINS, "virtdomains", 0, {(void *)(IMAP_ENUM_VIRTDOMAINS_OFF)}, OPT_ENUM, { { "off" , IMAP_ENUM_VIRTDOMAINS_OFF }, { "userid" , IMAP_ENUM_VIRTDOMAINS_USERID }, { "ldap" , IMAP_ENUM_VIRTDOMAINS_LDAP }, { "on" , IMAP_ENUM_VIRTDOMAINS_ON }, { NULL, IMAP_ENUM_ZERO } } },
-
- { IMAPOPT_LAST, NULL, 0, { NULL }, OPT_NOTOPT, { { NULL, IMAP_ENUM_ZERO } } }
-
-diff -urp ../cyrus-imapd-2.2.8.orig/lib/imapopts.h ./lib/imapopts.h
---- ../cyrus-imapd-2.2.8.orig/lib/imapopts.h 2004-07-29 18:22:18.000000000 +0200
-+++ ./lib/imapopts.h 2005-01-10 12:56:16.000000000 +0100
-@@ -188,6 +188,7 @@ enum enum_value {
-
- IMAP_ENUM_VIRTDOMAINS_ON,
- IMAP_ENUM_VIRTDOMAINS_USERID,
-+ IMAP_ENUM_VIRTDOMAINS_LDAP,
- IMAP_ENUM_VIRTDOMAINS_OFF = 0
-
- };
diff --git a/imapd/kolab.patch b/imapd/kolab.patch
deleted file mode 100644
index c72f1c3..0000000
--- a/imapd/kolab.patch
+++ /dev/null
@@ -1,110 +0,0 @@
---- imapd.spec.orig 2006-11-03 16:49:36.210673013 +0100
-+++ imapd.spec 2006-11-03 16:50:56.703458223 +0100
-@@ -2,6 +2,9 @@
- ## imapd.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2005 OpenPKG Foundation e.V. <http://openpkg.net/>
- ## Copyright (c) 2000-2005 Ralf S. Engelschall <http://engelschall.com/>
-+## Copyright (c) 2004 Tassilo Erlewein <tassilo.erlewein@erfrakon.de>
-+## Copyright (c) 2004 Martin Konold <martin.konold@erfrakon.de>
-+## Copyright (c) 2005 Steffen Hansen <steffen@klaralvdalens-datakonsult.se>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
-@@ -33,13 +36,18 @@
- Group: Mail
- License: BSD
- Version: 2.2.12
--Release: 2.5.0
-+Release: 2.5.0_kolab2
-
- # package options
--%option with_fsl yes
--%option with_group no
--%option with_atvdom no
--%option with_drac no
-+%option with_fsl yes
-+%option with_group no
-+%option with_atvdom no
-+%option with_drac no
-+%option with_annotate no
-+%option with_ldap no
-+%option with_goodchars no
-+%option with_morelogging no
-+%option with_folderchar no
-
- # list of sources
- Source0: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-imapd-%{version}.tar.gz
-@@ -49,6 +57,13 @@
- Source4: fsl.imapd
- Patch0: imapd.patch
- Patch1: imapd.patch.group
-+Patch2: imapd.annotate.patch
-+Patch3: kolab-ldap.patch
-+Patch4: imapd.group2.patch
-+Patch5: imapd-goodchars.patch
-+Patch6: cyradm.annotate.patch
-+Patch7: imapd.morelogging.patch
-+Patch8: imapd.folderchar.patch
-
- # build information
- Prefix: %{l_prefix}
-@@ -61,6 +76,10 @@
- BuildPreReq: fsl >= 1.2.0
- PreReq: fsl >= 1.2.0
- %endif
-+%if "%{with_ldap}" == "yes"
-+BuildPreReq: openldap >= 2.2.14
-+PreReq: openldap >= 2.2.14
-+%endif
- AutoReq: no
- AutoReqProv: no
-
-@@ -91,6 +110,7 @@
- %{l_shtool} subst \
- -e 's;/etc/imapd\.group;%{l_prefix}/etc/imapd/imapd.group;' \
- lib/auth_unix.c
-+ %patch -p0 -P 4
- %endif
- %if "%{with_drac}" == "yes"
- %{l_shtool} subst -e 's;@DRACLIBS@;-ldrac;g' contrib/drac_auth.patch
-@@ -98,10 +118,27 @@
- sleep 1
- touch configure
- %endif
-+%if "%{with_annotate}" == "yes"
-+ %patch -p0 -P 2
-+%endif
-+%if "%{with_ldap}" == "yes"
-+ %patch -p0 -P 3
-+%endif
-+%if "%{with_goodchars}" == "yes"
-+ %patch -p1 -P 5
-+%endif
-+ %patch -p0 -P 6
-+%if "%{with_morelogging}" == "yes"
-+ %patch -p1 -P 7
-+%endif
-+%if "%{with_folderchar}" == "yes"
-+ %patch -p0 -P 8
-+%endif
- %{l_shtool} subst \
- -e 's;-L/usr/local/lib;;g' \
- -e 's;-I/usr/local/include;;g' \
-- -e 's;db-4.1;db;g' \
-+ -e 's;db-4.4;db;g' \
-+ -e 's;-l\$dbname;%{l_prefix}/lib/lib$dbname.a;g' \
- configure
-
- # ensure local et/com_err can be found
-@@ -162,6 +199,11 @@
- -e '/alt_config/s;"deliver";"cyrdeliver";' \
- imap/deliver.c
-
-+ %{l_shtool} subst \
-+ -e '/snprintf(buf, sizeof(buf), "%s/s;/reconstruct";/cyrreconstruct";' \
-+ -e '/snprintf(buf, sizeof(buf), "%s/s;/quota";/cyrquota";' \
-+ imap/imapd.c
-+
- %build
- cflags="%{l_cppflags}"
- %if "%{with_atvdom}" == "yes"