Hello community,
here is the log from the commit of package cyrus-imapd for openSUSE:Factory
checked in at Fri Mar 5 16:19:33 CET 2010.
--------
--- cyrus-imapd/cyrus-imapd.changes 2009-11-03 20:16:55.000000000 +0100
+++ /mounts/work_src_done/STABLE/cyrus-imapd/cyrus-imapd.changes 2010-02-23 15:04:28.000000000 +0100
@@ -1,0 +2,70 @@
+Tue Feb 23 14:02:19 UTC 2010 - rhafer@novell.com
+
+- Fixed crasher in lmtpproxy when backend server returns an empty
+ SASL mechlist (bnc#551346)
+
+-------------------------------------------------------------------
+Mon Jan 25 14:23:25 UTC 2010 - rhafer@novell.com
+
+- updated autocreate patch to avoid "no-return-in-nonvoid-function"
+ failures on openSUSE 11.1
+
+-------------------------------------------------------------------
+Wed Jan 13 11:00:15 UTC 2010 - rhafer@novell.com
+
+- Updated to 2.3.16
+ * Added user_deny.db to be able to selectively deny users access
+ to Cyrus services.
+ * Added disconnect_on_vanished_mailbox option. See imapd.conf(5)
+ for details
+ * Reworked SQL detection code in configure. See
+ install-upgrade.html for more details.
+ * Added popuseimapflags option which enables setting and obeying
+ IMAP flags in the POP server.
+ * Added optimized method of handling an empty maildrop in pop3d.
+ Requires statuscache to be enabled.
+ * Added annotation_definitions option for specifying external
+ (third-party) annotations.
+ * Added sync_compress option to compress replication traffic
+ * Added user_folder_limit option to limit the number of folders a
+ non-admin user is allowed to create.
+ * Added -x option to cyr_expire to disable expunge
+ * Track idle state so a shutdown doesn't leave idled killing
+ random other processes on a busy system
+ * Fix missing closedir() - bug #3159
+ * Make Cyrus compile with older GCC
+
+-------------------------------------------------------------------
+Tue Dec 1 21:30:16 UTC 2009 - rbos@opensuse.org
+
+- Changed capitalization of perl-Cyrus-Imap into perl-Cyrus-IMAP
+ as it used to be. It changed in 1 of the previous updates, due
+ to a typo.
+
+-------------------------------------------------------------------
+Mon Nov 30 08:11:12 UTC 2009 - rbos@opensuse.org
+
+- Subpackages are now also renamed when cyrus is build with kolab
+ support
+- Renamed _enable_kolab to with_kolab. What seem to be more in line
+ with the rpm conventions. There are macros like %%{with } and
+ %%{bcond_with }, but unfortenately they did not work for me.
+
+-------------------------------------------------------------------
+Wed Nov 25 10:18:35 UTC 2009 - rhafer@novell.com
+
+- Renumber kolab patches to start with 100
+- cyrus-imapd-kolab now conflicts with cyrus-imapd
+
+-------------------------------------------------------------------
+
+Sat Nov 21 20:46:22 CEST 2009 - rbos@opensuse.org
+
+- Added a switch to build Kolab enabled rpms, (cyrus with patches
+ needed by the groupware project Kolab)
+- Added cyrus-imapd-2.3.14 patches for KOLAB
+- Updated patch ptclient_afskrb_return.patch to return NULL instead
+ of 0
+
+-------------------------------------------------------------------
+
calling whatdependson for head-i586
Old:
----
cyrus-imapd-2.3.13-autocreate-0.10-0.diff
cyrus-imapd-2.3.14.tar.bz2
sieve_action-overflow.dif
sieve_relat-overflow.dif
New:
----
KOLAB_cyrus-imapd-2.3.16_Annotations2.patch
KOLAB_cyrus-imapd-2.3.16_Cyradm_Annotations.patch
KOLAB_cyrus-imapd-2.3.16_Folder-names.patch
KOLAB_cyrus-imapd-2.3.16_Groups2.patch
KOLAB_cyrus-imapd-2.3.16_Logging.patch
KOLAB_cyrus-imapd-2.3.16_UID.patch
KOLAB_cyrus-imapd-2.3.16_timsieved_starttls-sendcaps.patch
cyrus-imapd-2.3.16-autocreate-0.10-0.drac.diff
cyrus-imapd-2.3.16.tar.bz2
murder-backend-empty-mechlist.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cyrus-imapd.spec ++++++
--- /var/tmp/diff_new_pack.ufHd1n/_old 2010-03-05 16:19:23.000000000 +0100
+++ /var/tmp/diff_new_pack.ufHd1n/_new 2010-03-05 16:19:23.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package cyrus-imapd (Version 2.3.14)
+# spec file for package cyrus-imapd (Version 2.3.16)
#
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,55 +17,110 @@
# norootforbuild
+%define prjname cyrus-imapd
+
+%if ! %{defined with_kolab}
+%define with_kolab 0
+%endif
+
+%if %{with_kolab}
+%define pkg_perl_Cyrus_IMAP perl-Cyrus-IMAP-kolab
+%define pkg_perl_Cyrus_SIEVE_managesieve perl-Cyrus-SIEVE-managesieve-kolab
+
+Name: cyrus-imapd
+BuildRequires: openldap2-devel
+%else
+%define pkg_perl_Cyrus_IMAP perl-Cyrus-IMAP
+%define pkg_perl_Cyrus_SIEVE_managesieve perl-Cyrus-SIEVE-managesieve
Name: cyrus-imapd
+%endif
+
BuildRequires: bison cyrus-sasl-devel db-devel drac ed flex krb5-devel openslp-devel openssl-devel opie pwdutils tcpd-devel
Url: http://cyrusimap.web.cmu.edu/
-License: BSD 3-clause (or similar)
+License: BSD3c(or similar)
Group: Productivity/Networking/Email/Servers
-Requires: perl-Cyrus-IMAP perl-Cyrus-SIEVE-managesieve
+Requires: %pkg_perl_Cyrus_IMAP %pkg_perl_Cyrus_SIEVE_managesieve
Recommends: perl-TermReadLine-Gnu
Conflicts: imap courier-imap
+%if %{with_kolab}
+Conflicts: cyrus-imapd
+%else
+Conflicts: cyrus-imapd-kolab
+%endif
AutoReqProv: on
Summary: The Cyrus IMAP and POP Mail Server
-Version: 2.3.14
-Release: 8
-Source: %{name}-%{version}.tar.bz2
+Version: 2.3.16
+Release: 1
+Source: %{prjname}-%{version}.tar.bz2
Source1: cyrus-imapd-rc.tar.gz
# The autocreate Patchset is maintained at:
# http://email.uoa.gr/projects/cyrus/autocreate/
-Patch1: cyrus-imapd-2.3.13-autocreate-0.10-0.diff
+Patch1: cyrus-imapd-2.3.16-autocreate-0.10-0.drac.diff
Patch2: authid_normalize.patch
Patch3: auth_krb5-sentinel.patch
Patch4: luser_relay.patch
Patch5: cyrus-imapd-perl.patch
+Patch6: murder-backend-empty-mechlist.patch
Patch8: tail-1-fix.patch
Patch10: cyrus-imapd-openslp.patch
Patch12: pie.patch
Patch18: cyrus-imapd-perl-path.patch
-Patch19: sieve_action-overflow.dif
-Patch20: sieve_relat-overflow.dif
+
+%if %{with_kolab}
+# KOLAB_cyrus-imapd patches are maintained at
+# http://kolab.org/cgi-bin/viewcvs-kolab.cgi/server/imapd/patches/
+Patch100: KOLAB_cyrus-imapd-%{version}_Cyradm_Annotations.patch
+Patch101: KOLAB_cyrus-imapd-%{version}_Annotations2.patch
+Patch102: KOLAB_cyrus-imapd-%{version}_Folder-names.patch
+Patch103: KOLAB_cyrus-imapd-%{version}_Groups2.patch
+Patch104: KOLAB_cyrus-imapd-%{version}_Logging.patch
+Patch105: KOLAB_cyrus-imapd-%{version}_timsieved_starttls-sendcaps.patch
+Patch106: KOLAB_cyrus-imapd-%{version}_UID.patch
+%endif
+
PreReq: /usr/sbin/useradd /usr/sbin/usermod %insserv_prereq %fillup_prereq /bin/sed /bin/awk /bin/grep /bin/cat /usr/bin/find /usr/bin/db_verify sh-utils fileutils cyrus-sasl netcfg /usr/bin/strings
Recommends: cron
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%package -n perl-Cyrus-IMAP
-License: BSD 3-clause (or similar)
+%package -n %pkg_perl_Cyrus_IMAP
+
+
+%if %{with_kolab}
+Conflicts: perl-Cyrus-IMAP
+%else
+Conflicts: perl-Cyrus-IMAP-kolab
+%endif
+License: BSD3c(or similar)
Summary: Cyrus IMAP Perl Module
Requires: perl = %{perl_version}
AutoReqProv: on
Group: Development/Libraries/Perl
-%package -n perl-Cyrus-SIEVE-managesieve
-License: BSD 3-clause (or similar)
+%package -n %pkg_perl_Cyrus_SIEVE_managesieve
+
+
+%if %{with_kolab}
+Conflicts: perl-Cyrus-SIEVE-managesieve
+%else
+Conflicts: perl-Cyrus-SIEVE-managesieve-kolab
+%endif
+License: BSD3c(or similar)
Summary: A Perl Module for Cyrus SIEVE
Requires: perl = %{perl_version}
Recommends: perl-TermReadLine-Gnu
AutoReqProv: on
Group: Development/Libraries/Perl
-%package -n cyrus-imapd-devel
-License: BSD 3-clause (or similar)
+%package -n %{name}-devel
+
+
+%if %{with_kolab}
+Conflicts: cyrus-imapd
+%else
+Conflicts: cyrus-imapd-kolab
+%endif
+License: BSD3c(or similar)
Summary: Libraries and Includes for Cyrus IMAPd
AutoReqProv: on
Group: Development/Libraries/C and C++
@@ -82,7 +137,7 @@
--------
Office of Technology Transfer Carnegie Mellon University
-%description -n perl-Cyrus-IMAP
+%description -n %pkg_perl_Cyrus_IMAP
A Cyrus IMAP Perl module for the Cyrus IMAPD.
@@ -91,7 +146,7 @@
--------
Office of Technology Transfer Carnegie Mellon University
-%description -n perl-Cyrus-SIEVE-managesieve
+%description -n %pkg_perl_Cyrus_SIEVE_managesieve
A Perl module for Cyrus SIEVE.
@@ -100,7 +155,7 @@
--------
Office of Technology Transfer Carnegie Mellon University
-%description -n cyrus-imapd-devel
+%description -n %{name}-devel
This package provides the libraries and include files for Cyrus IMAPd.
@@ -112,19 +167,28 @@
%define cyrus_uid 96
%prep
-%setup -q -a 1
+%setup -q -a 1 -n %{prjname}-%{version}
patch -s -p0 < contrib/drac_auth.patch
%patch1 -p1
-%patch2
+%patch2 -p1
%patch3 -p1
-%patch4
+%patch4 -p1
%patch5
+%patch6 -p1
%patch8
%patch10
%patch12 -p1
%patch18
-%patch19
-%patch20 -p1
+
+%if %{with_kolab}
+%patch100 -p1
+%patch101 -p1
+%patch102 -p1
+%patch103 -p1
+%patch104 -p1
+%patch105 -p1
+%patch106 -p1
+%endif
%build
#%{?suse_update_config:%{suse_update_config -l -f build}}
@@ -133,6 +197,15 @@
#autoreconf --force --install
rm -fr aclocal.m4 configure config.h.in autom4te.cache
sh SMakefile
+
+%if %{with_kolab}
+ # CONFIGURE_ARGS="--with-ldap=%{_includedir}"
+ # For unknow reason the configure argument --with-ldap=%{_includedir} is not
+ # picked up by configure, use the line below as a workaround until the
+ # configure --with-ldap actually works
+ sed -i 's;\(IMAP_LIBS="${LIB_SASL}\) \(.*"\);\1 -lldap -llber \2;g' configure
+%endif
+
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -I/usr/include/kerberosIV -I%{_libdir}/sasl2/include"
./configure --prefix=/usr \
--mandir=%{_mandir} \
@@ -156,7 +229,7 @@
--with-openssl \
--with-perl=/usr/bin/perl \
--with-syslogfacility=DAEMON \
- --without-ucdsnmp
+ --without-ucdsnmp $CONFIGURE_ARGS
make depend
make
@@ -198,14 +271,14 @@
#*****************************************************************************
cd perl/imap
make DESTDIR=$RPM_BUILD_ROOT install_vendor
-%perl_process_packlist -n perl-Cyrus-IMAP
+%perl_process_packlist -n %pkg_perl_Cyrus_IMAP
cd -
#*****************************************************************************
# Cyrus SIEVE managesieve
#*****************************************************************************
cd perl/sieve/managesieve
make DESTDIR=$RPM_BUILD_ROOT install_vendor
-%perl_process_packlist -n perl-Cyrus-SIEVE-managesieve
+%perl_process_packlist -n %pkg_perl_Cyrus_SIEVE_managesieve
cd -
#*****************************************************************************
install -m 644 SuSE/imapd.conf $RPM_BUILD_ROOT/etc/imapd.conf
@@ -330,23 +403,23 @@
%doc COPYRIGHT README README.andrew doc
%doc SuSE/README.SuSE
-%files -n cyrus-imapd-devel
+%files -n %{name}-devel
%defattr(-,root,root)
/usr/include/cyrus
%{_libdir}/libcyrus.a
%{_libdir}/libcyrus_min.a
-%files -n perl-Cyrus-IMAP
+%files -n %pkg_perl_Cyrus_IMAP
%defattr(-,root,root)
%dir %{perl_vendorarch}/Cyrus
%{perl_vendorarch}/Cyrus/IMAP
%{perl_vendorarch}/Cyrus/IMAP.pm
%dir %{perl_vendorarch}/auto/Cyrus
%{perl_vendorarch}/auto/Cyrus/IMAP
-/var/adm/perl-modules/perl-Cyrus-IMAP
+/var/adm/perl-modules/%pkg_perl_Cyrus_IMAP
%doc %{_mandir}/man3/Cyrus::IMAP*
-%files -n perl-Cyrus-SIEVE-managesieve
+%files -n %pkg_perl_Cyrus_SIEVE_managesieve
%defattr(-,root,root)
/usr/bin/installsieve
/usr/bin/sieveshell
@@ -358,7 +431,7 @@
%dir %{perl_vendorarch}/auto/Cyrus
%dir %{perl_vendorarch}/auto/Cyrus/SIEVE
%{perl_vendorarch}/auto/Cyrus/SIEVE/managesieve
-/var/adm/perl-modules/perl-Cyrus-SIEVE-managesieve
+/var/adm/perl-modules/%pkg_perl_Cyrus_SIEVE_managesieve
%doc %{_mandir}/man3/Cyrus::SIEVE::managesieve.3pm.gz
%changelog
++++++ KOLAB_cyrus-imapd-2.3.16_Annotations2.patch ++++++
Provides a new version of annotation support for the cyrus imapd server [Version: 2.3.9]
diff -r 321cda1d6136 imap/annotate.c
--- a/imap/annotate.c Tue Apr 22 10:44:56 2008 +0200
+++ b/imap/annotate.c Tue Apr 22 10:47:04 2008 +0200
@@ -90,6 +90,8 @@ int (*proxy_fetch_func)(const char *serv
struct strlist *attribute_pat) = NULL;
int (*proxy_store_func)(const char *server, const char *mbox_pat,
struct entryattlist *entryatts) = NULL;
+
+void init_annotation_definitions();
/* String List Management */
/*
@@ -237,6 +239,8 @@ void annotatemore_init(int myflags,
if (store_func) {
proxy_store_func = store_func;
}
+
+ init_annotation_definitions();
}
void annotatemore_open(char *fname)
@@ -1832,6 +1836,224 @@ const struct annotate_st_entry mailbox_r
{ NULL, 0, ANNOTATION_PROXY_T_INVALID, 0, 0, NULL, NULL }
};
+struct annotate_st_entry_list *server_entries_list = NULL;
+struct annotate_st_entry_list *mailbox_rw_entries_list = NULL;
+
+enum {
+ ANNOTATION_SCOPE_SERVER = 1,
+ ANNOTATION_SCOPE_MAILBOX = 2
+};
+
+const struct annotate_attrib annotation_scope_names[] =
+{
+ { "server", ANNOTATION_SCOPE_SERVER },
+ { "mailbox", ANNOTATION_SCOPE_MAILBOX },
+ { NULL, 0 }
+};
+
+const struct annotate_attrib annotation_proxy_type_names[] =
+{
+ { "proxy", PROXY_ONLY },
+ { "backend", BACKEND_ONLY },
+ { "proxy_and_backend", PROXY_AND_BACKEND },
+ { NULL, 0 }
+};
+
+const struct annotate_attrib attribute_type_names[] =
+{
+ { "content-type", ATTRIB_TYPE_CONTENTTYPE },
+ { "string", ATTRIB_TYPE_STRING },
+ { "boolean", ATTRIB_TYPE_BOOLEAN },
+ { "uint", ATTRIB_TYPE_UINT },
+ { "int", ATTRIB_TYPE_INT },
+ { NULL, 0 }
+};
+
+#define ANNOT_DEF_MAXLINELEN 1024
+
+int table_lookup(const struct annotate_attrib *table,
+ char* name,
+ size_t namelen,
+ char* errmsg)
+/* search in table for the value given by name and namelen (name is null-terminated,
+ but possibly more than just the key). errmsg is used to hint the user where we failed */
+{
+ char errbuf[ANNOT_DEF_MAXLINELEN*2];
+ int entry;
+
+ for (entry = 0; table[entry].name &&
+ (strncasecmp(table[entry].name, name, namelen)
+ || table[entry].name[namelen] != '\0'); entry++);
+
+ if (! table[entry].name) {
+ sprintf(errbuf, "invalid %s at '%s'", errmsg, name);
+ fatal(errbuf, EC_CONFIG);
+ }
+ return table[entry].entry;
+}
+
+char *consume_comma(char* p)
+ /* advance beyond the next ',', skipping whitespace, fail if next non-space is no comma */
+{
+ char errbuf[ANNOT_DEF_MAXLINELEN*2];
+
+ for (; *p && isspace(*p); p++);
+ if (*p != ',') {
+ sprintf(errbuf, "',' expected, '%s' found parsing annotation definition",
+ p);
+ fatal(errbuf, EC_CONFIG);
+ }
+ p++;
+ for (; *p && isspace(*p); p++);
+
+ return p;
+}
+
+int parse_table_lookup_bitmask(const struct annotate_attrib *table,
+ char** s,
+ char* errmsg)
+ /* parses strings of the form value1 [ value2 [ ... ]]
+ value1 is mapped via table to ints and the result ored
+ whitespace is allowed between value names and punctuation
+ the field must end in '\0' or ','
+ s is advanced to '\0' or ','
+ on error errmsg is used to identify item to be parsed
+ */
+{
+ char errbuf[ANNOT_DEF_MAXLINELEN*2];
+ int result = 0;
+ char *p, *p2;
+
+ p = *s;
+ do {
+ p2 = p;
+ for (; *p && (isalnum(*p) || *p=='.' || *p=='-' || *p=='_' || *p=='/');p++);
+ result |= table_lookup(table, p2, p-p2, errmsg);
+ for (; *p && isspace(*p); p++);
+ } while (*p && *p != ',');
+
+ *s = p;
+ return result;
+}
+
+void init_annotation_definitions()
+{
+ char *p, *p2, *tmp;
+ const char *filename;
+ char aline[ANNOT_DEF_MAXLINELEN];
+ char errbuf[ANNOT_DEF_MAXLINELEN*2];
+ struct annotate_st_entry_list *se, *me;
+ struct annotate_st_entry *ae;
+ int i;
+ FILE* f;
+
+ /* NOTE: we assume # static entries > 0 */
+ server_entries_list = xmalloc(sizeof(struct annotate_st_entry_list));
+ mailbox_rw_entries_list = xmalloc(sizeof(struct annotate_st_entry_list));
+ se = server_entries_list;
+ me = mailbox_rw_entries_list;
+ /* copy static entries into list */
+ for (i = 0; server_entries[i].name;i++) {
+ se->entry = &server_entries[i];
+ if (server_entries[i+1].name) {
+ se->next = xmalloc(sizeof(struct annotate_st_entry_list));
+ se = se->next;
+ }
+ }
+ /* copy static entries into list */
+ for (i = 0; mailbox_rw_entries[i].name;i++) {
+ me->entry = &mailbox_rw_entries[i];
+ if (mailbox_rw_entries[i+1].name) {
+ me->next = xmalloc(sizeof(struct annotate_st_entry_list));
+ me = me->next;
+ }
+ }
+
+ /* parse config file */
+ filename = config_getstring(IMAPOPT_ANNOTATION_DEFINITIONS);
+
+ if (! filename) {
+ se->next = NULL;
+ me->next = NULL;
+ return;
+ }
+
+ f = fopen(filename,"r");
+ if (! f) {
+ sprintf(errbuf, "could not open annotation definiton %s", filename);
+ fatal(errbuf, EC_CONFIG);
+ }
+
+ while (fgets(aline, sizeof(aline), f)) {
+ // remove leading space, skip blank lines and comments
+ for (p = aline; *p && isspace(*p); p++);
+ if (!*p || *p == '#') continue;
+
+ // note, we only do the most basic validity checking and may
+ // be more restrictive than neccessary
+
+ ae = xmalloc(sizeof(struct annotate_st_entry));
+
+ p2 = p;
+ for (; *p && (isalnum(*p) || *p=='.' || *p=='-' || *p=='_' || *p=='/');p++);
+ // TV-TODO: should test for empty
+ ae->name = xstrndup(p2, p-p2);
+
+ p = consume_comma(p);
+
+ p2 = p;
+ for (; *p && (isalnum(*p) || *p=='.' || *p=='-' || *p=='_' || *p=='/');p++);
+
+ if (table_lookup(annotation_scope_names, p2, p-p2,
+ "annotation scope")==ANNOTATION_SCOPE_SERVER) {
+ se->next = xmalloc(sizeof(struct annotate_st_entry_list));
+ se = se->next;
+ se->entry = ae;
+ }
+ else {
+ me->next = xmalloc(sizeof(struct annotate_st_entry_list));
+ me = me->next;
+ me->entry = ae;
+ }
+
+ p = consume_comma(p);
+ p2 = p;
+ for (; *p && (isalnum(*p) || *p=='.' || *p=='-' || *p=='_' || *p=='/');p++);
+ ae->type = table_lookup(attribute_type_names, p2, p-p2,
+ "attribute type");
+
+ p = consume_comma(p);
+ ae->proxytype = parse_table_lookup_bitmask(annotation_proxy_type_names,
+ &p,
+ "annotation proxy type");
+
+ p = consume_comma(p);
+ ae->attribs = parse_table_lookup_bitmask(annotation_attributes,
+ &p,
+ "annotation attributes");
+
+ p = consume_comma(p);
+ p2 = p;
+ for (; *p && (isalnum(*p) || *p=='.' || *p=='-' || *p=='_' || *p=='/');p++);
+ tmp = xstrndup(p2, p-p2);
+ ae->acl = cyrus_acl_strtomask(tmp);
+ free(tmp);
+
+ for (; *p && isspace(*p); p++);
+ if (*p) {
+ sprintf(errbuf, "junk at end of line: '%s'", p);
+ fatal(errbuf, EC_CONFIG);
+ }
+
+ ae->set = annotation_set_todb;
+ ae->rock = NULL;
+ }
+
+ fclose(f);
+ se->next = NULL;
+ me->next = NULL;
+}
+
int annotatemore_store(char *mailbox,
struct entryattlist *l,
struct namespace *namespace,
@@ -1843,7 +2065,7 @@ int annotatemore_store(char *mailbox,
struct entryattlist *e = l;
struct attvaluelist *av;
struct storedata sdata;
- const struct annotate_st_entry *entries;
+ const struct annotate_st_entry_list *entries, *currententry;
time_t now = time(0);
memset(&sdata, 0, sizeof(struct storedata));
@@ -1854,45 +2076,45 @@ int annotatemore_store(char *mailbox,
if (!mailbox[0]) {
/* server annotations */
- entries = server_entries;
+ entries = server_entries_list;
}
else {
/* mailbox annotation(s) */
- entries = mailbox_rw_entries;
+ entries = mailbox_rw_entries_list;
}
/* Build a list of callbacks for storing the annotations */
while (e) {
- int entrycount, attribs;
+ int attribs;
struct annotate_st_entry_list *nentry = NULL;
/* See if we support this entry */
- for (entrycount = 0;
- entries[entrycount].name;
- entrycount++) {
- if (!strcmp(e->entry, entries[entrycount].name)) {
+ for (currententry = entries;
+ currententry;
+ currententry = currententry->next) {
+ if (!strcmp(e->entry, currententry->entry->name)) {
break;
}
}
- if (!entries[entrycount].name) {
+ if (!currententry) {
/* 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_ONLY)
+ if ((currententry->entry->proxytype != PROXY_ONLY)
|| proxy_store_func) {
nentry = xzmalloc(sizeof(struct annotate_st_entry_list));
nentry->next = sdata.entry_list;
- nentry->entry = &(entries[entrycount]);
+ nentry->entry = currententry->entry;
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 = currententry->entry->attribs;
av = e->attvalues;
while (av) {
const char *value;
@@ -1902,7 +2124,7 @@ int annotatemore_store(char *mailbox,
goto cleanup;
}
value = annotate_canon_value(av->value,
- entries[entrycount].type);
+ currententry->entry->type);
if (!value) {
r = IMAP_ANNOTATION_BADVALUE;
goto cleanup;
@@ -1928,7 +2150,7 @@ int annotatemore_store(char *mailbox,
goto cleanup;
}
value = annotate_canon_value(av->value,
- entries[entrycount].type);
+ currententry->entry->type);
if (!value) {
r = IMAP_ANNOTATION_BADVALUE;
goto cleanup;
@@ -2110,3 +2332,10 @@ int annotatemore_delete(const char *mbox
return annotatemore_rename(mboxname, NULL, NULL, NULL);
}
+
+/* This file contains code Copyright (c) 2006 by Thomas Viehmann.
+ * You may distribute source code or binaries under the conditions
+ * conditions given in the CMU license, provided this note stays intact
+ * in the distributed source. If you want to distribute my code without
+ * this notice, do contact me at .
+ */
diff -r 321cda1d6136 lib/imapoptions
--- a/lib/imapoptions Tue Apr 22 10:44:56 2008 +0200
+++ b/lib/imapoptions Tue Apr 22 10:47:04 2008 +0200
@@ -172,6 +172,9 @@ are listed with ``<none>''.
/* Should non-admin users be allowed to set ACLs for the 'anyone'
user on their mailboxes? In a large organization this can cause
support problems, but it's enabled by default. */
+
+{ "annotation_definitions", NULL, STRING }
+/* File containing annotation definitions. */
{ "auth_mech", "unix", STRINGLIST("unix", "pts", "krb", "krb5")}
/* The authorization mechanism to use. */
++++++ KOLAB_cyrus-imapd-2.3.16_Cyradm_Annotations.patch ++++++
Allows to use arbitrary annotations with the cyradm tool.
diff -r 639190be2385 doc/man/cyradm.1.html
--- a/doc/man/cyradm.1.html Mon Oct 27 18:48:18 2008 +0100
+++ b/doc/man/cyradm.1.html Mon Oct 27 18:48:25 2008 +0100
@@ -245,6 +245,13 @@
<dd>
<p>Sets an email address to which messages injected into the server via NNTP
will be sent.</p>
+</dd>
+</li>
+<dt><strong><a NAME="item__2fexplicit_2fannotation"><code>/explicit/annotation</code></a></strong>
+
+<dd>
+<p>Sets the annotation <em>/explicit/annotation</em>
+on <em>mailbox</em> to <em>value</em>.</p>
</dd>
</li>
<dt><strong><a name="sharedseen" class="item"><code>sharedseen</code></a></strong>
diff -r 639190be2385 perl/imap/IMAP/Admin.pm
--- a/perl/imap/IMAP/Admin.pm Mon Oct 27 18:48:18 2008 +0100
+++ b/perl/imap/IMAP/Admin.pm Mon Oct 27 18:48:26 2008 +0100
@@ -797,11 +797,11 @@
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);
diff -r 639190be2385 perl/imap/IMAP/Shell.pm
--- a/perl/imap/IMAP/Shell.pm Mon Oct 27 18:48:18 2008 +0100
+++ b/perl/imap/IMAP/Shell.pm Mon Oct 27 18:48:26 2008 +0100
@@ -127,7 +127,7 @@
[\&_sc_info, '[mailbox]',
'display mailbox/server metadata'],
mboxcfg =>
- [\&_sc_mboxcfg, 'mailbox [comment|condstore|expire|news2mail|sharedseen|sieve|squat] value',
+ [\&_sc_mboxcfg, 'mailbox [comment|condstore|news2mail|expire|sieve|squat|/<explicit annotation>] value',
'configure mailbox'],
mboxconfig => 'mboxcfg',
reconstruct =>
@@ -1437,7 +1437,7 @@
while (defined ($opt = shift(@argv))) {
last if $opt eq '--';
if ($opt =~ /^-/) {
- die "usage: mboxconfig mailbox [comment|condstore|expire|news2mail|sharedseen|sieve|squat] value\n";
+ die "usage: mboxconfig mailbox [comment|condstore|expire|news2mail|sharedseen|sieve|squat|/<explicit annotation>] value\n";
}
else {
push(@nargv, $opt);
@@ -1446,7 +1446,7 @@
}
push(@nargv, @argv);
if (@nargv < 2) {
- die "usage: mboxconfig mailbox [comment|condstore|expire|news2mail|sharedseen|sieve|squat] value\n";
+ die "usage: mboxconfig mailbox [comment|condstore|expire|news2mail|sharedseen|sieve|squat|/<explicit annotation>] value\n";
}
if (!$cyrref || !$$cyrref) {
die "mboxconfig: no connection to server\n";
diff -r 639190be2385 perl/imap/cyradm.sh
--- a/perl/imap/cyradm.sh Mon Oct 27 18:48:18 2008 +0100
+++ b/perl/imap/cyradm.sh Mon Oct 27 18:48:26 2008 +0100
@@ -241,6 +241,10 @@
Indicates that the mailbox should have a squat index created for it.
+=item C
+
+Sets the annotation I on I<mailbox> to I<value>.
+
=back
=item C<renamemailbox> [C<--partition> I<partition>] I<oldname> I<newname>
++++++ KOLAB_cyrus-imapd-2.3.16_Folder-names.patch ++++++
Modifies the set of accepted characters in folder names for the cyrus imapd server [Version: 2.3.9]
diff -r 17e54b46d7b6 imap/mboxname.c
--- a/imap/mboxname.c Mon Oct 27 18:44:56 2008 +0100
+++ b/imap/mboxname.c Mon Oct 27 18:47:11 2008 +0100
@@ -713,8 +713,10 @@
/*
* Apply site policy restrictions on mailbox names.
* Restrictions are hardwired for now.
+ * original definition
+#define GOODCHARS " #$'+,-.0123456789:=@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~"
*/
-#define GOODCHARS " #$'+,-.0123456789:=@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~"
+#define GOODCHARS " #$%'()*+,-.0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~"
int mboxname_policycheck(char *name)
{
unsigned i;
++++++ KOLAB_cyrus-imapd-2.3.16_Groups2.patch ++++++
diff -r 0d5aacd84718 lib/auth_unix.c
--- a/lib/auth_unix.c Mon Oct 27 18:37:49 2008 +0100
+++ b/lib/auth_unix.c Wed Apr 01 18:19:19 2009 +0200
@@ -46,12 +46,133 @@
#include
#include
#include
+#include
#include
#include
#include "auth.h"
#include "libcyr_cfg.h"
#include "xmalloc.h"
+
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+/*
+ * __getgrent.c - This file is part of the libc-8086/grp package for ELKS,
+ * Copyright (C) 1995, 1996 Nat Friedman .
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include
+#include
+#include
+
+static struct group *__getgrent(int grp_fd, char *line_buff, char **members)
+{
+ short line_index;
+ short buff_size;
+ static struct group group;
+ register char *ptr;
+ char *field_begin;
+ short member_num;
+ char *endptr;
+ int line_len;
+
+ /* We use the restart label to handle malformatted lines */
+ restart:
+ line_index = 0;
+ buff_size = 256;
+
+ line_buff = realloc(line_buff, buff_size);
+ while (1) {
+ if ((line_len = read(grp_fd, line_buff + line_index,
+ buff_size - line_index)) <= 0) {
+ return NULL;
+ }
+ field_begin = strchr(line_buff, '\n');
+ if (field_begin != NULL) {
+ lseek(grp_fd,
+ (long) (1 + field_begin -
+ (line_len + line_index + line_buff)), SEEK_CUR);
+ *field_begin = '\0';
+ if (*line_buff == '#' || *line_buff == ' '
+ || *line_buff == '\n' || *line_buff == '\t')
+ goto restart;
+ break;
+ } else {
+ /* Allocate some more space */
+ line_index = buff_size;
+ buff_size += 256;
+ line_buff = realloc(line_buff, buff_size);
+ }
+ }
+
+ /* Now parse the line */
+ group.gr_name = line_buff;
+ ptr = strchr(line_buff, ':');
+ if (ptr == NULL)
+ goto restart;
+ *ptr++ = '\0';
+
+ group.gr_passwd = ptr;
+ ptr = strchr(ptr, ':');
+ if (ptr == NULL)
+ goto restart;
+ *ptr++ = '\0';
+
+ field_begin = ptr;
+ ptr = strchr(ptr, ':');
+ if (ptr == NULL)
+ goto restart;
+ *ptr++ = '\0';
+
+ group.gr_gid = (gid_t) strtoul(field_begin, &endptr, 10);
+ if (*endptr != '\0')
+ goto restart;
+
+ member_num = 0;
+ field_begin = ptr;
+
+ if (members != NULL)
+ free(members);
+ members = (char **) malloc((member_num + 1) * sizeof(char *));
+ for ( ; field_begin && *field_begin != '\0'; field_begin = ptr) {
+ if ((ptr = strchr(field_begin, ',')) != NULL)
+ *ptr++ = '\0';
+ members[member_num++] = field_begin;
+ members = (char **) realloc(members,
+ (member_num + 1) * sizeof(char *));
+ }
+ members[member_num] = NULL;
+
+ group.gr_mem = members;
+ return &group;
+}
+
+static char *line_buff = NULL;
+static char **members = NULL;
+
+struct group *fgetgrent(FILE *file)
+{
+ if (file == NULL) {
+ errno = EINTR;
+ return NULL;
+ }
+ return __getgrent(fileno(file), line_buff, members);
+}
+#endif /* __FreeBSD__ */
struct auth_state {
char userid[81];
@@ -140,6 +261,25 @@
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
+static struct group* fgetgrnam(const char* name)
+{
+ struct group *grp;
+ FILE *groupfile;
+
+ groupfile = fopen("/etc/imapd.group", "r");
+ if (!groupfile) groupfile = fopen("/etc/group", "r");
+ if (groupfile) {
+ while ((grp = fgetgrent(groupfile))) {
+ if (strcmp(grp->gr_name, name) == 0) {
+ fclose(groupfile);
+ return grp;
+ }
+ }
+ }
+ if (groupfile) fclose(groupfile);
+ return NULL;
+}
+
/*
* Convert 'identifier' into canonical form.
* Returns a pointer to a static buffer containing the canonical form
@@ -175,7 +315,7 @@
*/
if (!strncmp(retbuf, "group:", 6)) {
- grp = getgrnam(retbuf+6);
+ grp = fgetgrnam(retbuf+6);
if (!grp) return NULL;
if (strlen(grp->gr_name) >= sizeof(retbuf)-6)
return NULL;
@@ -223,11 +363,12 @@
struct auth_state *newstate;
struct passwd *pwd;
struct group *grp;
-#if defined(HAVE_GETGROUPLIST) && defined(__GLIBC__)
+#if 0 && defined(HAVE_GETGROUPLIST) && defined(__GLIBC__)
gid_t gid, *groupids = NULL;
int ret, ngroups = 10;
#else
char **mem;
+ FILE *groupfile;
#endif
identifier = mycanonifyid(identifier, 0);
@@ -245,7 +386,7 @@
pwd = getpwnam(identifier);
-#if defined(HAVE_GETGROUPLIST) && defined(__GLIBC__)
+#if 0 && defined(HAVE_GETGROUPLIST) && defined(__GLIBC__)
gid = pwd ? pwd->pw_gid : (gid_t) -1;
/* get the group ids */
@@ -283,20 +424,23 @@
if (groupids) free(groupids);
#else /* !HAVE_GETGROUPLIST */
- setgrent();
- while ((grp = getgrent())) {
- for (mem = grp->gr_mem; *mem; mem++) {
- if (!strcmp(*mem, identifier)) break;
- }
+ groupfile = fopen("/etc/imapd.group", "r");
+ if (!groupfile) groupfile = fopen("/etc/group", "r");
+ if (groupfile) {
+ while ((grp = fgetgrent(groupfile))) {
+ for (mem = grp->gr_mem; *mem; mem++) {
+ if (!strcmp(*mem, identifier)) break;
+ }
- if (*mem || (pwd && pwd->pw_gid == grp->gr_gid)) {
- newstate->ngroups++;
- newstate->group = (char **)xrealloc((char *)newstate->group,
- newstate->ngroups * sizeof(char *));
- newstate->group[newstate->ngroups-1] = xstrdup(grp->gr_name);
- }
- }
- endgrent();
+ if (*mem || (pwd && pwd->pw_gid == grp->gr_gid)) {
+ newstate->ngroups++;
+ newstate->group = (char **)xrealloc((char *)newstate->group,
+ newstate->ngroups * sizeof(char *));
+ newstate->group[newstate->ngroups-1] = xstrdup(grp->gr_name);
+ }
+ }
+ fclose(groupfile);
+ }
#endif /* HAVE_GETGROUPLIST */
return newstate;
++++++ KOLAB_cyrus-imapd-2.3.16_Logging.patch ++++++
Provides improved logging for the cyrus imapd server [Version: 2.3.9]
diff -r 6162fc947b22 imap/append.c
--- a/imap/append.c Tue Dec 11 11:22:03 2007 +0100
+++ b/imap/append.c Tue Dec 11 11:22:13 2007 +0100
@@ -648,6 +648,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;
}
diff -r 6162fc947b22 imap/imapd.c
--- a/imap/imapd.c Tue Dec 11 11:22:03 2007 +0100
+++ b/imap/imapd.c Tue Dec 11 11:22:13 2007 +0100
@@ -3509,17 +3509,19 @@ void cmd_close(char *tag)
if (!r) sync_log_mailbox(imapd_mailbox->name);
}
+ if (r) {
+ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+ }
+ 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, "''");
+ }
+
index_closemailbox(imapd_mailbox);
mailbox_close(imapd_mailbox);
imapd_mailbox = 0;
-
- if (r) {
- prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
- }
- else {
- prot_printf(imapd_out, "%s OK %s\r\n", tag,
- error_message(IMAP_OK_COMPLETED));
- }
}
/*
diff -r 6162fc947b22 imap/mailbox.c
--- a/imap/mailbox.c Tue Dec 11 11:22:03 2007 +0100
+++ b/imap/mailbox.c Tue Dec 11 11:22:13 2007 +0100
@@ -2520,6 +2520,8 @@ int mailbox_expunge(struct mailbox *mail
*(fname->tail)++ = '/';
fname->len++;
for (msgno = 0; msgno < numdeleted; msgno++) {
+ syslog(LOG_DEBUG, "mailbox_expunge: removing mail %s:%d",
+ mailbox->name, deleted[msgno]);
mailbox_message_get_fname(mailbox, deleted[msgno],
fname->tail,
sizeof(fname->buf) - fname->len);
++++++ KOLAB_cyrus-imapd-2.3.16_UID.patch ++++++
Allows login by uid rather than the mail address on the cyrus imapd server [Version: 2.3.9]
diff -r 2ebe14b7db9d configure
--- a/configure Mon Oct 27 18:47:12 2008 +0100
+++ b/configure Mon Oct 27 18:48:18 2008 +0100
@@ -19667,7 +19667,7 @@
done
IMAP_COM_ERR_LIBS="${COM_ERR_LIBS}"
-IMAP_LIBS="${LIB_SASL} ${LIBS} ${SQL_LIBS}"
+IMAP_LIBS="${LIB_SASL} -lldap -llber ${LIBS} ${SQL_LIBS}"
diff -r 2ebe14b7db9d imap/global.c
--- a/imap/global.c Mon Oct 27 18:47:12 2008 +0100
+++ b/imap/global.c Mon Oct 27 18:48:18 2008 +0100
@@ -52,6 +52,9 @@
#include
#include
#include
+
+#include
+#include
#if HAVE_UNISTD_H
# include
@@ -378,6 +381,18 @@
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;
+ struct berval** vals;
+
+ int rc;
/* check for domain */
if (config_virtdomains &&
@@ -396,6 +411,49 @@
}
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_len(handle, entry, "mail")) ) {
+ if (memchr(vals[0]->bv_val, '@', vals[0]->bv_len)) {
+ static char buf[81]; /* same size as in auth_canonifyid */
+ int len = ((sizeof(buf) - 1) > vals[0]->bv_len ? vals[0]->bv_len : sizeof(buf) - 1);
+ strncpy( buf, vals[0]->bv_val, len);
+ buf[len] = '\0'; /* make sure it's null-terminated */
+ ldap_value_free_len( vals );
+ ldap_msgfree( res );
+ ldap_unbind_s(handle); /* also frees handle */
+ syslog(LOG_DEBUG, "canonify: '%s'\n", buf);
+ return auth_canonifyid( buf, 0) ;
+ }
+ ldap_value_free_len( 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 */
@@ -408,7 +466,7 @@
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;
diff -r 2ebe14b7db9d lib/imapoptions
--- a/lib/imapoptions Mon Oct 27 18:47:12 2008 +0100
+++ b/lib/imapoptions Mon Oct 27 18:48:18 2008 +0100
@@ -1114,7 +1114,7 @@
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
++++++ KOLAB_cyrus-imapd-2.3.16_timsieved_starttls-sendcaps.patch ++++++
This patch was downloaded from https://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/timsieved/parse...
(minus the CVS keywords)
It should be reverse-applied with patch -p2 -R to work around the kontact
behaviour described in kolab/issue2443 (kontact aborts sieve when imapd sends
capabilities after starttls) and can be dropped as soon as kontact has a way
to work with old and new cyrus imapd servers.
diff -r 1688e25afb65 timsieved/parser.c
--- a/timsieved/parser.c Thu Apr 23 23:28:07 2009 +0200
+++ b/timsieved/parser.c Thu Apr 23 23:28:54 2009 +0200
@@ -908,8 +908,7 @@
starttls_done = 1;
- return capabilities(sieved_out, sieved_saslconn, starttls_done,
- authenticated, sasl_ssf);
+ return result;
}
#else
static int cmd_starttls(struct protstream *sieved_out, struct protstream *sieved_in)
++++++ authid_normalize.patch ++++++
--- /var/tmp/diff_new_pack.ufHd1n/_old 2010-03-05 16:19:23.000000000 +0100
+++ /var/tmp/diff_new_pack.ufHd1n/_new 2010-03-05 16:19:23.000000000 +0100
@@ -1,8 +1,19 @@
-Index: lib/auth_unix.c
-===================================================================
---- lib/auth_unix.c.orig
-+++ lib/auth_unix.c
-@@ -155,10 +155,12 @@ const char *identifier;
+From 871e7bc8c06d59ec76cf6c3cae7c1bb58cb6c3c9 Mon Sep 17 00:00:00 2001
+From: Ralf Haferkamp
+Date: Wed, 13 Jan 2010 11:04:28 +0100
+Subject: [PATCH] "normalizeuid" option for imapd.conf
+
+Lowercase uid and strip leading and trailing blanks. It is recommended
+to set this to yes, especially if OpenLDAP is used as authentication
+source.
+
+ 4 files changed, 30 insertions(+), 0 deletions(-)
+
+diff --git a/lib/auth_unix.c b/lib/auth_unix.c
+index 3fb8e77..aece4b6 100644
+--- a/lib/auth_unix.c
++++ b/lib/auth_unix.c
+@@ -156,10 +156,12 @@ const char *identifier;
size_t len;
{
static char retbuf[81];
@@ -15,7 +26,7 @@
if(!len) len = strlen(identifier);
if(len >= sizeof(retbuf)) return NULL;
-@@ -210,6 +212,22 @@ size_t len;
+@@ -211,6 +213,22 @@ size_t len;
/* now we don't */
/* if (!sawalpha) return NULL; */
@@ -38,11 +49,11 @@
return retbuf;
}
-Index: lib/imapoptions
-===================================================================
---- lib/imapoptions.orig
-+++ lib/imapoptions
-@@ -1185,6 +1185,11 @@ product version in the capabilities */
+diff --git a/lib/imapoptions b/lib/imapoptions
+index 7cf08d9..06d9f2d 100644
+--- a/lib/imapoptions
++++ b/lib/imapoptions
+@@ -1274,6 +1274,11 @@ product version in the capabilities */
interface, otherwise the user is assumed to be in the default
domain (if set). */
@@ -54,12 +65,12 @@
/*
.SH SEE ALSO
.PP
-Index: lib/libcyr_cfg.c
-===================================================================
---- lib/libcyr_cfg.c.orig
-+++ lib/libcyr_cfg.c
-@@ -150,6 +150,11 @@ struct cyrusopt_s cyrus_options[] = {
- CFGVAL(long, 0),
+diff --git a/lib/libcyr_cfg.c b/lib/libcyr_cfg.c
+index 2a3a19b..38e60ec 100644
+--- a/lib/libcyr_cfg.c
++++ b/lib/libcyr_cfg.c
+@@ -154,6 +154,11 @@ struct cyrusopt_s cyrus_options[] = {
+ CFGVAL(long, 1),
CYRUS_OPT_SWITCH },
+ { CYRUSOPT_NORMALIZEUID,
@@ -70,16 +81,19 @@
{ CYRUSOPT_LAST, { NULL }, CYRUS_OPT_NOTOPT }
};
-Index: lib/libcyr_cfg.h
-===================================================================
---- lib/libcyr_cfg.h.orig
-+++ lib/libcyr_cfg.h
-@@ -112,6 +112,8 @@ enum cyrus_opt {
- CYRUSOPT_SQL_PASSWD,
- /* Secure SQL connection (OFF) */
+diff --git a/lib/libcyr_cfg.h b/lib/libcyr_cfg.h
+index 2b351c5..91837a8 100644
+--- a/lib/libcyr_cfg.h
++++ b/lib/libcyr_cfg.h
+@@ -114,6 +114,8 @@ enum cyrus_opt {
CYRUSOPT_SQL_USESSL,
+ /* Checkpoint after every recovery (OFF) */
+ CYRUSOPT_SKIPLIST_ALWAYS_CHECKPOINT,
+ /* Lowercase uid and strip leading and trailing blanks (ON) */
+ CYRUSOPT_NORMALIZEUID,
CYRUSOPT_LAST
+--
+1.6.4.2
+
++++++ cyrus-imapd-2.3.16-autocreate-0.10-0.drac.diff ++++++
++++ 2435 lines (skipped)
++++++ cyrus-imapd-2.3.14.tar.bz2 -> cyrus-imapd-2.3.16.tar.bz2 ++++++
++++ 47387 lines of diff (skipped)
++++++ luser_relay.patch ++++++
--- /var/tmp/diff_new_pack.ufHd1n/_old 2010-03-05 16:19:24.000000000 +0100
+++ /var/tmp/diff_new_pack.ufHd1n/_new 2010-03-05 16:19:24.000000000 +0100
@@ -1,6 +1,18 @@
---- imap/lmtpengine.c
-+++ imap/lmtpengine.c 2004/05/31 12:24:07
-@@ -817,6 +817,8 @@
+From 197203c01da43939bc815691a2face8f9e072e03 Mon Sep 17 00:00:00 2001
+From: Ralf Haferkamp
+Date: Wed, 13 Jan 2010 11:12:42 +0100
+Subject: [PATCH] New option lmtp_luser_relay
+
+Send mail to non-existing mailboxes,to this user. NOTE: This
+must be an existing local mailbox name. NOT an email address!
+
+ 2 files changed, 23 insertions(+), 5 deletions(-)
+
+diff --git a/imap/lmtpengine.c b/imap/lmtpengine.c
+index eff3e50..19347fc 100644
+--- a/imap/lmtpengine.c
++++ b/imap/lmtpengine.c
+@@ -819,6 +819,8 @@ static int process_recipient(char *addr, struct namespace *namespace,
address_data_t *ret = (address_data_t *) xmalloc(sizeof(address_data_t));
int forcedowncase = config_getswitch(IMAPOPT_LMTP_DOWNCASE_RCPT);
int quoted, detail;
@@ -9,7 +21,7 @@
assert(addr != NULL && msg != NULL);
-@@ -873,6 +875,13 @@
+@@ -875,6 +877,13 @@ static int process_recipient(char *addr, struct namespace *namespace,
}
*dest = '\0';
@@ -23,9 +35,9 @@
/* make a working copy of rcpt */
ret->user = ret->rcpt = xstrdup(rcpt);
-@@ -898,12 +907,17 @@
+@@ -900,12 +909,17 @@ static int process_recipient(char *addr, struct namespace *namespace,
r = verify_user(ret->user, ret->domain, ret->mailbox,
- ignorequota ? -1 : msg->size, msg->authstate);
+ (quota_t) (ignorequota ? -1 : msg->size), msg->authstate);
if (r) {
- /* we lost */
- free(ret->all);
@@ -46,9 +58,11 @@
ret->ignorequota = ignorequota;
msg->rcpt[msg->rcpt_num] = ret;
---- lib/imapoptions
-+++ lib/imapoptions 2004/05/31 11:57:52
-@@ -837,6 +837,10 @@
+diff --git a/lib/imapoptions b/lib/imapoptions
+index 06d9f2d..728f8a1 100644
+--- a/lib/imapoptions
++++ b/lib/imapoptions
+@@ -1279,6 +1279,10 @@ product version in the capabilities */
to set this to yes, especially if OpenLDAP is used as authentication
source. */
@@ -59,3 +73,6 @@
/*
.SH SEE ALSO
.PP
+--
+1.6.4.2
+
++++++ murder-backend-empty-mechlist.patch ++++++
From 1d90588637c8c287c041cca7a986464c45154cdf Mon Sep 17 00:00:00 2001
From: Ralf Haferkamp
Date: Tue, 23 Feb 2010 14:04:42 +0100
Subject: [PATCH] only copy mechlist if it is not empty (bnc#551346)
see also: https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=3166
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/imap/backend.c b/imap/backend.c
index a0cb6c7..45c85ab 100644
--- a/imap/backend.c
+++ b/imap/backend.c
@@ -449,7 +449,12 @@ struct backend *backend_connect(struct backend *ret_backend, const char *server,
if ((server[0] != '/') ||
(strcmp(prot->sasl_service, "lmtp") &&
strcmp(prot->sasl_service, "csync"))) {
- char *mlist = xstrdup(mechlist); /* backend_auth is destructive */
+ char *mlist;
+ if ( mechlist ){
+ mlist = xstrdup(mechlist); /* backend_auth is destructive */
+ } else {
+ mlist = xstrdup("");
+ }
if ((r = backend_authenticate(ret, prot, &mlist, userid,
cb, auth_status))) {
--
1.6.4.2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org