diff options
Diffstat (limited to 'mail/courier-imap')
-rw-r--r-- | mail/courier-imap/Makefile | 92 | ||||
-rw-r--r-- | mail/courier-imap/distinfo | 7 | ||||
-rw-r--r-- | mail/courier-imap/files/courier-imap.sh | 175 | ||||
-rw-r--r-- | mail/courier-imap/patches/patch-aa | 21 | ||||
-rw-r--r-- | mail/courier-imap/patches/patch-ab | 13 | ||||
-rw-r--r-- | mail/courier-imap/patches/patch-ac | 12 | ||||
-rw-r--r-- | mail/courier-imap/pkg/DEINSTALL | 132 | ||||
-rw-r--r-- | mail/courier-imap/pkg/DESCR | 13 | ||||
-rw-r--r-- | mail/courier-imap/pkg/INSTALL | 90 | ||||
-rw-r--r-- | mail/courier-imap/pkg/PLIST | 69 |
10 files changed, 624 insertions, 0 deletions
diff --git a/mail/courier-imap/Makefile b/mail/courier-imap/Makefile new file mode 100644 index 00000000000..0937a55b630 --- /dev/null +++ b/mail/courier-imap/Makefile @@ -0,0 +1,92 @@ +# $NetBSD: Makefile,v 1.1.1.1 2001/07/31 22:48:50 jlam Exp $ + +DISTNAME= courier-imap-1.3.8.2 +CATEGORIES= mail +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=courier/} + +MAINTAINER= jlam@netbsd.org +HOMEPAGE= http://www.inter7.com/courierimap/ +COMMENT= IMAP server for access to Maildir-style mailboxes + +USE_BUILDLINK_ONLY= # defined +USE_GMAKE= # defined +USE_PERL5= # defined +REPLACE_PERL= sysconftool + +GNU_CONFIGURE= # defined +CONFIGURE_ARGS+= --datadir=${PREFIX}/share/courier +CONFIGURE_ARGS+= --libexecdir=${PREFIX}/libexec/courier +CONFIGURE_ARGS+= --sysconfdir=/etc/courier +CONFIGURE_ARGS+= --enable-unicode +CONFIGURE_ARGS+= --with-db=db +CONFIGURE_ARGS+= --with-userdb=/etc/courier/userdb +CONFIGURE_ENV+= OPENSSL=${BUILDLINK_PREFIX.openssl}/bin/openssl +CONFIGURE_ENV+= SSLCERTS=${SSLCERTS} + +INSTALL_TARGET= install-strip + +.include "../../mk/bsd.prefs.mk" + +#.if defined(USE_PAM) +#.include "../../security/PAM/buildlink.mk" +#.endif + +.if ${OPSYS} == "SunOS" +.include "../../databases/db/buildlink.mk" +CPPFLAGS+= -I${BUILDLINK_DIR}/include/db2 +.endif + +DEINSTALL_FILE= ${WRKDIR}/DEINSTALL +INSTALL_FILE= ${WRKDIR}/INSTALL + +FILES_SUBST= SSLCERTS=${SSLCERTS} +FILES_SUBST+= CAT=${CAT:Q} +FILES_SUBST+= CHMOD=${CHMOD:Q} +FILES_SUBST+= CHOWN=${CHOWN:Q} +FILES_SUBST+= CMP=${CMP:Q} +FILES_SUBST+= CP=${CP:Q} +FILES_SUBST+= MKDIR=${MKDIR:Q} +FILES_SUBST+= RM=${RM:Q} +FILES_SUBST+= RMDIR=${RMDIR:Q} +FILES_SUBST+= TRUE=${TRUE:Q} +FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} + +post-extract: + cd ${WRKSRC}; for file in \ + imap/imapd.dist.in imap/imapd-ssl.dist.in \ + imap/pop3d.dist.in imap/pop3d-ssl.dist.in \ + imap/mkimapdcert.in imap/mkpop3dcert.in; \ + do \ + ${MV} -f $${file} $${file}.fixme; \ + ${SED} -e "s|^IMAPDSTART=.*|IMAPDSTART=YES|g" \ + -e "s|^IMAPDSSLSTART=.*|IMAPDSSLSTART=YES|g" \ + -e "s|^POP3DSTART=.*|POP3DSTART=YES|g" \ + -e "s|^POP3DSSLSTART=.*|POP3DSSLSTART=YES|g" \ + -e "s|@datadir@/imapd.pem|@SSLCERTS@/imapd.pem|g" \ + -e "s|@datadir@/imapd.rand|@sysconfdir@/imapd.rand|g" \ + -e "s|@datadir@/pop3d.pem|@SSLCERTS@/pop3d.pem|g" \ + -e "s|@datadir@/pop3d.rand|@sysconfdir@/pop3d.rand|g" \ + $${file}.fixme > $${file}; \ + if [ -x $${file}.fixme ]; then \ + ${CHMOD} +x $${file}; \ + fi; \ + ${RM} $${file}.fixme; \ + done + +pre-install: + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE} + +post-install: + ${INSTALL_SCRIPT} ${WRKSRC}/sysconftool ${PREFIX}/sbin + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/courier + ${INSTALL_DATA} ${WRKSRC}/imap/README \ + ${PREFIX}/share/doc/courier/README.imap + ${INSTALL_DATA} ${WRKSRC}/maildir/README.maildirquota.txt \ + ${PREFIX}/share/doc/courier/README.maildirquota + ${INSTALL_DATA} ${WRKSRC}/maildir/README.sharedfolders.txt \ + ${PREFIX}/share/doc/courier/README.sharedfolders + PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL + +.include "../../security/openssl/buildlink.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/mail/courier-imap/distinfo b/mail/courier-imap/distinfo new file mode 100644 index 00000000000..ba0ced8e10e --- /dev/null +++ b/mail/courier-imap/distinfo @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.1.1.1 2001/07/31 22:48:50 jlam Exp $ + +SHA1 (courier-imap-1.3.8.2.tar.gz) = 7e199dee58eb125df2b897f0621ffa5eb6d7fbde +Size (courier-imap-1.3.8.2.tar.gz) = 1131541 bytes +SHA1 (patch-aa) = caa86582c8b0915acb126969cbd69f88714f0f3a +SHA1 (patch-ab) = da50612c40a7882353eec09abeebb4ad89720d94 +SHA1 (patch-ac) = d9ad35518d72ff40735d7981cf7d35c8b78c0d32 diff --git a/mail/courier-imap/files/courier-imap.sh b/mail/courier-imap/files/courier-imap.sh new file mode 100644 index 00000000000..a5fd4232048 --- /dev/null +++ b/mail/courier-imap/files/courier-imap.sh @@ -0,0 +1,175 @@ +#!/bin/sh +# +# $NetBSD: courier-imap.sh,v 1.1.1.1 2001/07/31 22:48:51 jlam Exp $ +# +# PROVIDE: courier +# REQUIRE: DAEMON +# +# To start courier-imap at startup, copy this script to /etc/rc.d and set +# courier=YES in /etc/rc.conf. + +name="courier" +rcvar=$name +command="@PREFIX@/sbin/apachectl" + +# set defaults +if [ -r /etc/rc.conf ] +then + . /etc/rc.conf +else + eval ${rcvar}=YES +fi + +# $flags from environment overrides ${rcvar}_flags +if [ -n "${flags}" ] +then + eval ${rcvar}_flags="${flags}" +fi + +checkyesno() +{ + eval _value=\$${1} + case $_value in + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) return 0 ;; + [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) return 1 ;; + *) + echo "\$${1} is not set properly." + return 1 + ;; + esac +} + +cmd=${1:-start} +case ${cmd} in +force*) + cmd=${cmd#force} + eval ${rcvar}=YES + ;; +esac + +if checkyesno ${rcvar} +then + if [ -x ${command} ] + then + case ${cmd} in + restart|start|stop|status) + ${rcvar}_doit ${cmd} + ;; + *) + echo 1>&2 "Usage: $0 [restart|start|stop|status]" + exit 1 + ;; + esac + fi +fi + +prefix=/usr/pkg +exec_prefix=${prefix} + +case "$1" in +start) + cd / + . ${prefix}/etc/imapd + + echo -n "Starting Courier-IMAP server:" + + case x$IMAPDSTART in + x[yY]*) + # Start daemons. + ${exec_prefix}/libexec/imapd.rc start + echo -n " imap" + ;; + esac + + . ${prefix}/etc/imapd-ssl + case x$IMAPDSSLSTART in + x[yY]*) + if test -x $COURIERTLS + then + + # First time we start this, generate a dummy SSL certificate. + + if test ! -f ${prefix}/share/imapd.pem + then + echo -n " generating-SSL-certificate..." + ${prefix}/share/mkimapdcert >/dev/null 2>&1 + fi + ${exec_prefix}/libexec/imapd-ssl.rc start + echo -n " imap-ssl" + fi + ;; + esac + + POP3DSTART="" + POP3DSSLSTART="" + + if test -f ${prefix}/etc/pop3d + then + . ${prefix}/etc/pop3d + fi + + case x$POP3DSTART in + x[yY]*) + # Start daemons. + ${exec_prefix}/libexec/pop3d.rc start + echo -n " pop3" + ;; + esac + + if test -f ${prefix}/etc/pop3d-ssl + then + . ${prefix}/etc/pop3d-ssl + fi + + case x$POP3DSSLSTART in + x[yY]*) + if test -x $COURIERTLS + then + + # First time we start this, generate a dummy SSL certificate. + + if test ! -f ${prefix}/share/pop3d.pem + then + echo -n " generating-SSL-certificate..." + ${prefix}/share/mkpop3dcert >/dev/null 2>&1 + fi + ${exec_prefix}/libexec/pop3d-ssl.rc start + echo -n " pop3-ssl" + fi + ;; + esac + + echo "" + ;; +stop) + echo -n "Stopping Courier-IMAP server:" + . ${prefix}/etc/imapd + . ${prefix}/etc/imapd-ssl + ${exec_prefix}/libexec/imapd.rc stop + echo -n " imap" + if test -x $COURIERTLS + then + ${exec_prefix}/libexec/imapd-ssl.rc stop + echo -n " imap-ssl" + fi + + if test -f ${prefix}/etc/pop3d + then + ${exec_prefix}/libexec/pop3d.rc stop + echo -n " pop3" + + if test -x $COURIERTLS + then + ${exec_prefix}/libexec/pop3d-ssl.rc stop + echo -n " pop3-ssl" + fi + fi + + echo "" + ;; +restart) + $0 stop + $0 start + ;; +esac +exit 0 diff --git a/mail/courier-imap/patches/patch-aa b/mail/courier-imap/patches/patch-aa new file mode 100644 index 00000000000..04984621564 --- /dev/null +++ b/mail/courier-imap/patches/patch-aa @@ -0,0 +1,21 @@ +$NetBSD: patch-aa,v 1.1.1.1 2001/07/31 22:48:50 jlam Exp $ + +--- Makefile.in.orig Wed Jun 13 18:37:56 2001 ++++ Makefile.in +@@ -30,3 +30,3 @@ + datadir = @datadir@ +-sysconfdir = @sysconfdir@ ++sysconfdir = ${prefix}/share/examples/courier + sharedstatedir = @sharedstatedir@ +@@ -93,3 +93,3 @@ + sbin_PROGRAMS = imaplogin pop3login userdbpw +-man_MANS = makeuserdb.8 userdb.8 userdbpw.8 couriertcpd.8 deliverquota.8 maildirmake.1 imapd.8 mkimapdcert.8 mkpop3dcert.8 ++man_MANS = makeuserdb.8 userdb.8 userdbpw.8 couriertcpd.8 deliverquota.8 maildirmake.1 courier-imapd.8 mkimapdcert.8 mkpop3dcert.8 + +@@ -786,4 +786,4 @@ + +-imapd.8: imap/imapd.8 +- cp imap/imapd.8 . ++courier-imapd.8: imap/imapd.8 ++ cp imap/imapd.8 courier-imapd.8 + diff --git a/mail/courier-imap/patches/patch-ab b/mail/courier-imap/patches/patch-ab new file mode 100644 index 00000000000..eb306c6712d --- /dev/null +++ b/mail/courier-imap/patches/patch-ab @@ -0,0 +1,13 @@ +$NetBSD: patch-ab,v 1.1.1.1 2001/07/31 22:48:50 jlam Exp $ + +--- configure.orig Wed Jun 13 18:28:55 2001 ++++ configure +@@ -1689,8 +1689,6 @@ + fi + + +-INSTALL_DATA='${INSTALL} -m 0600' +- + # + # autoconf bug + # diff --git a/mail/courier-imap/patches/patch-ac b/mail/courier-imap/patches/patch-ac new file mode 100644 index 00000000000..8ae647eae26 --- /dev/null +++ b/mail/courier-imap/patches/patch-ac @@ -0,0 +1,12 @@ +$NetBSD: patch-ac,v 1.1.1.1 2001/07/31 22:48:50 jlam Exp $ + +--- imap/configure.orig Wed Jun 6 22:49:47 2001 ++++ imap/configure +@@ -2880,6 +2880,7 @@ + s%@HAVE_AUTH_TRUE@%$HAVE_AUTH_TRUE%g + s%@HAVE_AUTH_FALSE@%$HAVE_AUTH_FALSE%g + s%@NETLIBS@%$NETLIBS%g ++s%@SSLCERTS@%$SSLCERTS%g + + CEOF + EOF diff --git a/mail/courier-imap/pkg/DEINSTALL b/mail/courier-imap/pkg/DEINSTALL new file mode 100644 index 00000000000..0fcd5882742 --- /dev/null +++ b/mail/courier-imap/pkg/DEINSTALL @@ -0,0 +1,132 @@ +#!/bin/sh +# +# $NetBSD: DEINSTALL,v 1.1.1.1 2001/07/31 22:48:50 jlam Exp $ + +PKGNAME=$1 +STAGE=$2 + +CAT="@CAT@" +CMP="@CMP@" +RM="@RM@" +RMDIR="@RMDIR@" +TRUE="@TRUE@" + +SAMPLECONFDIR=${PKG_PREFIX}/share/examples/courier +CONFDIR=/etc/courier +SSLCERTS=@SSLCERTS@ +CONFFILES_1="imapd.dist imapd-ssl.dist pop3d.dist pop3d-ssl.dist" +CONFFILES_2="imapd.cnf pop3d.cnf" +CONFFILES_3="quotawarnmsg" +NONCONFFILES="userdb.dat userdbshadow.dat" +PEMFILES="imapd.pem pop3d.pem" + +case ${STAGE} in +DEINSTALL) + # Remove configuration files if they don't differ from the default + # config file. + # + GENERATED_CONFFILES= + for file in ${CONFFILES_1} + do + FILE=${SAMPLECONFDIR}/${file} + GENFILE=${CONFDIR}/${file%.dist} + GENERATED_CONFFILES="${GENERATED_CONFFILES} ${file%.dist}" + if ${CMP} -s ${GENFILE} ${FILE} + then + ${RM} -f ${GENFILE} + fi + done + for file in ${CONFFILES_2} + do + FILE=${CONFDIR}/${file} + SAMPLEFILE=${SAMPLECONFDIR}/${file} + if ${CMP} -s ${FILE} ${SAMPLEFILE} + then + ${RM} -f ${FILE} + fi + done + for file in ${CONFFILES_3} + do + FILE=${CONFDIR}/${file} + SAMPLEFILE=${SAMPLECONFDIR}/${file}.example + if ${CMP} -s ${FILE} ${SAMPLEFILE} + then + ${RM} -f ${FILE} + fi + done + ;; + +POST-DEINSTALL) + modified_files='' + for file in \ + ${GENERATED_CONFFILES} ${CONFFILES_1} \ + ${CONFFILES_2} ${CONFFILES_3} ${NONCONFFILES} + do + FILE=${CONFDIR}/${file} + if [ -f ${FILE} ] + then + modified_files="${modified_files} ${FILE}" + fi + done + for file in ${PEMFILES} + do + FILE=${SSLCERTS}/${file} + if [ -f ${FILE} ] + then + modified_files="${modified_files} ${FILE}" + fi + done + + ${RMDIR} ${CONFDIR} 2>/dev/null || ${TRUE} + + existing_dirs='' + for dir in ${CONFDIR} + do + if [ -d ${dir} ] + then + existing_dirs="${existing_dirs} ${dir}" + fi + done + + if [ -n "${modified_files}" -o -n "${existing_dirs}" ] + then + ${CAT} << EOF +=========================================================================== +If you won't be using ${PKGNAME} any longer, you may want to remove: +EOF + if [ -n "${modified_files}" ] + then + ${CAT} << EOF + + * the following files: + +EOF + for file in ${modified_files} + do + echo " ${file}" + done + fi + if [ -n "${existing_dirs}" ] + then + ${CAT} << EOF + + * the following directories: + +EOF + for dir in ${existing_dirs} + do + echo " ${dir}" + done + fi + ${CAT} << EOF +=========================================================================== +EOF + fi + ;; + +*) + echo "Unexpected argument: ${STAGE}" + exit 1 + ;; +esac +exit 0 diff --git a/mail/courier-imap/pkg/DESCR b/mail/courier-imap/pkg/DESCR new file mode 100644 index 00000000000..36913a71e03 --- /dev/null +++ b/mail/courier-imap/pkg/DESCR @@ -0,0 +1,13 @@ +Courier-IMAP is a server that provides IMAP access to Maildirs. This IMAP +server does NOT handle traditional mailbox files (/var/spool/mail, and +derivatives), it was written for the specific purpose of providing IMAP +access to Maildirs. + +"Maildir" is a directory-based mail storage format originally introduced +in the Qmail mail server, and adopted as an alternative mail storage +format by both Exim and Postfix. Courier-IMAP is popular on +Qmail/Exim/Postfix sites that are configured to use maildirs. The primary +advantage of maildirs is that multiple applications can access the same +Maildir simultaneously without requiring any kind of locking whatsoever. +It is a faster and more efficient way to store mail. It works particularly +well over NFS, which has a long history of locking-related woes. diff --git a/mail/courier-imap/pkg/INSTALL b/mail/courier-imap/pkg/INSTALL new file mode 100644 index 00000000000..813d44423f3 --- /dev/null +++ b/mail/courier-imap/pkg/INSTALL @@ -0,0 +1,90 @@ +#!/bin/sh +# +# $NetBSD: INSTALL,v 1.1.1.1 2001/07/31 22:48:50 jlam Exp $ + +PKGNAME=$1 +STAGE=$2 + +CAT="@CAT@" +CHMOD="@CHMOD@" +CHOWN="@CHOWN@" +CP="@CP@" +MKDIR="@MKDIR@" +RM="@RM@" + +SAMPLECONFDIR=${PKG_PREFIX}/share/examples/courier +CONFDIR=/etc/courier +CONFFILES_1="imapd.dist imapd-ssl.dist pop3d.dist pop3d-ssl.dist" +CONFFILES_2="imapd.cnf pop3d.cnf" +CONFFILES_3="quotawarnmsg" + +case ${STAGE} in +PRE-INSTALL) + ;; + +POST-INSTALL) + ${MKDIR} ${CONFDIR} + echo "Installing configuration files:" + for file in ${CONFFILES_2} + do + FILE=${CONFDIR}/${file} + SAMPLEFILE=${SAMPLECONFDIR}/${file} + if [ -f ${FILE} ] + then + echo " ${FILE} already exists" + else + echo " ${FILE}" + ${CP} ${SAMPLEFILE} ${FILE} + ${CHMOD} 600 ${FILE} + fi + done + for file in ${CONFFILES_3} + do + FILE=${CONFDIR}/${file} + SAMPLEFILE=${SAMPLECONFDIR}/${file}.example + if [ -f ${FILE} ] + then + echo " ${FILE} already exists" + else + echo " ${FILE}" + ${CP} ${SAMPLEFILE} ${FILE} + ${CHMOD} 644 ${FILE} + fi + done + + echo "" + echo "Updating configuration files:" + GENERATED_CONFFILES= + for file in ${CONFFILES_1} + do + FILE=${CONFDIR}/${file} + GENFILE=${CONFDIR}/${file%.dist} + SAMPLEFILE=${SAMPLECONFDIR}/${file} + ${CP} ${SAMPLEFILE} ${FILE} + GENERATED_CONFFILES="${GENERATED_CONFFILES} ${file%.dist}" + ${PKG_PREFIX}/sbin/sysconftool ${FILE} + ${CHMOD} 600 ${GENFILE} + ${RM} -f ${FILE} + done + ${CAT} << EOF + +=========================================================================== +Some files you might need to customize include the following: + +EOF + for file in ${GENERATED_CONFFILES} ${CONFFILES_2} ${CONFFILES_3} + do + FILE=${CONFDIR}/${file} + echo " ${FILE}" + done + ${CAT} << EOF +=========================================================================== +EOF + ;; + +*) + echo "Unexpected argument: ${STAGE}" + exit 1 + ;; +esac +exit 0 diff --git a/mail/courier-imap/pkg/PLIST b/mail/courier-imap/pkg/PLIST new file mode 100644 index 00000000000..9d413199ba1 --- /dev/null +++ b/mail/courier-imap/pkg/PLIST @@ -0,0 +1,69 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2001/07/31 22:48:50 jlam Exp $ +bin/couriertls +bin/imapd +bin/maildirmake +bin/pop3d +libexec/courier/authlib/authcram +libexec/courier/authlib/authcustom +libexec/courier/authlib/authpwd +libexec/courier/authlib/authuserdb +libexec/courier/couriertcpd +libexec/courier/deliverquota +libexec/courier/imapd-ssl.rc +libexec/courier/imapd.rc +libexec/courier/logger +libexec/courier/makedatprog +libexec/courier/pop3d-ssl.rc +libexec/courier/pop3d.rc +man/man1/maildirmake.1 +man/man8/authcram.8 +man/man8/authdaemon.8 +man/man8/authdaemond.8 +man/man8/authldap.8 +man/man8/authlib.8 +man/man8/authmysql.8 +man/man8/authpam.8 +man/man8/authpwd.8 +man/man8/authshadow.8 +man/man8/authuserdb.8 +man/man8/authvchkpw.8 +man/man8/courier-imapd.8 +man/man8/couriertcpd.8 +man/man8/deliverquota.8 +man/man8/makeuserdb.8 +man/man8/mkimapdcert.8 +man/man8/mkpop3dcert.8 +man/man8/pw2userdb.8 +man/man8/userdb.8 +man/man8/userdbpw.8 +man/man8/vchkpw2userdb.8 +sbin/imaplogin +sbin/makeuserdb +sbin/mkimapdcert +sbin/mkpop3dcert +sbin/pop3login +sbin/pw2userdb +sbin/sysconftool +sbin/userdb +sbin/userdbpw +sbin/vchkpw2userdb +share/courier/makeuserdb +share/courier/mkimapdcert +share/courier/mkpop3dcert +share/courier/pw2userdb +share/courier/userdb +share/courier/vchkpw2userdb +share/doc/courier/README.imap +share/doc/courier/README.maildirquota +share/doc/courier/README.sharedfolders +share/examples/courier/imapd-ssl.dist +share/examples/courier/imapd.cnf +share/examples/courier/imapd.dist +share/examples/courier/pop3d-ssl.dist +share/examples/courier/pop3d.cnf +share/examples/courier/pop3d.dist +share/examples/courier/quotawarnmsg.example +@unexec rmdir -p %D/share/examples/courier 2>/dev/null || true +@unexec rmdir -p %D/share/doc/courier 2>/dev/null || true +@unexec rmdir -p %D/share/courier 2>/dev/null || true +@unexec rmdir -p %D/libexec/courier 2>/dev/null || true |