aboutsummaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2015-03-12 10:23:33 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2015-03-12 10:23:33 +0000
commit560a24304a25e9a814e61e442745159e6e502ccd (patch)
tree925070ebd8a00ab0bdf287fb8fa182a62967a876 /mail
parent18e951328e0b0af40fdb9df6b674e48187a2c34c (diff)
downloadports-560a24304a25e9a814e61e442745159e6e502ccd.tar.gz
ports-560a24304a25e9a814e61e442745159e6e502ccd.zip
Notes
Diffstat (limited to 'mail')
-rw-r--r--mail/Makefile1
-rw-r--r--mail/cyrus-imapd25/Makefile254
-rw-r--r--mail/cyrus-imapd25/distinfo2
-rw-r--r--mail/cyrus-imapd25/files/cyrus-imapd-man.conf1
-rw-r--r--mail/cyrus-imapd25/files/extra-patch-cmulocal__sasl2.m422
-rw-r--r--mail/cyrus-imapd25/files/imapd.conf418
-rw-r--r--mail/cyrus-imapd25/files/imapd.in36
-rw-r--r--mail/cyrus-imapd25/files/patch-configure22
-rw-r--r--mail/cyrus-imapd25/files/patch-imap__http_client.h13
-rw-r--r--mail/cyrus-imapd25/files/patch-imap__httpd.h13
-rw-r--r--mail/cyrus-imapd25/files/patch-lib__imapoptions22
-rw-r--r--mail/cyrus-imapd25/files/patch-lib__libcyr_cfg.c13
-rw-r--r--mail/cyrus-imapd25/files/patch-tools__mkimap38
-rw-r--r--mail/cyrus-imapd25/pkg-deinstall60
-rw-r--r--mail/cyrus-imapd25/pkg-descr21
-rw-r--r--mail/cyrus-imapd25/pkg-install61
-rw-r--r--mail/cyrus-imapd25/pkg-message8
-rw-r--r--mail/cyrus-imapd25/pkg-plist132
-rw-r--r--mail/websieve/Makefile10
19 files changed, 1144 insertions, 3 deletions
diff --git a/mail/Makefile b/mail/Makefile
index e0f6a1e5fb08..672a06a22b37 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -80,6 +80,7 @@
SUBDIR += cvsmail
SUBDIR += cyrus-imapd23
SUBDIR += cyrus-imapd24
+ SUBDIR += cyrus-imapd25
SUBDIR += cyrus2courier
SUBDIR += cyrus2dovecot
SUBDIR += davmail
diff --git a/mail/cyrus-imapd25/Makefile b/mail/cyrus-imapd25/Makefile
new file mode 100644
index 000000000000..09313fa3e879
--- /dev/null
+++ b/mail/cyrus-imapd25/Makefile
@@ -0,0 +1,254 @@
+# $FreeBSD$
+
+PORTNAME= cyrus-imapd
+PORTVERSION= 2.5.0
+#PORTREVISION= 0
+CATEGORIES= mail ipv6
+MASTER_SITES= ftp://ftp.cyrusimap.org/cyrus-imapd/ \
+ http://cyrusimap.org/releases/
+PKGNAMESUFFIX= 25
+
+MAINTAINER= ume@FreeBSD.org
+COMMENT= The cyrus mail server, supporting POP3 and IMAP4 protocols
+
+LICENSE= BSD4CLAUSE
+LICENSE_FILE= ${WRKSRC}/COPYRIGHT
+
+LIB_DEPENDS= libsasl2.so:${PORTSDIR}/security/cyrus-sasl2 \
+ libpcre.so:${PORTSDIR}/devel/pcre
+
+CONFLICTS= cyrus-1.* cyrus-imapd-2.[^5].* cyrus-imapd2[^5]-2.[^5].*
+
+PERLMAN= ${SITE_PERL_REL:S/site_perl\///}
+
+USE_RC_SUBR= imapd
+
+USES= perl5 libtool
+USE_OPENSSL= yes
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc \
+ --with-cyrus-prefix=${PREFIX}/cyrus \
+ --with-cyrus-user=${CYRUS_USER} \
+ --with-cyrus-group=${CYRUS_GROUP} \
+ --with-sasl=${LOCALBASE} \
+ --with-bdb=${BDB_LIB_NAME} \
+ --with-com_err \
+ --with-openssl=${OPENSSLBASE} \
+ --with-perl=${PERL5}
+CONFIGURE_ENV+= LIBS="-L${LOCALBASE}/lib"
+CPPFLAGS+= -I${LOCALBASE}/include
+MAKE_JOBS_UNSAFE= yes
+
+OPTIONS_DEFINE= AUTOCREATE BDB CLAMAV HTTP IDLED LDAP MURDER MYSQL \
+ NETSCAPEHACK NNTP PGSQL REPLICATION SNMP SQLITE DOCS \
+ EXAMPLES
+#OPTIONS_DEFINE+= DRAC
+OPTIONS_DEFAULT= BDB IDLED
+OPTIONS_SUB= yes
+AUTOCREATE_DESC= Enable autocreate support
+AUTOCREATE_CONFIGURE_ENABLE= autocreate
+BDB_USE= BDB=yes
+BDB_CONFIGURE_ON= --with-bdb-incdir=${BDB_INCLUDE_DIR} \
+ --with-bdb-libdir=${LOCALBASE}/lib
+CLAMAV_DESC= Use ClamAV
+CLAMAV_CONFIGURE_ON= --with-clamav=${LOCALBASE}
+CLAMAV_CONFIGURE_OFF= --with-clamav=no
+CLAMAV_LIB_DEPENDS= libclamav.so:${PORTSDIR}/security/clamav
+DRAC_DESC= Enable DRAC support
+DRAC_CONFIGURE_ON= --with-drac=${LOCALBASE}
+DRAC_BUILD_DEPENDS= ${LOCALBASE}/lib/libdrac.a:${PORTSDIR}/mail/drac
+HTTP_DESC= Enable HTTP
+HTTP_CONFIGURE_ENABLE= http
+HTTP_LIB_DEPENDS= libjansson.so:${PORTSDIR}/devel/jansson \
+ libical.so:${PORTSDIR}/devel/libical
+HTTP_USE= GNOME=libxml2 SQLITE=yes
+IDLED_DESC= Enable IMAP idled support
+IDLED_CONFIGURE_ENABLE= idled
+LDAP_DESC= Enable LDAP support (experimental)
+LDAP_USE= OPENLDAP=yes
+LDAP_CONFIGURE_ON= --with-ldap=${LOCALBASE}
+MURDER_DESC= Enable IMAP Murder support
+MURDER_CONFIGURE_ENABLE=murder
+MURDER_CFLAGS= ${PTHREAD_CFLAGS}
+MURDER_MAKE_ENV= PTHREAD_LIBS=${PTHREAD_LIBS}
+MYSQL_USE= MYSQL=yes
+MYSQL_CONFIGURE_ON= --with-mysql=yes \
+ --with-mysql-libdir=${LOCALBASE}/lib/mysql \
+ --with-mysql-incdir=${LOCALBASE}/include/mysql
+NETSCAPEHACK_DESC= Enable X-NETSCAPE extensions
+NETSCAPEHACK_CONFIGURE_ENABLE=netscapehack
+NNTP_DESC= Enable NNTP support
+NNTP_CONFIGURE_ENABLE= nntp
+PGSQL_USES= pgsql
+PGSQL_CONFIGURE_ON= --with-pgsql=${LOCALBASE}
+REPLICATION_DESC= Enable replication (experimental)
+REPLICATION_CONFIGURE_ENABLE=replication
+SNMP_LIB_DEPENDS= libnetsnmp.so:${PORTSDIR}/net-mgmt/net-snmp
+SNMP_CONFIGURE_ON= --with-snmp=${LOCALBASE}
+SNMP_CONFIGURE_OFF= --with-snmp=no
+SQLITE_USE= SQLITE=yes
+SQLITE_CONFIGURE_ON= --with-sqlite=${LOCALBASE}
+
+.include <bsd.port.pre.mk>
+
+.if ${PORT_OPTIONS:MBDB}
+INVALID_BDB_VER=2
+.else
+BDB_LIB_NAME= no
+.endif
+
+.if ${PORT_OPTIONS:MCLAMAV}
+IGNORE= CLAMAV is not available yet
+.endif
+
+.if ${PORT_OPTIONS:MHTTP}
+IGNORE= HTTP is not available yet
+.endif
+
+.if ${PORT_OPTIONS:MDRAC}
+IGNORE= DRAC is not available
+# .if ${OSVERSION} >= 800037
+# EXTRA_PATCHES+= ${FILESDIR}/extra-patch-cmulocal__sasl2.m4
+# .endif
+# USE_AUTOTOOLS= autoconf autoheader
+.endif
+
+.if ${OSVERSION} >= 900022
+PLIST_SUB+= MANCONF=""
+.else
+PLIST_SUB+= MANCONF="@comment "
+.endif
+
+.if !exists(/usr/lib/libkrb5.a)
+CONFIGURE_ARGS+=--disable-gssapi
+.endif
+
+CYRUS_USER?= cyrus
+CYRUS_GROUP?= cyrus
+
+MAN_MAN1= cyradm.1 imtest.1 installsieve.1 lmtptest.1 mupdatetest.1 \
+ nntptest.1 pop3test.1 sieveshell.1 sivtest.1 smtptest.1
+MAN_MAN3= imclient.3
+MAN_MAN5= cyrus.conf.5 imapd.conf.5 krb.equiv.5
+CYRUS_MAN3= Cyrus::IMAP.3 Cyrus::IMAP::Admin.3 Cyrus::IMAP::IMSP.3 \
+ Cyrus::IMAP::Shell.3 Cyrus::SIEVE::managesieve.3
+CYRUS_MAN8= arbitron.8 chk_cyrus.8 ctl_cyrusdb.8 ctl_deliver.8 \
+ ctl_mboxlist.8 cvt_cyrusdb.8 cyr_dbtool.8 cyr_df.8 \
+ cyr_expire.8 cyr_synclog.8 deliver.8 fud.8 idled.8 imapd.8 \
+ ipurge.8 lmtpd.8 master.8 mbexamine.8 mbpath.8 notifyd.8 \
+ pop3d.8 quota.8 reconstruct.8 rmnews.8 smmapd.8 squatter.8 \
+ sync_client.8 sync_reset.8 sync_server.8 timsieved.8 \
+ tls_prune.8 unexpunge.8
+.if ${PORT_OPTIONS:MHTTP}
+CYRUS_MAN8+= ctl_zoneinfo.8 httpd.8
+.endif
+.if ${PORT_OPTIONS:MNNTP}
+CYRUS_MAN8+= fetchnews.8 nntpd.8
+.endif
+
+DOCS= ag altnamespace anoncvs bugs changes faq feedback index \
+ install-admin-mb install-auth install-compile \
+ install-configure install-http install-murder \
+ install-netnews install-perf install-prereq \
+ install-replication install-sieve install-snmpmon \
+ install-testing install-upgrade install-virtdomains install \
+ mailing-list man notes os overview questions readme \
+ sieve-protocol sieve specs
+
+CONFS= cmu-frontend.conf prefork.conf cmu-backend.conf normal.conf \
+ small.conf
+
+PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
+PKGINSTALL= ${WRKDIR}/pkg-install
+
+.if ${PORT_OPTIONS:MDRAC}
+pre-patch:
+ ${PATCH} -d ${PATCH_WRKSRC} --forward --quiet -E -p1 \
+ < ${WRKSRC}/contrib/drac_auth.patch
+.endif
+
+post-patch:
+ @${SED} -e "s|%%CYRUS_USER%%|${CYRUS_USER}|g" \
+ -e "s|%%PREFIX%%|${PREFIX}|g" \
+ -e "s|%%EXAMPLESDIR%%|${EXAMPLESDIR}|g" \
+ ${.CURDIR}/pkg-install > ${PKGINSTALL}
+ @${SED} -e "s|%%CYRUS_USER%%|${CYRUS_USER}|g" \
+ -e "s|%%PREFIX%%|${PREFIX}|g" \
+ -e "s|%%EXAMPLESDIR%%|${EXAMPLESDIR}|g" \
+ ${.CURDIR}/pkg-deinstall > ${PKGDEINSTALL}
+ @${REINPLACE_CMD} -e "s|/etc/|${PREFIX}/etc/|" \
+ -e "s|%%CYRUS_USER%%|${CYRUS_USER}|g" \
+ -e "s|%%CYRUS_GROUP%%|${CYRUS_GROUP}|g" \
+ ${WRKSRC}/tools/mkimap
+ @${REINPLACE_CMD} -e "s|/etc/|${PREFIX}/etc/|g" \
+ -e "s|/usr/sieve|/var/imap/sieve|g" \
+ ${WRKSRC}/tools/masssievec
+ @${REINPLACE_CMD} -e 's|$$(mandir)/\(man[8]\)|${PREFIX}/cyrus/man/\1|g' \
+ ${WRKSRC}/Makefile.in
+ @${SED} -e "s|%%PREFIX%%|${PREFIX}|g;" \
+ ${FILESDIR}/cyrus-imapd-man.conf \
+ > ${WRKDIR}/cyrus-imapd-man.conf
+.if ${PORT_OPTIONS:MDRAC}
+ @${RM} -rf ${WRKSRC}/autom4te.cache
+.endif
+
+post-install:
+.for f in ${CYRUS_MAN3}
+ @${GZIP_CMD} ${STAGEDIR}${PREFIX}/${PERLMAN}/man/man3/${f}
+ @${ECHO_CMD} ${PERLMAN}/man/man3/${f}.gz >>${TMPPLIST}
+.endfor
+.for f in ${CYRUS_MAN8}
+ @${GZIP_CMD} ${STAGEDIR}${PREFIX}/cyrus/man/man8/${f}
+ @${ECHO_CMD} cyrus/man/man8/${f}.gz >>${TMPPLIST}
+.endfor
+ @${ECHO_CMD} "@dirrm cyrus/man/man8" >>${TMPPLIST}
+ @${ECHO_CMD} "@dirrm cyrus/man" >>${TMPPLIST}
+ @${ECHO_CMD} "@dirrm cyrus" >>${TMPPLIST}
+.if ${PORT_OPTIONS:MDOCS}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}/man
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}/text
+.for f in ${DOCS}
+ @${INSTALL_DATA} ${WRKSRC}/doc/${f}.html ${STAGEDIR}${DOCSDIR}
+ @${ECHO_CMD} share/doc/${PORTNAME}/${f}.html >>${TMPPLIST}
+.endfor
+.for f in ${MAN_MAN1} ${MAN_MAN3} ${MAN_MAN5} ${CYRUS_MAN8}
+ @if [ -f ${WRKSRC}/doc/man/${f}.html ]; then \
+ ${INSTALL_DATA} ${WRKSRC}/doc/man/${f}.html \
+ ${STAGEDIR}${DOCSDIR}/man/${f}.html; \
+ ${ECHO_CMD} share/doc/${PORTNAME}/man/${f}.html \
+ >>${TMPPLIST}; \
+ fi
+.endfor
+.for f in cyrusv2.mc murder.fig netnews.fig
+ @${INSTALL_DATA} ${WRKSRC}/doc/${f} ${STAGEDIR}${DOCSDIR}
+ @${ECHO_CMD} share/doc/${PORTNAME}/${f} >>${TMPPLIST}
+.endfor
+.for f in ${DOCS}
+ @${INSTALL_DATA} ${WRKSRC}/doc/text/${f} \
+ ${STAGEDIR}${DOCSDIR}/text
+ @${ECHO_CMD} share/doc/${PORTNAME}/text/${f} >>${TMPPLIST}
+.endfor
+ @${ECHO_CMD} "@dirrm share/doc/${PORTNAME}/text" >>${TMPPLIST}
+ @${ECHO_CMD} "@dirrm share/doc/${PORTNAME}/man" >>${TMPPLIST}
+ @${ECHO_CMD} "@dirrm share/doc/${PORTNAME}" >>${TMPPLIST}
+.endif
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ @${INSTALL_DATA} ${FILESDIR}/imapd.conf \
+ ${STAGEDIR}${EXAMPLESDIR}
+.for f in ${CONFS}
+ @${INSTALL_DATA} ${WRKSRC}/master/conf/${f} \
+ ${STAGEDIR}${EXAMPLESDIR}
+ @${ECHO_CMD} ${EXAMPLESDIR:S,^${PREFIX}/,,}/${f} >>${TMPPLIST}
+.endfor
+ @${ECHO_CMD} @dirrm ${EXAMPLESDIR:S,^${PREFIX}/,,} \
+ >>${TMPPLIST}
+ @${INSTALL_SCRIPT} ${WRKSRC}/tools/mkimap \
+ ${STAGEDIR}${PREFIX}/cyrus/bin/mkimap
+ @${INSTALL_SCRIPT} ${WRKSRC}/tools/masssievec \
+ ${STAGEDIR}${PREFIX}/cyrus/bin/masssievec
+.if ${OSVERSION} >= 900022
+ @${INSTALL_DATA} ${WRKDIR}/cyrus-imapd-man.conf \
+ ${STAGEDIR}${PREFIX}/etc/man.d/cyrus-imapd.conf
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/mail/cyrus-imapd25/distinfo b/mail/cyrus-imapd25/distinfo
new file mode 100644
index 000000000000..53f06a9ca161
--- /dev/null
+++ b/mail/cyrus-imapd25/distinfo
@@ -0,0 +1,2 @@
+SHA256 (cyrus-imapd-2.5.0.tar.gz) = 7706bf80758debce681ae96ee9eac8be181e1066773075cf340727b306fe0543
+SIZE (cyrus-imapd-2.5.0.tar.gz) = 3058797
diff --git a/mail/cyrus-imapd25/files/cyrus-imapd-man.conf b/mail/cyrus-imapd25/files/cyrus-imapd-man.conf
new file mode 100644
index 000000000000..b7ba70fcce77
--- /dev/null
+++ b/mail/cyrus-imapd25/files/cyrus-imapd-man.conf
@@ -0,0 +1 @@
+MANPATH %%PREFIX%%/cyrus/man
diff --git a/mail/cyrus-imapd25/files/extra-patch-cmulocal__sasl2.m4 b/mail/cyrus-imapd25/files/extra-patch-cmulocal__sasl2.m4
new file mode 100644
index 000000000000..53131668fcfd
--- /dev/null
+++ b/mail/cyrus-imapd25/files/extra-patch-cmulocal__sasl2.m4
@@ -0,0 +1,22 @@
+Index: cmulocal/sasl2.m4
+diff -u cmulocal/sasl2.m4.orig cmulocal/sasl2.m4
+--- cmulocal/sasl2.m4.orig 2009-05-20 21:24:48.000000000 +0900
++++ cmulocal/sasl2.m4 2009-12-22 00:31:16.153536453 +0900
+@@ -105,7 +105,7 @@
+ if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then
+ gss_failed=0
+ AC_CHECK_LIB(gssapi,gss_unwrap,gss_impl="heimdal",gss_failed=1,
+- ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET})
++ ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET} -lhx509)
+ if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then
+ gss_impl="failed"
+ fi
+@@ -173,7 +173,7 @@
+ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}"
+ elif test "$gss_impl" = "heimdal"; then
+ CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL"
+- GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err"
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err -lhx509"
+ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_STATIC_LIBS $gssapi_dir/libgssapi.a $gssapi_dir/libkrb5.a $gssapi_dir/libasn1.a $gssapi_dir/libroken.a $gssapi_dir/libcom_err.a ${LIB_CRYPT}"
+ elif test "$gss_impl" = "cybersafe03"; then
+ # Version of CyberSafe with two libraries
diff --git a/mail/cyrus-imapd25/files/imapd.conf b/mail/cyrus-imapd25/files/imapd.conf
new file mode 100644
index 000000000000..e9fde1eb3fa0
--- /dev/null
+++ b/mail/cyrus-imapd25/files/imapd.conf
@@ -0,0 +1,418 @@
+#
+# $FreeBSD$
+#
+# Sample configurations file for Cyrus IMAPd
+# Most lines in this file are commented; in this case the default is used.
+# The commented lines (usually) contain the default value
+
+# The pathname of the IMAP configuration directory
+#
+configdirectory: /var/imap
+
+# The partition name used by default for new mailboxes
+#
+#defaultpartition: default
+
+# The directory for the different partitions
+#
+partition-default: /var/spool/imap
+
+# Use the UNIX separator character '/' for delimiting levels of
+# mailbox hierarchy. The default is to use the netnews separator
+# character '.'.
+#unixhierarchysep: no
+
+# Use the alternate IMAP namespace, where personal folders reside at
+# the same level in the hierarchy as INBOX.
+#
+#altnamespace: no
+
+# If using the alternate IMAP namespace, the prefix for the other
+# users namespace. The hierarchy delimiter will be automatically
+# appended.
+#
+#userprefix: Other Users
+
+# If using the alternate IMAP namespace, the prefix for the shared
+# namespace. The hierarchy delimiter will be automatically appended.
+#
+#sharedprefix: Shared Folders
+
+# The umask value used by various Cyrus IMAP programs
+#
+#umask: 077
+
+# This is the hostname visible in the greeting messages of the POP,
+# IMAP and LMTP daemons. If it is unset, then the result returned from
+# gethostname(2) is used.
+#
+#servername: <result returned by gethostname(2)>
+
+# Whether to allow anonymous logins
+#
+#allowanonymouslogin: no
+
+# Allow the use of cleartext passwords on the wire.
+#
+#allowplaintext: yes
+
+# The percent of quota utilization over which the server generates
+# warnings.
+#
+#quotawarn: 90
+
+# The length of the IMAP server's inactivity autologout timer, in minutes.
+# The minimum value is 30, the default.
+#
+#timeout: 30
+
+# The interval (in seconds) for polling the mailbox for changes while
+# running the IDLE command. This option is used when idled can not be
+# contacted or when polling is used exclusively. The minimum value is
+# 1. A value of 0 will disable polling (and disable IDLE if polling
+# is the only method available).
+#
+#imapidlepoll: 60
+
+# If enabled, the server responds to an ID command with a parameter
+# list containing: version, vendor, support-url, os, os-version,
+# command, arguments, environment. Otherwise the server returns NIL.
+#
+#imapidresponse: yes
+
+# Set the length of the POP server's inactivity autologout timer, in
+# minutes. The minimum value is 10, the default.
+#
+#poptimeout: 10
+
+# Set the minimum amount of time the server forces users to wait between
+# successive POP logins, in minutes. The default is 0.
+#
+#popminpoll: 0
+
+# The number of days advertised as being the minimum a message may be
+# left on the POP server before it is deleted (via the CAPA command,
+# defined in the POP3 Extension Mechanism, which some clients may
+# support). "NEVER", the default, may be specified with a negative
+# number. The Cyrus POP3 server never deletes mail, no matter what
+# the value of this parameter is. However, if a site implements a
+# less liberal policy, it needs to change this parameter accordingly.
+#
+#popexpiretime: 0
+
+# The list of userids with administrative rights. Separate each userid
+# with a space. We recommend that administrator userids be separate from
+# standard userids. Sites using Kerberos authentication may use separate
+# "admin" instances.
+#
+#admins: <none>
+
+# A list of users and groups that are allowed to proxy for other
+# users, seperated by spaces. Any user listed in this will be allowed
+# to login for any other user: use with caution.
+#
+#proxyservers: <none>
+
+# The Access Control List (ACL) placed on a newly-created (non-user)
+# mailbox that does not have a parent mailbox.
+#
+#defaultacl: anyone lrs
+
+# The pathname of the news spool directory. Only used if the partition-news
+# configuration option is set.
+#
+#newsspool: <no default>
+
+# Prefix to be prepended to newsgroup names to make the corresponding IMAP
+# mailbox names.
+#
+#newsprefix: <none>
+
+# If nonzero, normal users may create their own IMAP accounts by creating
+# the mailbox INBOX. The user's quota is set to the value if it is positive,
+# otherwise the user has unlimited quota.
+#
+#autocreatequota: 0
+
+# Include notations in the protocol telemetry logs indicating the number
+# of seconds since the last command or response.
+#
+#logtimestamps: no
+
+# Number of seconds to pause after a successful plaintext login. For systems
+# that support strong authentication, this permits users to perceive a cost
+# of using plaintext passwords.
+#
+#plaintextloginpause: 0
+
+# The pathname of srvtab file containing the server's private key.
+# This option is passed to the SASL library and overrides its default
+# setting.
+#
+#srvtab: /etc/srvtab
+
+# The list of remote realms whose users may log in using cross-realm
+# authentications. Seperate each realm name by a space. This option is
+# only used when the server is compiled with Kerberos authentication.
+#
+#loginrealms: <none>
+
+# If enabled, any authentication identity which has a rights on a user's
+# INBOX may log in as that user. This option is only used when the server
+# is compiled with Kerberos authentication.
+#
+#loginuseacl: no
+
+# If enabled, lmtpd attempts to only write one copy of a message per
+# partition and create hard links, resulting in a potentially large
+# disk savings.
+#
+#singleinstancestore: yes
+
+# If enabled, lmtpd will suppress delivery of a message to a mailbox
+# if a message with the same message-id (or resent-message-id) is
+# recorded as having already been delivered to the mailbox. Records
+# the mailbox and message-id/resent-message-id of all successful
+# deliveries.
+#
+#duplicatesuppression: yes
+
+# If enabled, lmtpd rejects messages with 8-bit characters in the
+# headers. Otherwise, 8-bit characters are changed to `X'. (A proper
+# soultion to non-ASCII characters in headers is offered by RFC 2047
+# and its predecessors.)
+#
+#reject8bit: no
+
+# Maximum incoming LMTP message size. If set, lmtpd will reject
+# messages larger than maxmessagesize bytes. The default is to allow
+# messages of any size.
+#
+#maxmessagesize: <unlimited>
+
+# Userid used to deliver messages to shared folders. For example, if
+# set to "bb", email sent to "bb+shared.blah" would be delivered to
+# the "shared.blah" folder. By default, an email address of
+# "+shared.blah" would be used.
+#postuser: <none>
+
+# If enabled at compile time, this specifies a URL to reply when
+# Netscape asks the server where the mail administration HTTP server
+# is. The default is a site at CMU with a hopefully informative
+# message; administrators should set this to a local resource with
+# some information of greater use.
+#
+#netscapeurl: http://andrew2.andrew.cmu.edu/cyrus/imapd/netscapeadmin.html
+
+# Notifyd(8) method to use for "MAIL" notifications. If not set,
+# "MAIL" notifications are disabled.
+#
+#mailnotifier: <no default>
+
+# Notifyd(8) method to use for "SIEVE" notifications. If not set,
+# "SIEVE" notifications are disabled.
+#
+# This method is only used when no method is specified in the script.
+#
+#sievenotifier: <no default>
+
+# If enabled, lmtpd will look for Sieve scripts in user's home
+# directories: ~user/.sieve.
+#
+sieveusehomedir: false
+
+# If sieveusehomedir is false, this directory is searched for Sieve scripts.
+# The active Sieve script is s called "default", placed in the users sieve
+# sieve directory (ie. /var/imap/sieve/u/user).
+#
+sievedir: /var/imap/sieve
+
+# The pathname of the sendmail executable. Sieve uses sendmail for
+# sending rejections, redirects and vaca- tion responses.
+#
+#sendmail: /usr/sbin/sendmail
+
+# Username that is used as the 'From' address in rejection MDNs
+# produced by sieve.
+#
+#postmaster: postmaster
+
+# If enabled, the partitions will also be hashed, in addition to the hashing
+# done on configuration directories. This is recommended if one partition has
+# a very bushy mailbox tree.
+#
+#hashimapspool: false
+
+# Maximum size (in kilobytes) any sieve script can be, enforced at
+# submission by timsieved(8).
+#
+#sieve_maxscriptsize: 32
+
+# Maximum number of sieve scripts any user may have, enforced at
+# submission by timsieved(8).
+#
+#sieve_maxscripts: 5
+
+# The cyrusdb backend to use for mailbox annotations.
+# Allowed values: berkeley, skiplist
+#
+#annotation_db: skiplist
+
+# The cyrusdb backend to use for the duplicate delivery suppression
+# and sieve.
+# Allowed values: berkeley, berkeley-nosync, skiplist
+#
+#duplicate_db: skiplist
+
+# The cyrusdb backend to use for the mailbox list.
+# Allowed values: flat, berkeley, skiplist
+#
+#mboxlist_db: skiplist
+
+# The cyrusdb backend to use for the pts cache.
+# Allowed values: berkeley, skiplist
+#
+#ptscache_db: skiplist
+
+# The cyrusdb backend to use for the seen state.
+# Allowed values: flat, berkeley, skiplist
+#
+#seenstate_db: skiplist
+
+# The cyrusdb backend to use for the imap status cache.
+# Allowed values: berkeley, berkeley-nosync, berkeley-hash,
+# berkeley-hash-nosync, skiplist
+#
+#statuscache_db: skiplist
+
+# The cyrusdb backend to use for the subscriptions list.
+# Allowed values: flat, berkeley, skiplist
+#
+#subscription_db: flat
+
+# The cyrusdb backend to use for the TLS cache.
+# Allowed values: berkeley, berkeley-nosync, skiplist
+#
+#tlscache_db: skiplist
+
+# Maximum SSF (security strength factor) that the server will allow a
+# client to negotiate.
+#
+#sasl_maximum_layer: 256
+
+# The minimum SSF that the server will allow a client to negotiate. A
+# value of 1 requires integrity protection; any higher value requires
+# some amount of encryption.
+#
+#sasl_minimum_layer: 0
+
+# The mechanism used by the server to verify plaintext passwords. Possible
+# values include "auxprop" or "saslauthd"
+#
+sasl_pwcheck_method: auxprop
+
+# If enabled, the SASL library will automatically create authentication
+# secrets when given a plaintext password. See the SASL documentation.
+#
+#sasl_auto_transition: no
+
+# Whitespace separated list of mechanisms to allow (e.g. 'plain otp').
+# Used to restrict the mechanisms to a subset of the installed
+# plugins. The default is all available.
+#
+#sasl_mech_list: cram-md5 digest-md5
+
+# Location of the opiekeys file
+#
+#sasl_opiekeys: /etc/opiekeys
+
+# File containing the global certificate used for ALL services (imap,
+# pop3, lmtp).
+#
+#tls_server_cert: <none>
+
+# File containing the private key belonging to the global server
+# certificate.
+#
+#tls_server_key: <none>
+
+# File containing the certificate used for imap ONLY. If not
+# specified, the global certificate is used. A value of "disabled"
+# will disable SSL/TLS for imap.
+#
+#imap_tls_server_cert: <none>
+
+# File containing the private key belonging to the imap-specific
+# server certificate. If not specified, the global private key is
+# used. A value of "disabled" will disable SSL/TLS for imap.
+#
+#imap_tls_server_key: <none>
+
+# File containing the certificate used for pop3 ONLY. If not
+# specified, the global certificate is used. A value of "disabled"
+# will disable SSL/TLS for pop3.
+#
+#pop3_tls_server_cert: <none>
+
+# File containing the private key belonging to the pop3-specific
+# server certificate. If not specified, the global private key is
+# used. A value of "disabled" will disable SSL/TLS for pop3.
+#
+#pop3_tls_server_key: <none>
+
+# File containing the certificate used for lmtp ONLY. If not
+# specified, the global certificate is used. A value of "disabled"
+# will disable TLS for lmtp.
+#
+#lmtp_tls_server_cert: <none>
+
+# File containing the private key belonging to the lmtp-specific
+# server certificate. If not specified, the global private key is
+# used. A value of "disabled" will disable TLS for lmtp.
+#
+#lmtp_tls_server_key: <none>
+
+# File containing the certificate used for sieve ONLY. If not
+# specified, the global certificate is used. A value of "disabled"
+# will disable TLS for sieve.
+#
+#sieve_tls_server_cert: <none>
+
+# File containing the private key belonging to the sieve-specific
+# server certificate. If not specified, the global private key is
+# used. A value of "disabled" will disable TLS for sieve.
+#
+#sieve_tls_server_key: <none>
+
+# File containing one or more Certificate Authority (CA) certificates.
+#
+#tls_client_ca_file: <none>
+
+# Path to directory with certificates of CAs.
+#
+#tls_client_ca_dir: <none>
+
+# The length of time (in minutes) that a TLS session will be cached
+# for later reuse. The maximum value is 1440 (24 hours), the default.
+# A value of 0 will disable session caching.
+#
+#tls_session_timeout: 1440
+
+# The right that a user needs to delete a mailbox.
+#
+#deleteright: c
+
+# Unix domain socket that lmtpd listens on, used by deliver(8).
+#
+#lmtpsocket: /var/imap/socket/lmtp
+
+# Unix domain socket that idled listens on.
+#
+#idlesocket: /var/imap/socket/idle
+
+# Unix domain socket that the new mail notification daemon listens on.
+#
+#notifysocket: /var/imap/socket/notify
+
+#
+# EOF
diff --git a/mail/cyrus-imapd25/files/imapd.in b/mail/cyrus-imapd25/files/imapd.in
new file mode 100644
index 000000000000..1af0b40f32df
--- /dev/null
+++ b/mail/cyrus-imapd25/files/imapd.in
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+# Start or stop cyrus-imapd
+# $FreeBSD$
+
+# PROVIDE: cyrus_imapd
+# REQUIRE: DAEMON
+# BEFORE: mail
+# KEYWORD: shutdown
+
+# Define these cyrus_imapd_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/cyrus_imapd
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+[ -z "$cyrus_imapd_enable" ] && cyrus_imapd_enable="NO" # Enable imapd
+#cyrus_imapd_program="%%PREFIX%%/cyrus/bin/master" # Location of imapd
+[ -z "$cyrus_imapd_flags" ] && cyrus_imapd_flags="-d" # Flags to imapd program
+
+. /etc/rc.subr
+
+name="cyrus_imapd"
+rcvar=cyrus_imapd_enable
+command="%%PREFIX%%/cyrus/bin/master"
+pidfile="/var/run/cyrus-master.pid"
+required_files="%%PREFIX%%/etc/cyrus.conf %%PREFIX%%/etc/imapd.conf"
+stop_postcmd="cyrus_imapd_poststop"
+
+cyrus_imapd_poststop() {
+ /bin/rm -f ${pidfile}
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/mail/cyrus-imapd25/files/patch-configure b/mail/cyrus-imapd25/files/patch-configure
new file mode 100644
index 000000000000..4d3deee12dcf
--- /dev/null
+++ b/mail/cyrus-imapd25/files/patch-configure
@@ -0,0 +1,22 @@
+Index: configure
+diff -u configure.orig configure
+--- configure.orig 2010-10-18 21:36:00.000000000 +0900
++++ configure 2010-10-18 23:50:45.966557478 +0900
+@@ -9501,7 +9501,7 @@
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lgssapi ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET} $LIBS"
++LIBS="-lgssapi ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET} -lhx509 $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -9803,7 +9803,7 @@
+ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}"
+ elif test "$gss_impl" = "heimdal"; then
+ CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL"
+- GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err"
++ GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err -lhx509"
+ GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_STATIC_LIBS $gssapi_dir/libgssapi.a $gssapi_dir/libkrb5.a $gssapi_dir/libasn1.a $gssapi_dir/libroken.a $gssapi_dir/libcom_err.a ${LIB_CRYPT}"
+ elif test "$gss_impl" = "cybersafe03"; then
+ # Version of CyberSafe with two libraries
diff --git a/mail/cyrus-imapd25/files/patch-imap__http_client.h b/mail/cyrus-imapd25/files/patch-imap__http_client.h
new file mode 100644
index 000000000000..de2c02d4494f
--- /dev/null
+++ b/mail/cyrus-imapd25/files/patch-imap__http_client.h
@@ -0,0 +1,13 @@
+Index: imap/http_client.h
+diff -u imap/http_client.h.orig imap/http_client.h
+--- imap/http_client.h.orig 2014-07-23 05:25:28.000000000 +0900
++++ imap/http_client.h 2014-07-29 00:33:01.254781310 +0900
+@@ -57,7 +57,7 @@
+ unsigned char framing; /* Message framing */
+ unsigned char te; /* Transfer-Encoding */
+ unsigned max; /* Max allowed len */
+- ulong len; /* Content-Length */
++ unsigned long len; /* Content-Length */
+ struct buf payload; /* Payload */
+ };
+
diff --git a/mail/cyrus-imapd25/files/patch-imap__httpd.h b/mail/cyrus-imapd25/files/patch-imap__httpd.h
new file mode 100644
index 000000000000..2ca7ac3407a2
--- /dev/null
+++ b/mail/cyrus-imapd25/files/patch-imap__httpd.h
@@ -0,0 +1,13 @@
+Index: imap/httpd.h
+diff -u imap/httpd.h.orig imap/httpd.h
+--- imap/httpd.h.orig 2014-07-23 05:25:28.000000000 +0900
++++ imap/httpd.h 2014-07-29 00:31:32.053782690 +0900
+@@ -224,7 +224,7 @@
+
+ /* Meta-data for response body (payload & representation headers) */
+ struct resp_body_t {
+- ulong len; /* Content-Length */
++ unsigned long len; /* Content-Length */
+ struct range *range;/* Content-Range */
+ const char *fname; /* Content-Dispo */
+ unsigned char enc; /* Content-Encoding */
diff --git a/mail/cyrus-imapd25/files/patch-lib__imapoptions b/mail/cyrus-imapd25/files/patch-lib__imapoptions
new file mode 100644
index 000000000000..8c79e3b2e8f4
--- /dev/null
+++ b/mail/cyrus-imapd25/files/patch-lib__imapoptions
@@ -0,0 +1,22 @@
+Index: lib/imapoptions
+diff -u lib/imapoptions.orig lib/imapoptions
+--- lib/imapoptions.orig 2008-10-12 21:22:03.000000000 +0900
++++ lib/imapoptions 2008-10-12 21:23:33.000000000 +0900
+@@ -893,7 +893,7 @@
+ { "seenstate_db", "skiplist", STRINGLIST("flat", "berkeley", "berkeley-hash", "skiplist")}
+ /* The cyrusdb backend to use for the seen state. */
+
+-{ "sendmail", "/usr/lib/sendmail", STRING }
++{ "sendmail", "/usr/sbin/sendmail", STRING }
+ /* The pathname of the sendmail executable. Sieve invokes sendmail
+ for sending rejections, redirects and vacation responses. */
+
+@@ -956,7 +956,7 @@
+ /* If enabled, timsieved will expect a capability response after a successful
+ SASL authentication, per draft-martin-mangesieve-12.txt . */
+
+-{ "sievedir", "/usr/sieve", STRING }
++{ "sievedir", "/var/imap/sieve", STRING }
+ /* If sieveusehomedir is false, this directory is searched for Sieve
+ scripts. */
+
diff --git a/mail/cyrus-imapd25/files/patch-lib__libcyr_cfg.c b/mail/cyrus-imapd25/files/patch-lib__libcyr_cfg.c
new file mode 100644
index 000000000000..5cbb64001209
--- /dev/null
+++ b/mail/cyrus-imapd25/files/patch-lib__libcyr_cfg.c
@@ -0,0 +1,13 @@
+Index: lib/libcyr_cfg.c
+diff -u -p lib/libcyr_cfg.c.orig lib/libcyr_cfg.c
+--- lib/libcyr_cfg.c.orig Wed Mar 10 00:05:58 2004
++++ lib/libcyr_cfg.c Fri Feb 25 00:06:44 2005
+@@ -52,7 +52,7 @@
+ #include "libcyr_cfg.h"
+ #include "cyrusdb.h"
+
+-#if defined(__GNUC__) && __GNUC__ > 1
++#if defined(__GNUC__) && __GNUC__ > 1 && !defined(__INTEL_COMPILER)
+ /* We can use the GCC union constructor extension */
+ #define CFGVAL(t,v) (union cyrus_config_value)((t)(v))
+ #else
diff --git a/mail/cyrus-imapd25/files/patch-tools__mkimap b/mail/cyrus-imapd25/files/patch-tools__mkimap
new file mode 100644
index 000000000000..9ee1539e3776
--- /dev/null
+++ b/mail/cyrus-imapd25/files/patch-tools__mkimap
@@ -0,0 +1,38 @@
+Index: tools/mkimap
+diff -u tools/mkimap.orig tools/mkimap
+--- tools/mkimap.orig Fri Dec 2 07:30:22 2005
++++ tools/mkimap Sat Dec 10 14:08:11 2005
+@@ -90,6 +90,9 @@
+
+ $imapdconf = shift || "/etc/imapd.conf";
+
++$cyrus_user = $ENV{CYRUS_USER} || "%%CYRUS_USER%%";
++$cyrus_group = $ENV{CYRUS_GROUP} || "%%CYRUS_GROUP%%";
++
+ push @configs, $imapdconf;
+
+ while ($conf = shift @configs) {
+@@ -100,6 +103,7 @@
+
+ print "configuring $d...\n";
+
++mkdir $d, 0755;
+ chdir $d or die "couldn't change to $d";
+
+ mkdir "proc", 0755 || warn "can't create $d/proc: $!";
+@@ -110,12 +114,15 @@
+ mkdir "ptclient", 0755 || warn "can't create $d/ptclient: $!";
+ mkdir "sync", 0755 || warn "can't create $d/sync: $!";
+
++system "/usr/sbin/chown -R $cyrus_user:$cyrus_group .";
++
+ while ($part = shift @parts) {
+ print "creating $part...\n";
+ mkdir $part, 0755 || warn "can't create $part: $!";
+ chdir $part or die "couldn't change to partition $part";
+ mkdir "stage.", 0755 || warn "can't create $part/stage.: $!";
+ mkdir "sync.", 0755 || warn "can't create $part/sync.: $!";
++ system "/usr/sbin/chown -R $cyrus_user:$cyrus_group $part";
+ }
+
+ print "done\n";
diff --git a/mail/cyrus-imapd25/pkg-deinstall b/mail/cyrus-imapd25/pkg-deinstall
new file mode 100644
index 000000000000..e0dd1b8bb7fc
--- /dev/null
+++ b/mail/cyrus-imapd25/pkg-deinstall
@@ -0,0 +1,60 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# Created by: hetzels@westbend.net
+
+#set -vx
+
+PKG_BATCH=${BATCH:=NO}
+PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%}
+EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%}
+CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%}
+
+checkfile() {
+ diff -bBqw $1 $2 >/dev/null 2>&1
+ case $? in
+ 0) # config file exists, but is the same
+ rm $1
+ ;;
+ 1) # config file exists and differs
+ ;;
+ *) # no config file exists
+ ;;
+ esac
+}
+
+#
+# Modify the 'cyrus' user created from the cyrus-sasl port
+#
+
+modify_cyrus_user() {
+ USER=${CYRUS_USER}
+ PW=/usr/sbin/pw
+ if [ -x /usr/sbin/nologin ]; then
+ shell=/usr/sbin/nologin
+ elif [ -x /sbin/nologin ]; then
+ shell=/sbin/nologin
+ else
+ shell=/nonexistent
+ fi
+ uhome=/nonexistent
+
+ if ! ${PW} mod user ${USER} -d "${uhome}" -s "${shell}"; then
+ echo "*** Failed to update user \`${USER}'."
+ else
+ echo "*** Updated user \`${USER}'."
+ fi
+}
+
+case $2 in
+ DEINSTALL)
+ cd ${PKG_PREFIX}
+ checkfile ${PKG_PREFIX}/etc/imapd.conf ${EXAMPLESDIR}/imapd.conf
+ checkfile ${PKG_PREFIX}/etc/cyrus.conf ${EXAMPLESDIR}/normal.conf
+ ;;
+ POST-DEINSTALL)
+ modify_cyrus_user
+ ;;
+
+esac
diff --git a/mail/cyrus-imapd25/pkg-descr b/mail/cyrus-imapd25/pkg-descr
new file mode 100644
index 000000000000..638cc9ef9894
--- /dev/null
+++ b/mail/cyrus-imapd25/pkg-descr
@@ -0,0 +1,21 @@
+The Cyrus IMAP (Internet Message Access Protocol) server provides access to
+personal mail and system-wide bulletin boards through the IMAP protocol.
+The Cyrus IMAP server is a scaleable enterprise mail system designed for use
+from small to large enterprise environments using standards-based
+technologies.
+
+A full Cyrus IMAP implementation allows a seamless mail and bulletin board
+environment to be set up across multiple servers. It differs from other
+IMAP server implementations in that it is run on "sealed" servers, where
+users are not normally 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 software using the IMAP, POP3, or KPOP
+protocols.
+
+The private mailbox database design gives the server large advantages in
+efficiency, scalability, and administratability. Multiple concurrent
+read/write connections to the same mailbox are permitted. The server
+supports access control lists on mailboxes and storage quotas on mailbox
+hierarchies.
+
+WWW: http://www.cyrusimap.org/
diff --git a/mail/cyrus-imapd25/pkg-install b/mail/cyrus-imapd25/pkg-install
new file mode 100644
index 000000000000..684745f23b01
--- /dev/null
+++ b/mail/cyrus-imapd25/pkg-install
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+#set -vx
+
+PKG_BATCH=${BATCH:=NO}
+PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%}
+EXAMPLESDIR=${EXAMPLESDIR:=%%EXAMPLESDIR%%}
+CYRUS_USER=${CYRUS_USER:=%%CYRUS_USER%%}
+
+#
+# Modify the 'cyrus' user created from the cyrus-sasl port
+#
+
+modify_cyrus_user() {
+ USER=${CYRUS_USER}
+ PW=/usr/sbin/pw
+ shell=/bin/csh
+ uhome=${PKG_PREFIX}/cyrus
+
+ if ! ${PW} mod user ${USER} -d "${uhome}" -s "${shell}"; then
+ echo "*** Failed to update user \`${USER}'."
+ else
+ echo "*** Updated user \`${USER}'."
+ fi
+}
+
+
+checkfile() {
+ diff -bBqw $1 $2 >/dev/null 2>&1
+ case $? in
+ 0) # config file exists, but is the same
+ ;;
+ 1) # config file exists and differs
+ echo "** Make sure $1 is in sync with this version";
+ echo " of the port. See $1.dist for details.";
+ ;;
+ *) # no config file exists, copy it
+ install -c -m 644 $2 $1
+ ;;
+ esac
+}
+
+case $2 in
+ PRE-INSTALL)
+ ;;
+
+ POST-INSTALL)
+ modify_cyrus_user
+ cd ${PKG_PREFIX}
+ checkfile ${PKG_PREFIX}/etc/imapd.conf ${EXAMPLESDIR}/imapd.conf
+ checkfile ${PKG_PREFIX}/etc/cyrus.conf ${EXAMPLESDIR}/normal.conf
+ if grep 'sieve' /etc/services; then
+ echo
+ else
+ echo
+ echo "** Please add an entry for the sieve protocol (4190/tcp)"
+ echo " to /etc/services"
+ echo
+ fi
+ ;;
+esac
diff --git a/mail/cyrus-imapd25/pkg-message b/mail/cyrus-imapd25/pkg-message
new file mode 100644
index 000000000000..ff816e46e925
--- /dev/null
+++ b/mail/cyrus-imapd25/pkg-message
@@ -0,0 +1,8 @@
+****************************************************************************
+
+To setup mail spool, modify /usr/local/etc/imapd.conf appropriately,
+then run /usr/local/cyrus/bin/mkimap.
+To run Cyrus IMAPd from startup, add cyrus_imapd_enable="YES" in your
+/etc/rc.conf.
+
+****************************************************************************
diff --git a/mail/cyrus-imapd25/pkg-plist b/mail/cyrus-imapd25/pkg-plist
new file mode 100644
index 000000000000..b301f567c74a
--- /dev/null
+++ b/mail/cyrus-imapd25/pkg-plist
@@ -0,0 +1,132 @@
+bin/cyradm
+bin/imtest
+bin/installsieve
+bin/lmtptest
+bin/mupdatetest
+bin/nntptest
+bin/pop3test
+bin/sieveshell
+bin/sivtest
+bin/smtptest
+bin/synctest
+cyrus/bin/arbitron
+cyrus/bin/chk_cyrus
+cyrus/bin/ctl_cyrusdb
+cyrus/bin/ctl_deliver
+cyrus/bin/ctl_mboxlist
+%%HTTP%%cyrus/bin/ctl_zoneinfo
+cyrus/bin/cvt_cyrusdb
+cyrus/bin/cyr_dbtool
+cyrus/bin/cyr_df
+cyrus/bin/cyr_expire
+cyrus/bin/cyr_sequence
+cyrus/bin/cyr_synclog
+cyrus/bin/cyr_userseen
+%%CLAMAV%%cyrus/bin/cyr_virusscan
+cyrus/bin/cyrdump
+%%HTTP%%cyrus/bin/dav_reconstruct
+cyrus/bin/deliver
+%%NNTP%%cyrus/bin/fetchnews
+cyrus/bin/fud
+%%HTTP%%cyrus/bin/httpd
+%%IDLED%%cyrus/bin/idled
+cyrus/bin/imapd
+cyrus/bin/ipurge
+cyrus/bin/lmtpd
+cyrus/bin/lmtpproxyd
+cyrus/bin/masssievec
+cyrus/bin/master
+cyrus/bin/mbexamine
+cyrus/bin/mbpath
+cyrus/bin/mkimap
+%%MURDER%%cyrus/bin/mupdate
+%%NNTP%%cyrus/bin/nntpd
+cyrus/bin/notifyd
+cyrus/bin/pop3d
+cyrus/bin/pop3proxyd
+cyrus/bin/proxyd
+%%LDAP%%cyrus/bin/ptdump
+%%LDAP%%cyrus/bin/ptexpire
+%%LDAP%%cyrus/bin/ptloader
+cyrus/bin/quota
+cyrus/bin/reconstruct
+cyrus/bin/sievec
+cyrus/bin/sieved
+cyrus/bin/smmapd
+cyrus/bin/squatter
+%%REPLICATION%%cyrus/bin/sync_client
+%%REPLICATION%%cyrus/bin/sync_reset
+%%REPLICATION%%cyrus/bin/sync_server
+cyrus/bin/timsieved
+cyrus/bin/tls_prune
+cyrus/bin/unexpunge
+%%MANCONF%%etc/man.d/cyrus-imapd.conf
+include/cyrus/acl.h
+include/cyrus/assert.h
+include/cyrus/auth.h
+include/cyrus/bsearch.h
+include/cyrus/charset.h
+include/cyrus/crc32.h
+include/cyrus/cyr_lock.h
+include/cyrus/cyrusdb.h
+include/cyrus/glob.h
+include/cyrus/gmtoff.h
+include/cyrus/hash.h
+include/cyrus/imapopts.h
+include/cyrus/imapurl.h
+include/cyrus/imclient.h
+include/cyrus/imparse.h
+include/cyrus/iptostring.h
+include/cyrus/libcyr_cfg.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/retry.h
+include/cyrus/signals.h
+include/cyrus/strarray.h
+include/cyrus/strhash.h
+include/cyrus/stristr.h
+include/cyrus/sysexits.h
+include/cyrus/xmalloc.h
+lib/libcyrus.so
+lib/libcyrus.so.0
+lib/libcyrus.so.0.0.0
+lib/libcyrus_com_err.so
+lib/libcyrus_com_err.so.0
+lib/libcyrus_com_err.so.0.0.0
+lib/libcyrus_imap.so
+lib/libcyrus_imap.so.0
+lib/libcyrus_imap.so.0.0.0
+lib/libcyrus_min.so
+lib/libcyrus_min.so.0
+lib/libcyrus_min.so.0.0.0
+lib/libcyrus_sieve.so
+lib/libcyrus_sieve.so.0
+lib/libcyrus_sieve.so.0.0.0
+%%SITE_ARCH%%/Cyrus/IMAP/Admin.pm
+%%SITE_ARCH%%/Cyrus/IMAP/IMSP.pm
+%%SITE_ARCH%%/Cyrus/IMAP/Shell.pm
+%%SITE_ARCH%%/Cyrus/IMAP.pm
+%%SITE_ARCH%%/Cyrus/SIEVE/managesieve.pm
+%%SITE_ARCH%%/auto/Cyrus/IMAP/IMAP.so
+%%SITE_ARCH%%/auto/Cyrus/SIEVE/managesieve/managesieve.so
+man/man1/cyradm.1.gz
+man/man1/imtest.1.gz
+man/man1/installsieve.1.gz
+man/man1/lmtptest.1.gz
+man/man1/mupdatetest.1.gz
+man/man1/nntptest.1.gz
+man/man1/pop3test.1.gz
+man/man1/sieveshell.1.gz
+man/man1/sivtest.1.gz
+man/man1/smtptest.1.gz
+man/man3/imclient.3.gz
+man/man5/cyrus.conf.5.gz
+man/man5/imapd.conf.5.gz
+man/man5/krb.equiv.5.gz
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/imapd.conf
+@dirrm include/cyrus
+@dirrm cyrus/bin
diff --git a/mail/websieve/Makefile b/mail/websieve/Makefile
index e09b9b50e51d..f78ea96ae510 100644
--- a/mail/websieve/Makefile
+++ b/mail/websieve/Makefile
@@ -22,15 +22,19 @@ NO_BUILD= yes
# highest select version number. If no Cyrus IMAPd versions are
# selected, use some generic IMAP modules
-OPTIONS_DEFINE= CYRUS_IMAPD_23 CYRUS_IMAPD_24
-OPTIONS_DEFAULT= CYRUS_IMAPD_23
+OPTIONS_DEFINE= CYRUS_IMAPD_23 CYRUS_IMAPD_24 CYRUS_IMAPD_25
+OPTIONS_DEFAULT= CYRUS_IMAPD_24
CYRUS_IMAPD_23_DESC= With Cyrus IMAPd version 2.3.x
CYRUS_IMAPD_24_DESC= With Cyrus IMAPd version 2.4.x
+CYRUS_IMAPD_25_DESC= With Cyrus IMAPd version 2.5.x
.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MCYRUS_IMAPD_24}
+.if ${PORT_OPTIONS:MCYRUS_IMAPD_25}
+RUN_DEPENDS+= cyradm:${PORTSDIR}/mail/cyrus-imapd25
+FUNCLIB_PL= funclib.cyrus
+.elif ${PORT_OPTIONS:MCYRUS_IMAPD_24}
RUN_DEPENDS+= cyradm:${PORTSDIR}/mail/cyrus-imapd24
FUNCLIB_PL= funclib.cyrus
.elif ${PORT_OPTIONS:MCYRUS_IMAPD_23}