summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorchris <chris@pkgsrc.org>2002-10-27 16:08:52 +0000
committerchris <chris@pkgsrc.org>2002-10-27 16:08:52 +0000
commit0b2798f0abd96533abb1695749ad1f58f1e592f8 (patch)
treeb3fa8f7fd202b0105cd04ae876372e4dae263ded /mail
parent5eec6dd6bc0cabfcc368affa901309a74b122761 (diff)
downloadpkgsrc-0b2798f0abd96533abb1695749ad1f58f1e592f8.tar.gz
Initial import of cyrus-imapd 2.1.9.
Cyrus imapd provides IMAP, POP3 and KPOP services for mail. It differs from other IMAP servers by providing a "sealed" server where users do not normally login directly to the server. The mailbox database is private to the Cyrus IMAP system. Cyrus also provides server side mail filtering using sieve (see RFC 3028)
Diffstat (limited to 'mail')
-rw-r--r--mail/cyrus-imapd21/DEINSTALL22
-rw-r--r--mail/cyrus-imapd21/DESCR7
-rw-r--r--mail/cyrus-imapd21/INSTALL26
-rw-r--r--mail/cyrus-imapd21/Makefile113
-rw-r--r--mail/cyrus-imapd21/PLIST142
-rw-r--r--mail/cyrus-imapd21/distinfo11
-rw-r--r--mail/cyrus-imapd21/files/cyrus.sh78
-rw-r--r--mail/cyrus-imapd21/files/imapd.conf16
-rw-r--r--mail/cyrus-imapd21/patches/patch-aa17
-rw-r--r--mail/cyrus-imapd21/patches/patch-ab12
-rw-r--r--mail/cyrus-imapd21/patches/patch-ac22
-rw-r--r--mail/cyrus-imapd21/patches/patch-ad13
-rw-r--r--mail/cyrus-imapd21/patches/patch-ae13
13 files changed, 492 insertions, 0 deletions
diff --git a/mail/cyrus-imapd21/DEINSTALL b/mail/cyrus-imapd21/DEINSTALL
new file mode 100644
index 00000000000..f7ba57134d4
--- /dev/null
+++ b/mail/cyrus-imapd21/DEINSTALL
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# $NetBSD: DEINSTALL,v 1.1.1.1 2002/10/27 16:08:53 chris Exp $
+
+IMAPDCONF=@IMAPDCONF@
+
+if [ -f ${IMAPDCONF} ]
+then
+ imap_dirs=` \
+ ${AWK} '/configdirectory:/ { print $2 }; \
+ /partition-.*:/ { print $2 }; \
+ /sievedir:/ { print $2 }' \
+ ${IMAPDCONF} \
+ `
+ for dir in ${imap_dirs}
+ do
+ if [ -d ${dir} ]
+ then
+ ALL_DIRS="${ALL_DIRS} ${dir}"
+ fi
+ done
+fi
diff --git a/mail/cyrus-imapd21/DESCR b/mail/cyrus-imapd21/DESCR
new file mode 100644
index 00000000000..84a40f3a62e
--- /dev/null
+++ b/mail/cyrus-imapd21/DESCR
@@ -0,0 +1,7 @@
+IMAP (Internet Message Access Protocol) is an Internet standards-track
+protocol for accessing messages (mail, bboards, news, etc). The Cyrus
+IMAP server differs from other IMAP server implementations in that it
+is generally intended to be run on "sealed" servers, where normal users
+are not permitted to log in. The mailbox database is stored in parts of
+the filesystem that are private to the Cyrus IMAP system. All user
+access to mail is through the IMAP, POP3, or KPOP protocols.
diff --git a/mail/cyrus-imapd21/INSTALL b/mail/cyrus-imapd21/INSTALL
new file mode 100644
index 00000000000..da31e548207
--- /dev/null
+++ b/mail/cyrus-imapd21/INSTALL
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $NetBSD: INSTALL,v 1.1.1.1 2002/10/27 16:08:52 chris Exp $
+
+case ${STAGE} in
+POST-INSTALL)
+ ${CAT} << EOF
+===========================================================================
+Please also refer to:
+
+ ${PKG_PREFIX}/share/doc/html/cyrus-imapd/install.html
+
+for more detailed instructions on setting up the environment before
+starting the Cyrus IMAP server. In particular, several services will
+probably need to be added to /etc/services.
+
+Note anyone upgrading from an earlier version of cyrus should read:
+
+ ${PKG_PREFIX}/share/doc/html/cyrus-imapd/install-upgrade.html
+
+Also note that cyrus-imapd now uses saslauthd rather then pwcheck by
+default.
+===========================================================================
+EOF
+ ;;
+esac
diff --git a/mail/cyrus-imapd21/Makefile b/mail/cyrus-imapd21/Makefile
new file mode 100644
index 00000000000..e1d66808312
--- /dev/null
+++ b/mail/cyrus-imapd21/Makefile
@@ -0,0 +1,113 @@
+# $NetBSD: Makefile,v 1.1.1.1 2002/10/27 16:08:52 chris Exp $
+
+DISTNAME= cyrus-imapd-2.1.9
+SVR4_PKGNAME= cimap
+CATEGORIES= mail
+MASTER_SITES= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/ \
+ ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/OLD-VERSIONS/imap/
+
+MAINTAINER= chris@netbsd.org
+HOMEPAGE= http://asg.web.cmu.edu/cyrus/imapd/
+COMMENT= Cyrus IMAP server
+
+USE_BUILDLINK2= YES
+GNU_CONFIGURE= YES
+
+.include "../../mk/bsd.prefs.mk"
+
+.if defined(CYRUS_USE_INET6) && ${CYRUS_USE_INET6} == "YES"
+PATCH_SITES= http://www.imasy.or.jp/~ume/ipv6/
+PATCHFILES= ${DISTNAME}-ipv6-20020902.diff.gz
+.endif
+
+# CYRUS_USER username of the Cyrus administrator
+# CYRUS_GROUP group of the Cyrus administrator
+#
+CYRUS_USER?= cyrus
+CYRUS_GROUP?= mail
+
+BUILD_DEFS+= CYRUS_USER CYRUS_GROUP
+FILES_SUBST+= CYRUS_USER=${CYRUS_USER}
+FILES_SUBST+= CYRUS_GROUP=${CYRUS_GROUP}
+
+CONFIGURE_ARGS+= --with-cyrus-user=${CYRUS_USER}
+CONFIGURE_ARGS+= --with-cyrus-group=${CYRUS_GROUP}
+CONFIGURE_ARGS+= --with-cyrus-prefix=${PREFIX}/cyrus
+CONFIGURE_ARGS+= --with-statedir=/var/run
+CONFIGURE_ARGS+= --with-dbdir=${BUILDLINK_PREFIX.db3}
+CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_PREFIX.openssl}
+CONFIGURE_ARGS+= --with-sasl=${BUILDLINK_PREFIX.cyrus-sasl}
+CONFIGURE_ARGS+= --without-ucdsnmp
+CONFIGURE_ARGS+= --without-notify
+CONFIGURE_ARGS+= --without-zephyr
+CONFIGURE_ARGS+= --enable-netscapehack
+
+CONFIGURE_ARGS+= --with-libwrap=${BUILDLINK_PREFIX.tcp_wrappers}
+CONFIGURE_ENV+= ac_cv_lib_wrap_request_init=yes
+
+.if exists(/usr/include/krb5/com_err.h)
+CPPFLAGS+= -I/usr/include/krb5
+CONFIGURE_ARGS+= --with-com_err=
+.else
+CONFIGURE_ARGS+= --with-com_err=yes
+.endif
+
+.if defined(KERBEROS) && ${KERBEROS} == 4
+PKG_USE_KERBEROS= # defined
+CONFIGURE_ARGS+= --with-auth=krb
+.else
+CONFIGURE_ARGS+= --with-auth=unix
+CONFIGURE_ARGS+= --without-krb
+.endif
+
+HTMLDIR= ${PREFIX}/share/doc/html/cyrus-imapd
+EGDIR= ${PREFIX}/share/examples/cyrus-imapd
+CONF_FILES= ${EGDIR}/imapd.conf ${PKG_SYSCONFDIR}/imapd.conf
+CONF_FILES+= ${EGDIR}/normal.conf ${PKG_SYSCONFDIR}/cyrus.conf
+RCD_SCRIPTS= cyrus
+FILES_SUBST+= IMAPDCONF=${PKG_SYSCONFDIR}/imapd.conf
+
+PERL5_PACKLIST= \
+ ${PERL5_SITEARCH}/auto/Cyrus/IMAP/.packlist \
+ ${PERL5_SITEARCH}/auto/Cyrus/SIEVE/managesieve/.packlist
+
+# Change references of some manpages from foo.8 to cyrus-foo.8 to avoid
+# manpage conflicts with other packages. Also change references to
+# "/etc/{cyrus,imapd}.conf" into "${PKG_SYSCONFDIR}/{cyrus,imapd}.conf".
+#
+post-patch:
+ cd ${WRKSRC}/man; \
+ for file in deliver.8 imapd.8 master.8 pop3d.8; do \
+ ${MV} $${file} cyrus-$${file}; \
+ ${SED} -e "s|\(\$$(srcdir)/\)\($${file}\)|\1cyrus-\2|g" \
+ Makefile.in > Makefile.in.fixed; \
+ ${MV} -f Makefile.in.fixed Makefile.in; \
+ done
+ files=`${FIND} ${WRKSRC} -type f -exec ${GREP} -l \
+ -e /etc/imapd\.conf -e /etc/cyrus\.conf {} \;`; \
+ for file in $${files}; do \
+ ${SED} -e "s|\(\\fB\)\($${name}($${suffix})\)|\1cyrus-\2|g" \
+ -e "s|\(\$$(srcdir)/\)\($${man}\)|\1cyrus-\2|g" \
+ -e "s|/etc/\(cyrus\.conf\)|${PKG_SYSCONFDIR}/\1|g" \
+ -e "s|/etc/\(imapd\.conf\)|${PKG_SYSCONFDIR}/\1|g" \
+ $${file} > $${file}.fixed; \
+ ${MV} -f $${file}.fixed $${file}; \
+ done
+
+post-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/tools/mkimap ${PREFIX}/cyrus/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/tools/translatesieve ${PREFIX}/cyrus/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/tools/rehash ${PREFIX}/cyrus/bin
+ ${INSTALL_DATA_DIR} ${EGDIR}
+ ${INSTALL_DATA} ${FILESDIR}/imapd.conf ${EGDIR}
+ cd ${WRKSRC}/master/conf; ${INSTALL_DATA} *.conf ${EGDIR}
+ ${INSTALL_DATA_DIR} ${HTMLDIR}
+ cd ${WRKSRC}/doc; ${INSTALL_DATA} *.html cyrusv2.mc ${HTMLDIR}
+
+.include "../../databases/db3/buildlink2.mk"
+.include "../../lang/perl5/buildlink2.mk"
+.include "../../security/cyrus-sasl2/buildlink2.mk"
+.include "../../security/openssl/buildlink2.mk"
+.include "../../security/tcp_wrappers/buildlink2.mk"
+.include "../../mk/bsd.pkg.install.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/mail/cyrus-imapd21/PLIST b/mail/cyrus-imapd21/PLIST
new file mode 100644
index 00000000000..0be4d5e0e7a
--- /dev/null
+++ b/mail/cyrus-imapd21/PLIST
@@ -0,0 +1,142 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2002/10/27 16:08:53 chris Exp $
+bin/imtest
+bin/installsieve
+bin/lmtptest
+bin/mupdatetest
+bin/pop3test
+bin/sieveshell
+bin/sivtest
+bin/smtptest
+cyrus/bin/chk_cyrus
+cyrus/bin/ctl_cyrusdb
+cyrus/bin/ctl_deliver
+cyrus/bin/ctl_mboxlist
+cyrus/bin/cvt_cyrusdb
+cyrus/bin/cyrdump
+cyrus/bin/deliver
+cyrus/bin/feedcyrus
+cyrus/bin/fud
+cyrus/bin/imapd
+cyrus/bin/ipurge
+cyrus/bin/lmtpd
+cyrus/bin/master
+cyrus/bin/mbpath
+cyrus/bin/mkimap
+cyrus/bin/notifyd
+cyrus/bin/pop3d
+cyrus/bin/quota
+cyrus/bin/reconstruct
+cyrus/bin/rehash
+cyrus/bin/squatter
+cyrus/bin/timsieved
+cyrus/bin/tls_prune
+cyrus/bin/translatesieve
+
+etc/rc.d/cyrus
+include/cyrus/acap.h
+include/cyrus/acl.h
+include/cyrus/assert.h
+include/cyrus/auth.h
+include/cyrus/bsearch.h
+include/cyrus/charset.h
+include/cyrus/cyrusdb.h
+include/cyrus/glob.h
+include/cyrus/gmtoff.h
+include/cyrus/hash.h
+include/cyrus/imapurl.h
+include/cyrus/imclient.h
+include/cyrus/imparse.h
+include/cyrus/iptostring.h
+include/cyrus/lock.h
+include/cyrus/lsort.h
+include/cyrus/map.h
+include/cyrus/mkgmtime.h
+include/cyrus/mpool.h
+include/cyrus/nonblock.h
+include/cyrus/parseaddr.h
+include/cyrus/prot.h
+include/cyrus/retry.h
+include/cyrus/rfc822date.h
+include/cyrus/stristr.h
+include/cyrus/sysexits.h
+include/cyrus/util.h
+include/cyrus/xmalloc.h
+lib/libacap.a
+lib/libcyrus.a
+man/man1/imtest.1
+man/man1/installsieve.1
+man/man1/lmtptest.1
+man/man1/mupdatetest.1
+man/man1/pop3test.1
+man/man1/sieveshell.1
+man/man1/sivtest.1
+man/man1/smtptest.1
+man/man3/imclient.3
+man/man5/cyrus.conf.5
+man/man5/imapd.conf.5
+man/man5/krb.equiv.5
+man/man8/arbitron.8
+man/man8/chk_cyrus.8
+man/man8/collectnews.8
+man/man8/ctl_cyrusdb.8
+man/man8/ctl_deliver.8
+man/man8/ctl_mboxlist.8
+man/man8/cvt_cyrusdb.8
+man/man8/cyrus-deliver.8
+man/man8/cyrus-imapd.8
+man/man8/cyrus-master.8
+man/man8/cyrus-pop3d.8
+man/man8/fud.8
+man/man8/idled.8
+man/man8/ipurge.8
+man/man8/lmtpd.8
+man/man8/mbpath.8
+man/man8/notifyd.8
+man/man8/quota.8
+man/man8/reconstruct.8
+man/man8/rmnews.8
+man/man8/squatter.8
+man/man8/syncnews.8
+man/man8/timsieved.8
+man/man8/tls_prune.8
+share/doc/html/cyrus-imapd/altnamespace.html
+share/doc/html/cyrus-imapd/anoncvs.html
+share/doc/html/cyrus-imapd/bugs.html
+share/doc/html/cyrus-imapd/changes.html
+share/doc/html/cyrus-imapd/cyrusv2.mc
+share/doc/html/cyrus-imapd/faq.html
+share/doc/html/cyrus-imapd/feedback.html
+share/doc/html/cyrus-imapd/index.html
+share/doc/html/cyrus-imapd/install-admin-mb.html
+share/doc/html/cyrus-imapd/install-auth.html
+share/doc/html/cyrus-imapd/install-compile.html
+share/doc/html/cyrus-imapd/install-configure.html
+share/doc/html/cyrus-imapd/install-murder.html
+share/doc/html/cyrus-imapd/install-perf.html
+share/doc/html/cyrus-imapd/install-prereq.html
+share/doc/html/cyrus-imapd/install-sieve.html
+share/doc/html/cyrus-imapd/install-snmpmon.html
+share/doc/html/cyrus-imapd/install-testing.html
+share/doc/html/cyrus-imapd/install-upgrade.html
+share/doc/html/cyrus-imapd/install.html
+share/doc/html/cyrus-imapd/mailing-list.html
+share/doc/html/cyrus-imapd/man.html
+share/doc/html/cyrus-imapd/notes.html
+share/doc/html/cyrus-imapd/os.html
+share/doc/html/cyrus-imapd/overview.html
+share/doc/html/cyrus-imapd/questions.html
+share/doc/html/cyrus-imapd/readme.html
+share/doc/html/cyrus-imapd/sieve-protocol.html
+share/doc/html/cyrus-imapd/sieve.html
+share/doc/html/cyrus-imapd/specs.html
+share/examples/cyrus-imapd/cmu-backend.conf
+share/examples/cyrus-imapd/cmu-frontend.conf
+share/examples/cyrus-imapd/imapd.conf
+share/examples/cyrus-imapd/normal.conf
+share/examples/cyrus-imapd/prefork.conf
+share/examples/cyrus-imapd/small.conf
+@dirrm share/examples/cyrus-imapd
+@dirrm share/doc/html/cyrus-imapd
+@dirrm include/cyrus
+@dirrm cyrus/bin
+@dirrm cyrus
diff --git a/mail/cyrus-imapd21/distinfo b/mail/cyrus-imapd21/distinfo
new file mode 100644
index 00000000000..d5e4bd7eb92
--- /dev/null
+++ b/mail/cyrus-imapd21/distinfo
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.1.1.1 2002/10/27 16:08:52 chris Exp $
+
+SHA1 (cyrus-imapd-2.1.9.tar.gz) = 7f9fe16e3cc5f67b97278f3fb2a194482570924a
+Size (cyrus-imapd-2.1.9.tar.gz) = 1633031 bytes
+SHA1 (cyrus-imapd-2.1.9-ipv6-20020902.diff.gz) = cb9beb12ac699c0a8e53476b9958a5c10b9f1738
+Size (cyrus-imapd-2.1.9-ipv6-20020902.diff.gz) = 30496 bytes
+SHA1 (patch-aa) = ef3630c2bafc752eb3af56815c44b3a2037d221a
+SHA1 (patch-ab) = 93f8b2a17a2f1267b891f89a6904af6dfc53c904
+SHA1 (patch-ac) = dd29b77fefee4c61dd1fac6d16284e0d1505d4ae
+SHA1 (patch-ad) = 3e07a4e5bd1e496e33f555c9a4004a0097595551
+SHA1 (patch-ae) = 371df78750ef75fba2ff42a17785aea4e3aea724
diff --git a/mail/cyrus-imapd21/files/cyrus.sh b/mail/cyrus-imapd21/files/cyrus.sh
new file mode 100644
index 00000000000..6372c2ccf2d
--- /dev/null
+++ b/mail/cyrus-imapd21/files/cyrus.sh
@@ -0,0 +1,78 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: cyrus.sh,v 1.1.1.1 2002/10/27 16:08:53 chris Exp $
+#
+# PROVIDE: cyrus
+# REQUIRE: DAEMON
+#
+# To start cyrus-imapd at startup, copy this script to /etc/rc.d and set
+# cyrus=YES in /etc/rc.conf.
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+rcd_dir=`@DIRNAME@ $0`
+
+name="cyrus"
+rcvar=$name
+command="@PREFIX@/cyrus/bin/master"
+command_args="& sleep 2"
+required_files="@PKG_SYSCONFDIR@/cyrus.conf @IMAPDCONF@"
+extra_commands="mkimap reload"
+
+mkimap_cmd="cyrus_mkimap"
+start_precmd="cyrus_prestart"
+
+cyrus_prestart()
+{
+ # Check to see if "configdirectory" is present before we start
+ # the Cyrus IMAP server. Otherwise, we run mkimap to generate
+ # the necessary directories.
+ #
+ if [ -f @IMAPDCONF@ ]; then
+ configdir=` \
+ @AWK@ '/^configdirectory:/ { print $2; exit };' \
+ @IMAPDCONF@ \
+ `
+ if [ -z "$configdir" ]; then
+ @ECHO@ "@IMAPDCONF@ missing 'configdirectory' setting"
+ exit 1
+ fi
+ if [ ! -d "$configdir" ]; then
+ $rcd_dir/cyrus mkimap
+ fi
+ fi
+}
+
+cyrus_mkimap()
+{
+ # Generate the prerequisite directory structure for Cyrus IMAP.
+ if [ -f @IMAPDCONF@ ]; then
+ imap_dirs=`
+ @AWK@ '/^configdirectory:/ { print $2 }; \
+ /^partition-.*:/ { print $2 }; \
+ /^sievedir:/ { print $2 }' \
+ @IMAPDCONF@ \
+ `
+ for dir in ${imap_dirs}; do
+ if [ ! -d ${dir} ]; then
+ @MKDIR@ ${dir}
+ @CHMOD@ 750 ${dir}
+ @CHOWN@ @CYRUS_USER@ ${dir}
+ @CHGRP@ @CYRUS_GROUP@ ${dir}
+ fi
+ done
+ @SU@ -m @CYRUS_USER@ -c "@PREFIX@/cyrus/bin/mkimap"
+ fi
+}
+
+if [ -f /etc/rc.subr -a -f /etc/rc.conf \
+ -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ @ECHO@ -n " ${name}"
+ eval ${start_precmd}
+ ${command} ${cyrus_flags} ${command_args}
+fi
diff --git a/mail/cyrus-imapd21/files/imapd.conf b/mail/cyrus-imapd21/files/imapd.conf
new file mode 100644
index 00000000000..dc276e32ea0
--- /dev/null
+++ b/mail/cyrus-imapd21/files/imapd.conf
@@ -0,0 +1,16 @@
+# $NetBSD: imapd.conf,v 1.1.1.1 2002/10/27 16:08:53 chris Exp $
+#
+# Cyrus IMAP server configuration file. Refer to imapd.conf(5) for
+# more options.
+
+configdirectory: /var/imap
+partition-default: /var/spool/imap
+sieveusehomedir: true
+hashimapspool: false
+
+admins: cyrus
+
+# Use the saslauthd daemon to verify plaintext passwords. Please ensure that
+# the saslauthd daemon is running before trying to authenticate.
+#
+sasl_pwcheck_method: saslauthd
diff --git a/mail/cyrus-imapd21/patches/patch-aa b/mail/cyrus-imapd21/patches/patch-aa
new file mode 100644
index 00000000000..8bcddc6f0b0
--- /dev/null
+++ b/mail/cyrus-imapd21/patches/patch-aa
@@ -0,0 +1,17 @@
+$NetBSD: patch-aa,v 1.1.1.1 2002/10/27 16:08:53 chris Exp $
+
+--- imap/lmtpengine.h~ Fri Aug 2 17:54:49 2002
++++ imap/lmtpengine.h Thu Aug 29 21:14:03 2002
+@@ -44,7 +44,12 @@
+ #define LMTPENGINE_H
+
+ /* configuration parameters */
++#ifdef __NetBSD__
++#include <paths.h>
++#define DEFAULT_SENDMAIL (_PATH_SENDMAIL)
++#else
+ #define DEFAULT_SENDMAIL ("/usr/lib/sendmail")
++#endif
+ #define DEFAULT_POSTMASTER ("postmaster")
+
+ #define SENDMAIL (config_getstring("sendmail", DEFAULT_SENDMAIL))
diff --git a/mail/cyrus-imapd21/patches/patch-ab b/mail/cyrus-imapd21/patches/patch-ab
new file mode 100644
index 00000000000..7c3c5e749b7
--- /dev/null
+++ b/mail/cyrus-imapd21/patches/patch-ab
@@ -0,0 +1,12 @@
+$NetBSD: patch-ab,v 1.1.1.1 2002/10/27 16:08:53 chris Exp $
+
+--- lib/cyrusdb_flat.c~ Mon Aug 5 13:46:15 2002
++++ lib/cyrusdb_flat.c Thu Aug 29 23:13:17 2002
+@@ -186,6 +186,7 @@
+ struct db *db = (struct db *) xmalloc(sizeof(struct db));
+ struct stat sbuf;
+
++ db->fname = NULL;
+ assert(fname && ret);
+
+ db->fd = open(fname, O_RDWR | O_CREAT, 0666);
diff --git a/mail/cyrus-imapd21/patches/patch-ac b/mail/cyrus-imapd21/patches/patch-ac
new file mode 100644
index 00000000000..c90667e7d69
--- /dev/null
+++ b/mail/cyrus-imapd21/patches/patch-ac
@@ -0,0 +1,22 @@
+$NetBSD: patch-ac,v 1.1.1.1 2002/10/27 16:08:53 chris Exp $
+
+--- imap/imapd.c.orig Fri Aug 30 16:34:24 2002
++++ imap/imapd.c Sat Aug 31 17:57:56 2002
+@@ -5801,7 +5801,7 @@
+ {
+ int i=0, j=0;
+ char tagbuf[128];
+- char c;
++ int c;
+ struct buf tag, cmd, tmp, user;
+ int r = 0;
+
+@@ -5916,7 +5916,7 @@
+ char *mailbox, char *acl_in)
+ {
+ int r = 0;
+- char c;
++ int c;
+ char tag[128];
+ int tagnum = 1;
+ char *rights, *nextid;
diff --git a/mail/cyrus-imapd21/patches/patch-ad b/mail/cyrus-imapd21/patches/patch-ad
new file mode 100644
index 00000000000..c59ee7d79ac
--- /dev/null
+++ b/mail/cyrus-imapd21/patches/patch-ad
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.1.1.1 2002/10/27 16:08:53 chris Exp $
+
+--- imap/mbpath.c.orig Sat Aug 31 17:59:21 2002
++++ imap/mbpath.c Sat Aug 31 17:59:35 2002
+@@ -97,7 +97,7 @@
+ {
+ char *path;
+ int rc, i, quiet = 0, stop_on_error=0;
+- char opt;
++ int opt;
+ char *alt_config = NULL;
+
+ while ((opt = getopt(argc, argv, "C:qs")) != EOF) {
diff --git a/mail/cyrus-imapd21/patches/patch-ae b/mail/cyrus-imapd21/patches/patch-ae
new file mode 100644
index 00000000000..5c29cc7a69d
--- /dev/null
+++ b/mail/cyrus-imapd21/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1.1.1 2002/10/27 16:08:53 chris Exp $
+
+--- imap/ipurge.c.orig Sat Aug 31 18:01:22 2002
++++ imap/ipurge.c Sat Aug 31 18:01:36 2002
+@@ -105,7 +105,7 @@
+
+ int
+ main (int argc, char *argv[]) {
+- char option;
++ int option;
+ char buf[MAX_MAILBOX_PATH];
+ char *alt_config = NULL;
+ int r;