aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2006-04-01 01:19:00 +0800
committerume <ume@FreeBSD.org>2006-04-01 01:19:00 +0800
commit1c4f2cc0e043db916def7a723b954670bafcb217 (patch)
tree85a4e84788b1a6365991bce5cb5baebab75cc9e0 /mail
parent791a1d65a8685b4d16601f8438af144c3f56c4e8 (diff)
downloadfreebsd-ports-gnome-1c4f2cc0e043db916def7a723b954670bafcb217.tar.gz
freebsd-ports-gnome-1c4f2cc0e043db916def7a723b954670bafcb217.tar.zst
freebsd-ports-gnome-1c4f2cc0e043db916def7a723b954670bafcb217.zip
Update to 2.2.13.
This is possibly the last release of the 2.2 series. The 2.2 code is now in maintenance mode only, and all new development is taking place on the 2.3 code.
Diffstat (limited to 'mail')
-rw-r--r--mail/cyrus-imapd22/Makefile10
-rw-r--r--mail/cyrus-imapd22/distinfo6
-rw-r--r--mail/cyrus-imapd22/files/drac_auth.patch378
-rw-r--r--mail/cyrus-imapd22/files/extra-patch-aclocal.m451
-rw-r--r--mail/cyrus-imapd22/files/extra-patch-cmulocal::berkdb.m428
-rw-r--r--mail/cyrus-imapd22/files/extra-patch-cmulocal::ucdsnmp.m427
-rw-r--r--mail/cyrus-imapd22/files/patch-ac20
-rw-r--r--mail/cyrus-imapd22/files/patch-df14
-rw-r--r--mail/cyrus-imapd22/files/patch-dg16
-rw-r--r--mail/cyrus-imapd22/files/patch-master::service-thread.c14
-rw-r--r--mail/cyrus-imapd22/files/patch-perl::sieve::managesieve::Makefile.PL10
-rw-r--r--mail/cyrus-imapd22/pkg-plist2
12 files changed, 467 insertions, 109 deletions
diff --git a/mail/cyrus-imapd22/Makefile b/mail/cyrus-imapd22/Makefile
index cb5f8c7b0747..b100f303f84b 100644
--- a/mail/cyrus-imapd22/Makefile
+++ b/mail/cyrus-imapd22/Makefile
@@ -6,8 +6,8 @@
#
PORTNAME= cyrus-imapd
-PORTVERSION= 2.2.12
-PORTREVISION= 2
+PORTVERSION= 2.2.13
+PORTREVISION= 0
CATEGORIES= mail ipv6
MASTER_SITES= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/ \
ftp://ftp.hanse.de/sites/transit/mirror/ftp.andrew.cmu.edu/pub/cyrus-mail/ \
@@ -173,8 +173,10 @@ CONFIGURE_ARGS+=--enable-netscapehack
.endif
.if defined(WITH_DRAC)
-EXTRA_PATCHES+= ${WRKSRC}/contrib/drac_auth.patch
-EXTRA_PATCHES+= ${FILESDIR}/extra-patch-aclocal.m4 \
+#EXTRA_PATCHES+= ${WRKSRC}/contrib/drac_auth.patch
+EXTRA_PATCHES+= ${FILESDIR}/drac_auth.patch
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-cmulocal::berkdb.m4 \
+ ${FILESDIR}/extra-patch-cmulocal::ucdsnmp.m4 \
${FILESDIR}/extra-patch-configure.in
USE_AUTOTOOLS= autoconf:259 autoheader:259
CONFIGURE_ARGS+=--with-drac=${LOCALBASE}
diff --git a/mail/cyrus-imapd22/distinfo b/mail/cyrus-imapd22/distinfo
index 4fb77feecc25..a2faae3b29b7 100644
--- a/mail/cyrus-imapd22/distinfo
+++ b/mail/cyrus-imapd22/distinfo
@@ -1,3 +1,3 @@
-MD5 (cyrus-imapd-2.2.12.tar.gz) = 70b3bba526a8d36d3bb23a87d37e9188
-SHA256 (cyrus-imapd-2.2.12.tar.gz) = 3c6f41255ba15d8b2ea78320dd5e0c98e07fe0b5c3c4b84bc20f503427bd1b7b
-SIZE (cyrus-imapd-2.2.12.tar.gz) = 1961161
+MD5 (cyrus-imapd-2.2.13.tar.gz) = 3ff679714836d1d7b1e1df0e026d4844
+SHA256 (cyrus-imapd-2.2.13.tar.gz) = 109e85b901bfcdbdd6a76d7cac83af866aa9c37a40919be7f58813319082d09c
+SIZE (cyrus-imapd-2.2.13.tar.gz) = 2109770
diff --git a/mail/cyrus-imapd22/files/drac_auth.patch b/mail/cyrus-imapd22/files/drac_auth.patch
new file mode 100644
index 000000000000..40409d2171bb
--- /dev/null
+++ b/mail/cyrus-imapd22/files/drac_auth.patch
@@ -0,0 +1,378 @@
+$Id: drac_auth.patch,v 1.18 2003/12/19 20:01:58 ken3 Exp $
+
+Patch to add support for Dynamic Relay Authorization Control
+
+For more information about DRAC, see:
+ http://mail.cc.umanitoba.ca/drac/index.html
+
+
+Installation
+------------
+
+1. Apply this patch in the toplevel directory using the following command:
+
+ # patch -p0 < contrib/drac_auth.patch
+
+2. Cleanup any previous builds:
+
+ # make distclean
+
+3a. If you DO NOT have 'smake' and 'autoconf' installed on your system, goto
+ step 3b.
+
+ Perform the following to reconfigure your build:
+
+ # rm configure
+ # sh SMakefile
+ # ./configure ... --with-drac=<location of libdrac>
+
+ NOTE: you can find your original configure command in config.status
+
+ Proceed to step 4.
+
+3b. Edit imap/Makefile and modify the following three variables:
+
+ DEFS = ... -DDRAC_AUTH
+ LIBS = ... -ldrac
+ LDFLAGS = ... -L<location of libdrac>
+
+4. Build and install the software:
+
+ # make
+ # make install
+
+5. If dracd is not running on the same system as Cyrus (localhost),
+ use the 'drachost' option in imapd.conf(5) to specify the hostname of
+ the dracd server.
+
+6. Installation is complete!
+
+
+Operation
+---------
+
+The behavior of DRAC is controlled by the value of the 'dracinterval' option
+in imapd.conf(5). If 'dracinterval' is 0 (zero), DRAC support is disabled.
+Otherwise, DRAC support is enabled and has the following behavior:
+
+pop3d: Whenever a client opens a user's INBOX, drac_auth() is called.
+
+imapd: Once a client is logged in (via LOGIN or AUTHENTICATE),
+ drac_send() will be called once every 'dracinterval' minutes.
+
+
+
+
+
+Index: configure.in
+===================================================================
+RCS file: /afs/andrew/system/cvs/src/cyrus/configure.in,v
+retrieving revision 1.273
+diff -u -r1.273 configure.in
+--- configure.in 15 Dec 2003 20:00:35 -0000 1.273
++++ configure.in 19 Dec 2003 19:56:16 -0000
+@@ -945,6 +945,19 @@
+ SNMP_SUBDIRS=""
+ AC_SUBST(SNMP_SUBDIRS)
+
++dnl
++dnl Test for DRAC
++dnl
++DRACLIBS=
++AC_ARG_WITH(drac, [ --with-drac=DIR use DRAC library in <DIR> [no] ],
++ if test -d "$withval"; then
++ LDFLAGS="$LDFLAGS -L${withval}"
++ AC_CHECK_LIB(drac, dracauth,
++ AC_DEFINE(DRAC_AUTH,[],[Build DRAC support?])
++ DRACLIBS="-ldrac")
++ fi)
++AC_SUBST(DRACLIBS)
++
+ CMU_LIBWRAP
+ CMU_UCDSNMP
+
+Index: imap/Makefile.in
+===================================================================
+RCS file: /afs/andrew/system/cvs/src/cyrus/imap/Makefile.in,v
+retrieving revision 1.179
+diff -u -r1.179 Makefile.in
+--- imap/Makefile.in 12 Nov 2003 04:02:01 -0000 1.179
++++ imap/Makefile.in 19 Dec 2003 19:56:19 -0000
+@@ -67,6 +67,7 @@
+ SIEVE_LIBS = @SIEVE_LIBS@
+ IMAP_COM_ERR_LIBS = @IMAP_COM_ERR_LIBS@
+ LIB_WRAP = @LIB_WRAP@
++DRAC_LIBS = @DRACLIBS@
+ LIBS = $(IMAP_LIBS) $(IMAP_COM_ERR_LIBS)
+ DEPLIBS = ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@
+
+@@ -215,17 +216,17 @@
+ imapd: xversion $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE)
+ $(CC) $(LDFLAGS) -o imapd \
+ $(SERVICE) $(IMAPDOBJS) mutex_fake.o \
+- libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP)
++ libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS)
+
+ imapd.pure: $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE)
+ $(PURIFY) $(PUREOPT) $(CC) $(LDFLAGS) -o imapd.pure \
+ $(SERVICE) $(IMAPDOBJS) mutex_fake.o libimap.a \
+- $(DEPLIBS) $(LIBS) $(LIB_WRAP)
++ $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS)
+
+ imapd.quant: $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE)
+ $(QUANTIFY) $(QUANTOPT) $(CC) $(LDFLAGS) -o imapd.quant \
+ $(SERVICE) $(IMAPDOBJS) mutex_fake.o libimap.a \
+- $(DEPLIBS) $(LIBS) $(LIB_WRAP)
++ $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) $(DRAC_LIBS)
+
+ proxyd: $(PROXYDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE)
+ $(CC) $(LDFLAGS) -o proxyd \
+@@ -252,7 +253,7 @@
+
+ pop3d: pop3d.o backend.o tls.o mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE)
+ $(CC) $(LDFLAGS) -o pop3d pop3d.o backend.o tls.o $(SERVICE) \
+- mutex_fake.o libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP)
++ mutex_fake.o libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS)
+
+ nntpd: nntpd.o backend.o index.o smtpclient.o spool.o tls.o \
+ mutex_fake.o nntp_err.o libimap.a $(DEPLIBS) $(SERVICE)
+Index: imap/imapd.c
+===================================================================
+RCS file: /afs/andrew/system/cvs/src/cyrus/imap/imapd.c,v
+retrieving revision 1.448
+diff -u -r1.448 imapd.c
+--- imap/imapd.c 5 Dec 2003 21:33:07 -0000 1.448
++++ imap/imapd.c 19 Dec 2003 19:56:19 -0000
+@@ -126,6 +126,18 @@
+ 1, 1, &imapd_authstate, &imapd_userisadmin, &imapd_userisproxyadmin
+ };
+
++#ifdef DRAC_AUTH
++static struct {
++ int interval; /* dracd "ping" interval; 0 = disabled */
++ unsigned long clientaddr;
++ struct prot_waitevent *event;
++} drac;
++
++extern int dracconn(char *server, char **errmsg);
++extern int dracsend(unsigned long userip, char **errmsg);
++extern int dracdisc(char **errmsg);
++#endif /* DRAC_AUTH */
++
+ /* current sub-user state */
+ static struct mailbox mboxstruct;
+ static struct mailbox *imapd_mailbox;
+@@ -446,6 +458,23 @@
+ /* setup for sending IMAP IDLE notifications */
+ idle_enabled();
+
++#ifdef DRAC_AUTH
++ /* setup for sending DRAC "pings" */
++ drac.event = NULL;
++ drac.interval = config_getint(IMAPOPT_DRACINTERVAL);
++ if (drac.interval < 0) drac.interval = 0;
++ if (drac.interval) {
++ char *err;
++
++ if (dracconn((char*) config_getstring(IMAPOPT_DRACHOST), &err) != 0) {
++ /* disable DRAC */
++ drac.interval = 0;
++ syslog(LOG_ERR, "dracconn: %s", err);
++ syslog(LOG_ERR, "DRAC notifications disabled");
++ }
++ }
++#endif /* DRAC_AUTH */
++
+ /* create connection to the SNMP listener, if available. */
+ snmp_connect(); /* ignore return code */
+ snmp_set_str(SERVER_NAME_VERSION,CYRUS_VERSION);
+@@ -531,6 +560,15 @@
+ imapd_haveaddr = 1;
+ }
+ }
++
++#ifdef DRAC_AUTH
++ if (((struct sockaddr *)&imapd_remoteaddr)->sa_family == AF_INET)
++ drac.clientaddr = ((struct sockaddr_in *)&imapd_remoteaddr)->sin_addr.s_addr;
++ else
++ drac.clientaddr = 0;
++ } else {
++ drac.clientaddr = 0;
++#endif /* DRAC_AUTH */
+ }
+
+ /* create the SASL connection */
+@@ -573,6 +611,11 @@
+ prot_flush(imapd_out);
+ snmp_increment(ACTIVE_CONNECTIONS, -1);
+
++#ifdef DRAC_AUTH
++ if (drac.event) prot_removewaitevent(imapd_in, drac.event);
++ drac.event = NULL;
++#endif /* DRAC_AUTH */
++
+ /* cleanup */
+ imapd_reset();
+
+@@ -646,6 +689,10 @@
+
+ cyrus_done();
+
++#ifdef DRAC_AUTH
++ if (drac.interval) (void) dracdisc((char **)NULL);
++#endif /* DRAC_AUTH */
++
+ exit(code);
+ }
+
+@@ -668,6 +715,35 @@
+ shut_down(code);
+ }
+
++#ifdef DRAC_AUTH
++/*
++ * Ping dracd every 'drac.interval' minutes
++ * to let it know that we are still connected
++ */
++struct prot_waitevent *drac_ping(struct protstream *s,
++ struct prot_waitevent *ev, void *rock)
++{
++ char *err;
++ static int nfailure = 0;
++
++ if (dracsend(drac.clientaddr, &err) != 0) {
++ syslog(LOG_ERR, "dracsend: %s", err);
++ if (++nfailure >= 3) {
++ /* can't contact dracd for 3 consecutive tries - disable DRAC */
++ prot_removewaitevent(s, ev);
++ drac.event = NULL;
++ syslog(LOG_ERR, "DRAC notifications disabled");
++ return NULL;
++ }
++ }
++ else
++ nfailure = 0;
++
++ ev->mark = time(NULL) + (drac.interval * 60);
++ return ev;
++}
++#endif /* DRAC_AUTH */
++
+ /*
+ * Top-level command loop parsing
+ */
+@@ -1680,6 +1756,11 @@
+
+ prot_printf(imapd_out, "%s OK %s\r\n", tag, reply);
+
++#ifdef DRAC_AUTH
++ if (drac.interval && drac.clientaddr)
++ drac.event = prot_addwaitevent(imapd_in, 0 /* now */, drac_ping, NULL);
++#endif /* DRAC_AUTH */
++
+ /* Create telemetry log */
+ imapd_logfd = telemetry_log(imapd_userid, imapd_in, imapd_out, 0);
+
+@@ -1803,6 +1884,11 @@
+
+ prot_setsasl(imapd_in, imapd_saslconn);
+ prot_setsasl(imapd_out, imapd_saslconn);
++
++#ifdef DRAC_AUTH
++ if (drac.interval && drac.clientaddr)
++ drac.event = prot_addwaitevent(imapd_in, 0 /* now */, drac_ping, NULL);
++#endif /* DRAC_AUTH */
+
+ /* Create telemetry log */
+ imapd_logfd = telemetry_log(imapd_userid, imapd_in, imapd_out, 0);
+Index: imap/pop3d.c
+===================================================================
+RCS file: /afs/andrew/system/cvs/src/cyrus/imap/pop3d.c,v
+retrieving revision 1.147
+diff -u -r1.147 pop3d.c
+--- imap/pop3d.c 24 Oct 2003 18:24:07 -0000 1.147
++++ imap/pop3d.c 19 Dec 2003 19:56:19 -0000
+@@ -101,6 +101,10 @@
+ extern int opterr;
+
+
++#ifdef DRAC_AUTH
++static int drac_enabled;
++extern int dracauth(char *server, unsigned long userip, char **errmsg);
++#endif /* DRAC_AUTH */
+
+ #ifdef HAVE_SSL
+ static SSL *tls_conn;
+@@ -394,6 +398,10 @@
+ prot_settimeout(popd_in, timeout*60);
+ prot_setflushonread(popd_in, popd_out);
+
++#ifdef DRAC_AUTH
++ drac_enabled = (config_getint(IMAPOPT_DRACINTERVAL) > 0);
++#endif /* DRAC_AUTH */
++
+ if (kflag) kpop();
+
+ /* we were connected on pop3s port so we should do
+@@ -1415,6 +1423,21 @@
+ popd_mailbox = &mboxstruct;
+ proc_register("pop3d", popd_clienthost, popd_userid,
+ popd_mailbox->name);
++
++#ifdef DRAC_AUTH
++ if (drac_enabled &&
++ ((struct sockaddr *)&popd_remoteaddr)->sa_family == AF_INET) {
++ char *err;
++
++ if (dracauth((char*) config_getstring(IMAPOPT_DRACHOST),
++ ((struct sockaddr_in *)&popd_remoteaddr)->sin_addr.s_addr, &err) != 0) {
++ /* disable DRAC */
++ drac_enabled = 0;
++ syslog(LOG_ERR, "dracauth: %s", err);
++ syslog(LOG_ERR, "DRAC notifications disabled");
++ }
++ }
++#endif /* DRAC_AUTH */
+ }
+
+ /* Create telemetry log */
+Index: imap/version.c
+===================================================================
+RCS file: /afs/andrew/system/cvs/src/cyrus/imap/version.c,v
+retrieving revision 1.15
+diff -u -r1.15 version.c
+--- imap/version.c 15 Dec 2003 20:00:41 -0000 1.15
++++ imap/version.c 19 Dec 2003 19:56:19 -0000
+@@ -145,6 +145,10 @@
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ "; %s", SIEVE_VERSION);
+ #endif
++#ifdef DRAC_AUTH
++ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
++ "; DRAC");
++#endif
+ #ifdef HAVE_LIBWRAP
+ snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
+ "; TCP Wrappers");
+Index: lib/imapoptions
+===================================================================
+RCS file: /afs/andrew/system/cvs/src/cyrus/lib/imapoptions,v
+retrieving revision 1.8
+diff -u -r1.8 imapoptions
+--- lib/imapoptions 15 Dec 2003 20:00:42 -0000 1.8
++++ lib/imapoptions 19 Dec 2003 19:56:19 -0000
+@@ -195,6 +195,14 @@
+ { "deleteright", "c", STRING }
+ /* The right that a user needs to delete a mailbox. */
+
++{ "dracinterval", 5, INT }
++/* If nonzero, enables the use of DRAC (Dynamic Relay Authorization
++ Control) by the pop3d and imapd daemons. Also sets the interval
++ (in minutes) between re-authorization requests made by imapd. */
++
++{ "drachost", "localhost", STRING }
++/* Hostname of the RPC dracd server. */
++
+ { "duplicate_db", "berkeley-nosync", STRINGLIST("berkeley", "berkeley-nosync", "berkeley-hash", "berkeley-hash-nosync", "skiplist")}
+ /* The cyrusdb backend to use for the duplicate delivery suppression
+ and sieve. */
diff --git a/mail/cyrus-imapd22/files/extra-patch-aclocal.m4 b/mail/cyrus-imapd22/files/extra-patch-aclocal.m4
deleted file mode 100644
index 0a8794381188..000000000000
--- a/mail/cyrus-imapd22/files/extra-patch-aclocal.m4
+++ /dev/null
@@ -1,51 +0,0 @@
-Index: aclocal.m4
-diff -u aclocal.m4.orig aclocal.m4
---- aclocal.m4.orig Wed Nov 24 03:55:40 2004
-+++ aclocal.m4 Wed Nov 24 15:39:52 2004
-@@ -506,10 +506,11 @@
- fi
-
- saved_LIBS=$LIBS
-- for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
-+ for dbname in ${with_bdb} db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
- do
- LIBS="$saved_LIBS -l$dbname"
-- AC_TRY_LINK([#include <db.h>],
-+ AC_TRY_LINK([#include <stdio.h>
-+#include <db.h>],
- [db_create(NULL, NULL, 0);],
- BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db,
- dblib="no")
-@@ -517,7 +518,8 @@
- done
- if test "$dblib" = "no"; then
- LIBS="$saved_LIBS -ldb"
-- AC_TRY_LINK([#include <db.h>],
-+ AC_TRY_LINK([#include <stdio.h>
-+#include <db.h>],
- [db_open(NULL, 0, 0, 0, NULL, NULL, NULL);],
- BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db,
- dblib="no")
-@@ -1820,9 +1822,12 @@
-
- if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
- CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
-- LIB_UCDSNMP=$SNMP_LIBS
-+ LIB_UCDSNMP="$SNMP_LIBS -lwrap"
-+ PERLLIBDIR=`$PERL -e 'use Config; print "$Config{archlibexp}/CORE";'`
-+ LDFLAGS_UCDSNMP="-L${PERLLIBDIR} -R${PERLLIBDIR}"
- AC_DEFINE(HAVE_NETSNMP,1,[Do we have Net-SNMP support?])
- AC_SUBST(LIB_UCDSNMP)
-+ AC_SUBST(LDFLAGS_UCDSNMP)
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
-@@ -1848,7 +1853,7 @@
- LIB_UCDSNMP=""
- if test "$with_snmp" != no; then
- AC_DEFINE(HAVE_UCDSNMP,1,[Do we have UCD-SNMP support?])
-- LIB_UCDSNMP="-lucdagent -lucdmibs -lsnmp"
-+ LIB_UCDSNMP="-lucdagent -lucdmibs -lsnmp -lkvm -ldevstat -lwrap"
- AC_CHECK_LIB(rpm, rpmdbOpen,
- LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt",,-lpopt)
- fi
diff --git a/mail/cyrus-imapd22/files/extra-patch-cmulocal::berkdb.m4 b/mail/cyrus-imapd22/files/extra-patch-cmulocal::berkdb.m4
new file mode 100644
index 000000000000..6d488fdc76ca
--- /dev/null
+++ b/mail/cyrus-imapd22/files/extra-patch-cmulocal::berkdb.m4
@@ -0,0 +1,28 @@
+Index: cmulocal/berkdb.m4
+diff -u cmulocal/berkdb.m4.orig cmulocal/berkdb.m4
+--- cmulocal/berkdb.m4.orig Wed Apr 27 04:14:07 2005
++++ cmulocal/berkdb.m4 Sat Apr 1 01:51:58 2006
+@@ -213,10 +213,11 @@
+ fi
+
+ saved_LIBS=$LIBS
+- for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
++ for dbname in ${with_bdb} db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
+ do
+ LIBS="$saved_LIBS -l$dbname"
+- AC_TRY_LINK([#include <db.h>],
++ AC_TRY_LINK([#include <stdio.h>
++#include <db.h>],
+ [db_create(NULL, NULL, 0);],
+ BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db,
+ dblib="no")
+@@ -224,7 +225,8 @@
+ done
+ if test "$dblib" = "no"; then
+ LIBS="$saved_LIBS -ldb"
+- AC_TRY_LINK([#include <db.h>],
++ AC_TRY_LINK([#include <stdio.h>
++#include <db.h>],
+ [db_open(NULL, 0, 0, 0, NULL, NULL, NULL);],
+ BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db,
+ dblib="no")
diff --git a/mail/cyrus-imapd22/files/extra-patch-cmulocal::ucdsnmp.m4 b/mail/cyrus-imapd22/files/extra-patch-cmulocal::ucdsnmp.m4
new file mode 100644
index 000000000000..829d92d23585
--- /dev/null
+++ b/mail/cyrus-imapd22/files/extra-patch-cmulocal::ucdsnmp.m4
@@ -0,0 +1,27 @@
+Index: cmulocal/ucdsnmp.m4
+diff -u cmulocal/ucdsnmp.m4.orig cmulocal/ucdsnmp.m4
+--- cmulocal/ucdsnmp.m4.orig Tue May 25 10:27:58 2004
++++ cmulocal/ucdsnmp.m4 Sat Dec 10 16:34:09 2005
+@@ -31,9 +31,12 @@
+
+ if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
+ CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
+- LIB_UCDSNMP=$SNMP_LIBS
++ LIB_UCDSNMP="$SNMP_LIBS -lwrap"
++ PERLLIBDIR=`$PERL -e 'use Config; print "$Config{archlibexp}/CORE";'`
++ LDFLAGS_UCDSNMP="-L${PERLLIBDIR} -R${PERLLIBDIR}"
+ AC_DEFINE(HAVE_NETSNMP,1,[Do we have Net-SNMP support?])
+ AC_SUBST(LIB_UCDSNMP)
++ AC_SUBST(LDFLAGS_UCDSNMP)
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+@@ -59,7 +62,7 @@
+ LIB_UCDSNMP=""
+ if test "$with_snmp" != no; then
+ AC_DEFINE(HAVE_UCDSNMP,1,[Do we have UCD-SNMP support?])
+- LIB_UCDSNMP="-lucdagent -lucdmibs -lsnmp"
++ LIB_UCDSNMP="-lucdagent -lucdmibs -lsnmp -lkvm -ldevstat -lwrap"
+ AC_CHECK_LIB(rpm, rpmdbOpen,
+ LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt",,-lpopt)
+ fi
diff --git a/mail/cyrus-imapd22/files/patch-ac b/mail/cyrus-imapd22/files/patch-ac
index 146e56766703..dc89adbb1673 100644
--- a/mail/cyrus-imapd22/files/patch-ac
+++ b/mail/cyrus-imapd22/files/patch-ac
@@ -1,16 +1,16 @@
Index: configure
diff -u configure.orig configure
---- configure.orig Tue Feb 15 02:59:46 2005
-+++ configure Thu Feb 24 04:45:06 2005
-@@ -309,6 +309,7 @@
+--- configure.orig Sat Apr 1 00:25:50 2006
++++ configure Sat Apr 1 01:08:23 2006
+@@ -310,6 +310,7 @@
#endif"
- ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os MAKEDEPEND cyrus_prefix service_path cyrus_user cyrus_group CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT RANLIB ac_ct_RANLIB SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP AWK LIBOBJS LIB_SOCKET IPV6_OBJS PRE_SUBDIRS EXTRA_SUBDIRS DEPLIBS LOCALDEFS WITH_AUTH BDB_INC BDB_LIB CYRUSDB_OBJS SIEVE_OBJS SIEVE_LIBS SIEVE_CPPFLAGS YACC LEX LEXLIB LEX_OUTPUT_ROOT SIEVE_SUBDIRS WITH_NONBLOCK WITH_GMTOFF WITH_MAP WITH_LOCK cyrus_sigveclib WITH_PTS AFS_LIBS AFS_LDFLAGS LDAP_CPPFLAGS LDAP_LDFLAGS LDAP_LIBS SERVER_SUBDIRS OPENSSL_INC OPENSSL_LIB ZEPHYR_LIBS ZEPHYR_CPPFLAGS WITH_IDLE IMAP_PROGS COMPILE_ET COM_ERR_LIBS COM_ERR_LDFLAGS COM_ERR_CPPFLAGS LIB_CRYPT GSSAPI_LIBS GSSAPIBASE_LIBS LIB_DYN_SASL DYNSASLFLAGS LIB_SASL SASLFLAGS PERL PERL_CCCDLFLAGS MD5OBJ SNMP_SUBDIRS LIB_WRAP SNMP_CONFIG LIB_UCDSNMP LIB_RT IMAP_COM_ERR_LIBS IMAP_LIBS PERL_SUBDIRS PERL_DEPSUBDIRS LTLIBOBJS'
+ ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os MAKEDEPEND cyrus_prefix service_path cyrus_user cyrus_group CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT RANLIB ac_ct_RANLIB SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP AWK LIBOBJS LIB_SOCKET IPV6_OBJS PRE_SUBDIRS EXTRA_SUBDIRS DEPLIBS LOCALDEFS BDB_INC BDB_LIB CYRUSDB_OBJS SIEVE_OBJS SIEVE_LIBS SIEVE_CPPFLAGS YACC LEX LEXLIB LEX_OUTPUT_ROOT SIEVE_SUBDIRS WITH_NONBLOCK WITH_GMTOFF WITH_MAP WITH_LOCK cyrus_sigveclib AFS_LIBS AFS_LDFLAGS LDAP_CPPFLAGS LDAP_LDFLAGS LDAP_LIBS SERVER_SUBDIRS OPENSSL_INC OPENSSL_LIB ZEPHYR_LIBS ZEPHYR_CPPFLAGS WITH_IDLE IMAP_PROGS COMPILE_ET COM_ERR_LIBS COM_ERR_LDFLAGS COM_ERR_CPPFLAGS LIB_CRYPT GSSAPI_LIBS GSSAPIBASE_LIBS LIB_DYN_SASL DYNSASLFLAGS LIB_SASL SASLFLAGS PERL PERL_CCCDLFLAGS MD5OBJ SNMP_SUBDIRS CMU_LIB_SUBDIR LIB_WRAP SNMP_CONFIG LIB_UCDSNMP LIB_RT IMAP_COM_ERR_LIBS IMAP_LIBS PERL_SUBDIRS PERL_DEPSUBDIRS LTLIBOBJS'
+ac_subst_vars="${ac_subst_vars} LDFLAGS_UCDSNMP"
ac_subst_files=''
# Initialize some variables set by options.
-@@ -6612,7 +6613,7 @@
+@@ -7701,7 +7702,7 @@
fi
saved_LIBS=$LIBS
@@ -19,7 +19,7 @@ diff -u configure.orig configure
do
LIBS="$saved_LIBS -l$dbname"
cat >conftest.$ac_ext <<_ACEOF
-@@ -6622,6 +6623,7 @@
+@@ -7710,6 +7711,7 @@
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
@@ -27,7 +27,7 @@ diff -u configure.orig configure
#include <db.h>
int
main ()
-@@ -13549,6 +13551,7 @@
+@@ -15337,6 +15339,7 @@
EXTRA_SUBDIRS="${EXTRA_SUBDIRS} perl"
PERL_SUBDIRS="imap"
PERL="${with_perl}"
@@ -35,7 +35,7 @@ diff -u configure.orig configure
PERL_CCCDLFLAGS="$cccdlflags"
fi
-@@ -14067,7 +14070,9 @@
+@@ -16357,7 +16360,9 @@
if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then
CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include"
@@ -46,7 +46,7 @@ diff -u configure.orig configure
cat >>confdefs.h <<\_ACEOF
#define HAVE_NETSNMP 1
-@@ -14298,7 +14303,7 @@
+@@ -16606,7 +16611,7 @@
#define HAVE_UCDSNMP 1
_ACEOF
@@ -55,7 +55,7 @@ diff -u configure.orig configure
echo "$as_me:$LINENO: checking for rpmdbOpen in -lrpm" >&5
echo $ECHO_N "checking for rpmdbOpen in -lrpm... $ECHO_C" >&6
if test "${ac_cv_lib_rpm_rpmdbOpen+set}" = set; then
-@@ -15114,6 +15119,7 @@
+@@ -17432,6 +17437,7 @@
s,@LIB_WRAP@,$LIB_WRAP,;t t
s,@SNMP_CONFIG@,$SNMP_CONFIG,;t t
s,@LIB_UCDSNMP@,$LIB_UCDSNMP,;t t
diff --git a/mail/cyrus-imapd22/files/patch-df b/mail/cyrus-imapd22/files/patch-df
deleted file mode 100644
index 69a0841343ee..000000000000
--- a/mail/cyrus-imapd22/files/patch-df
+++ /dev/null
@@ -1,14 +0,0 @@
-Index: master/service.c
-diff -u master/service.c.orig master/service.c
---- master/service.c.orig Wed Jan 22 22:52:36 2003
-+++ master/service.c Wed Jan 22 22:57:20 2003
-@@ -102,6 +102,9 @@
- struct sockaddr_storage sin;
- socklen_t len = sizeof(sin);
-
-+ /* XXX: old FreeBSD didn't fill sockaddr correctly against AF_UNIX */
-+ sin.ss_family = AF_UNIX;
-+
- /* is this a connection from the local host? */
- if (getpeername(fd, (struct sockaddr *) &sin, &len) == 0) {
- if (((struct sockaddr *)&sin)->sa_family == AF_UNIX) {
diff --git a/mail/cyrus-imapd22/files/patch-dg b/mail/cyrus-imapd22/files/patch-dg
index 80dc928b96d0..3a03d9c9325d 100644
--- a/mail/cyrus-imapd22/files/patch-dg
+++ b/mail/cyrus-imapd22/files/patch-dg
@@ -1,18 +1,18 @@
Index: tools/mkimap
diff -u tools/mkimap.orig tools/mkimap
---- tools/mkimap.orig Wed Jun 30 03:16:54 2004
-+++ tools/mkimap Tue Jul 27 04:47:43 2004
-@@ -61,6 +61,9 @@
+--- tools/mkimap.orig Fri Dec 2 04:12:34 2005
++++ tools/mkimap Sat Apr 1 01:13:06 2006
+@@ -90,6 +90,9 @@
$imapdconf = shift || "/etc/imapd.conf";
+$cyrus_user = $ENV{CYRUS_USER} || "%%CYRUS_USER%%";
+$cyrus_group = $ENV{CYRUS_GROUP} || "%%CYRUS_GROUP%%";
+
- open CONF, $imapdconf or die "can't open $imapdconf";
- print "reading configure file...\n";
- while (<CONF>) {
-@@ -86,6 +89,7 @@
+ push @configs, $imapdconf;
+
+ while ($conf = shift @configs) {
+@@ -100,6 +103,7 @@
print "configuring $d...\n";
@@ -20,7 +20,7 @@ diff -u tools/mkimap.orig tools/mkimap
chdir $d or die "couldn't change to $d";
mkdir "proc", 0755 || warn "can't create $d/proc: $!";
-@@ -95,11 +99,14 @@
+@@ -109,11 +113,14 @@
mkdir "msg", 0755 || warn "can't create $d/msg: $!";
mkdir "ptclient", 0755 || warn "can't create $d/ptclient: $!";
diff --git a/mail/cyrus-imapd22/files/patch-master::service-thread.c b/mail/cyrus-imapd22/files/patch-master::service-thread.c
deleted file mode 100644
index 9a2016c3c64a..000000000000
--- a/mail/cyrus-imapd22/files/patch-master::service-thread.c
+++ /dev/null
@@ -1,14 +0,0 @@
-Index: master/service-thread.c
-diff -u master/service-thread.c.orig master/service-thread.c
---- master/service-thread.c.orig Wed Jan 22 22:52:36 2003
-+++ master/service-thread.c Wed Jan 22 23:09:52 2003
-@@ -99,6 +99,9 @@
- struct sockaddr_storage sin;
- socklen_t len = sizeof(sin);
-
-+ /* XXX: old FreeBSD didn't fill sockaddr correctly against AF_UNIX */
-+ sin.ss_family = AF_UNIX;
-+
- /* is this a connection from the local host? */
- if (getpeername(fd, (struct sockaddr *) &sin, &len) == 0) {
- if (((struct sockaddr *)&sin)->sa_family == AF_UNIX) {
diff --git a/mail/cyrus-imapd22/files/patch-perl::sieve::managesieve::Makefile.PL b/mail/cyrus-imapd22/files/patch-perl::sieve::managesieve::Makefile.PL
index bde3d77b763e..358c39d12bae 100644
--- a/mail/cyrus-imapd22/files/patch-perl::sieve::managesieve::Makefile.PL
+++ b/mail/cyrus-imapd22/files/patch-perl::sieve::managesieve::Makefile.PL
@@ -1,10 +1,10 @@
Index: perl/sieve/managesieve/Makefile.PL
diff -u perl/sieve/managesieve/Makefile.PL.orig perl/sieve/managesieve/Makefile.PL
---- perl/sieve/managesieve/Makefile.PL.orig Thu Oct 23 03:50:27 2003
-+++ perl/sieve/managesieve/Makefile.PL Sun Dec 12 04:21:55 2004
-@@ -64,3 +64,10 @@
- 'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING'
- 'INC' => "-I../lib/ -I../../../lib/ $SASL_INC $OPENSSL_INC",
+--- perl/sieve/managesieve/Makefile.PL.orig Fri Oct 14 05:30:03 2005
++++ perl/sieve/managesieve/Makefile.PL Sat Apr 1 01:22:10 2006
+@@ -66,3 +66,10 @@
+ 'CC' => $ENV{CC},
+ 'LD' => $ENV{CC}
);
+
+package MY;
diff --git a/mail/cyrus-imapd22/pkg-plist b/mail/cyrus-imapd22/pkg-plist
index f62a19ad16e6..e8e80885e7b1 100644
--- a/mail/cyrus-imapd22/pkg-plist
+++ b/mail/cyrus-imapd22/pkg-plist
@@ -77,6 +77,8 @@ include/cyrus/stristr.h
include/cyrus/sysexits.h
include/cyrus/util.h
include/cyrus/xmalloc.h
+include/cyrus/xstrlcat.h
+include/cyrus/xstrlcpy.h
lib/libcyrus_min.a
lib/libcyrus.a
%%SITE_PERL%%/%%PERL_ARCH%%/Cyrus/IMAP/Admin.pm