aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanilla I. Shu <vanilla@FreeBSD.org>2002-09-01 14:17:07 +0000
committerVanilla I. Shu <vanilla@FreeBSD.org>2002-09-01 14:17:07 +0000
commitffd7a33f3b0da687ea2aa72836b933ba247dfd30 (patch)
treedd1b5c304a782fcad4f3208451186e72914c761f
parentfa4878f1885afe045b37baa3bf3a8a2205dea0d6 (diff)
downloadports-ffd7a33f3b0da687ea2aa72836b933ba247dfd30.tar.gz
ports-ffd7a33f3b0da687ea2aa72836b933ba247dfd30.zip
Add dovecot,
it is a secure and compact IMAP server which is in the early stages of developement. It supports Maildirs and mbox formats and much of the IMAP v4 protocol including SSL/TLS. IPv6 support is also included. PR: ports/42290 Submitted by: Dominic Marks <dominic_marks@btinternet.com> Some part by: me
Notes
Notes: svn path=/head/; revision=65408
-rw-r--r--mail/Makefile1
-rw-r--r--mail/dovecot-devel/Makefile53
-rw-r--r--mail/dovecot-devel/distinfo1
-rw-r--r--mail/dovecot-devel/files/dovecot-imapd.sh21
-rw-r--r--mail/dovecot-devel/files/patch-aa10
-rw-r--r--mail/dovecot-devel/files/patch-dovecot-example.conf47
-rw-r--r--mail/dovecot-devel/pkg-comment1
-rw-r--r--mail/dovecot-devel/pkg-descr5
-rw-r--r--mail/dovecot-devel/pkg-install70
-rw-r--r--mail/dovecot-devel/pkg-plist13
-rw-r--r--mail/dovecot/Makefile53
-rw-r--r--mail/dovecot/distinfo1
-rw-r--r--mail/dovecot/files/dovecot-imapd.sh21
-rw-r--r--mail/dovecot/files/patch-aa10
-rw-r--r--mail/dovecot/files/patch-dovecot-example.conf47
-rw-r--r--mail/dovecot/pkg-comment1
-rw-r--r--mail/dovecot/pkg-descr5
-rw-r--r--mail/dovecot/pkg-install70
-rw-r--r--mail/dovecot/pkg-plist13
19 files changed, 443 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile
index 98fa2b0123d6..7af1a81fcb43 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -30,6 +30,7 @@
SUBDIR += demime
SUBDIR += distribute
SUBDIR += dkimap4
+ SUBDIR += dovecot
SUBDIR += drac
SUBDIR += drbl
SUBDIR += ecartis
diff --git a/mail/dovecot-devel/Makefile b/mail/dovecot-devel/Makefile
new file mode 100644
index 000000000000..c3aa1f3f4e88
--- /dev/null
+++ b/mail/dovecot-devel/Makefile
@@ -0,0 +1,53 @@
+# New ports collection makefile for: dovecot
+# Date created: 12/08/2002
+# Whom: Dominic Marks <dominic_marks@btinternet.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= dovecot
+PORTVERSION= 0.97
+CATEGORIES= mail ipv6
+MASTER_SITES= http://dovecot.procontrol.fi/
+
+MAINTAINER= dominic_marks@btinternet.com
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS+= --disable-shadow --enable-ipv6 \
+ --localstatedir=/var/dovecot
+
+.if !defined(NOPORTDOCS)
+PLIST_SUB+= DOCS=""
+.else
+PLIST_SUB+= DOCS="@comment "
+.endif
+
+pre-build:
+ @${SED} 's,%%PREFIX%%,${PREFIX},' < ${WRKSRC}/dovecot-example.conf \
+ > ${WRKSRC}/dovecot-example.conf.new
+ @${MV} ${WRKSRC}/dovecot-example.conf.new ${WRKSRC}/dovecot-example.conf
+
+pre-install:
+ @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
+post-install:
+ @${MKDIR} /var/dovecot
+ @${MKDIR} /var/dovecot/auth
+ @${MKDIR} /var/dovecot/login
+ @${CHOWN} imapd.imapd /var/dovecot
+ @if [ ! -f ${PREFIX}/etc/rc.d/dovecot-imapd.sh ]; then \
+ ${ECHO} "Install ${PREFIX}/etc/rc.d/dovecot-imapd.sh startup file."; \
+ ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/dovecot-imapd.sh ${PREFIX}/etc/rc.d/dovecot-imapd.sh; \
+ fi
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${PREFIX}/share/doc/dovecot
+ @${INSTALL_DATA} \
+ ${WRKSRC}/doc/auth.txt \
+ ${WRKSRC}/doc/design.txt \
+ ${WRKSRC}/doc/index.txt \
+ ${WRKSRC}/doc/multiaccess.txt \
+ ${WRKSRC}/doc/nfs.txt \
+ ${PREFIX}/share/doc/dovecot
+.endif
+
+.include <bsd.port.mk>
diff --git a/mail/dovecot-devel/distinfo b/mail/dovecot-devel/distinfo
new file mode 100644
index 000000000000..03c24b5f7bb0
--- /dev/null
+++ b/mail/dovecot-devel/distinfo
@@ -0,0 +1 @@
+MD5 (dovecot-0.97.tar.gz) = e11fb1b9cd005d6072332e9df87ba620
diff --git a/mail/dovecot-devel/files/dovecot-imapd.sh b/mail/dovecot-devel/files/dovecot-imapd.sh
new file mode 100644
index 000000000000..8295fbea37ea
--- /dev/null
+++ b/mail/dovecot-devel/files/dovecot-imapd.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
+ echo "$0: Cannot determine the PREFIX" >&2
+ exit 1
+fi
+
+case "$1" in
+start)
+ [ -x ${PREFIX}/sbin/imap-master ] && \
+ ${PREFIX}/sbin/imap-master && echo -n ' dovecot-imapd'
+ ;;
+stop)
+ /usr/bin/killall imap-master && echo -n ' dovecot-imapd'
+ ;;
+*)
+ echo "Usage: `basename $0` { start | stop }" >&2
+ ;;
+esac
+
+exit 0
diff --git a/mail/dovecot-devel/files/patch-aa b/mail/dovecot-devel/files/patch-aa
new file mode 100644
index 000000000000..b9fb6fe42327
--- /dev/null
+++ b/mail/dovecot-devel/files/patch-aa
@@ -0,0 +1,10 @@
+--- src/auth/userinfo-pam.c Thu Aug 1 05:16:44 2002
++++ src/auth/userinfo-pam.c Mon Aug 12 23:41:48 2002
+@@ -21,7 +21,6 @@
+
+ #include <stdlib.h>
+ #include <unistd.h>
+-#include <shadow.h>
+
+ #include <security/pam_appl.h>
+
diff --git a/mail/dovecot-devel/files/patch-dovecot-example.conf b/mail/dovecot-devel/files/patch-dovecot-example.conf
new file mode 100644
index 000000000000..a78d0c468700
--- /dev/null
+++ b/mail/dovecot-devel/files/patch-dovecot-example.conf
@@ -0,0 +1,47 @@
+--- dovecot-example.conf.orig Thu Aug 29 07:59:26 2002
++++ dovecot-example.conf Sun Sep 1 22:07:55 2002
+@@ -38,7 +38,7 @@
+ ##
+
+ # Executable location
+-#login_executable = /usr/lib/dovecot/imap-login
++#login_executable = %%PREFIX%%/lib/dovecot/imap-login
+
+ # User to use for imap-login process
+ #login_user = imapd
+@@ -46,7 +46,7 @@
+ # Directory where imap-auth places authentication UNIX sockets which login
+ # needs to be able to connect to. The sockets are created when running as
+ # root, so you don't need to give imap-auth any access for it.
+-#login_dir = /var/run/dovecot/login
++#login_dir = /var/dovecot/login
+
+ # chroot() imap-login process to the login_dir. Only reason not to do this
+ # is if you wish to run the whole imapd without roots.
+@@ -64,7 +64,7 @@
+ ##
+
+ # Executable location
+-#imap_executable = /usr/lib/dovecot/imap
++#imap_executable = %%PREFIX%%/lib/dovecot/imap
+
+ # Maximum number of running imap processes. When this limit is reached,
+ # new users aren't allowed to log in.
+@@ -139,7 +139,7 @@
+ auth_userinfo = pam
+
+ # Executable location
+-#auth_executable = /var/lib/dovecot/imap-auth
++#auth_executable = %%PREFIX%%/lib/dovecot/imap-auth
+
+ # User to use for the process. Only shadow and pam authentication requires
+ # roots, so use something else if possible.
+@@ -162,7 +162,7 @@
+ #auth_realms =
+ #auth_userinfo = passwd-file /etc/passwd.imap
+ #auth_user = imapauth
+-#auth_chroot = /var/run/dovecot/auth
++#auth_chroot = /var/dovecot/auth
+
+ # if you plan to use only passwd-file, you don't need the two auth processes,
+ # simply set "auth_methods = plain digest-md5"
diff --git a/mail/dovecot-devel/pkg-comment b/mail/dovecot-devel/pkg-comment
new file mode 100644
index 000000000000..7eb50288824c
--- /dev/null
+++ b/mail/dovecot-devel/pkg-comment
@@ -0,0 +1 @@
+Secure and compact IMAP server
diff --git a/mail/dovecot-devel/pkg-descr b/mail/dovecot-devel/pkg-descr
new file mode 100644
index 000000000000..f0c0d704eadc
--- /dev/null
+++ b/mail/dovecot-devel/pkg-descr
@@ -0,0 +1,5 @@
+Dovecot is a secure and compact IMAP server which is in the early stages
+of developement. It supports Maildirs and mbox formats and much of the
+IMAP v4 protocol including SSL/TLS. IPv6 support is also included.
+
+WWW: http://dovecot.procontrol.fi/
diff --git a/mail/dovecot-devel/pkg-install b/mail/dovecot-devel/pkg-install
new file mode 100644
index 000000000000..423775324699
--- /dev/null
+++ b/mail/dovecot-devel/pkg-install
@@ -0,0 +1,70 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+BATCH=${BATCH:=no}
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" -a x${BATCH} = xno ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local question default answer
+
+ question=$1
+ default=$2
+ while :; do
+ answer=$(ask "${question}" "${default}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if [ x"$2" = xPRE-INSTALL ]; then
+ USER=imapd
+ GROUP=imapd
+
+ if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then
+ echo "You already have a group \"${GROUP}\", so I will use it."
+ else
+ if /usr/sbin/pw groupadd ${GROUP} -h -
+ then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+ if /usr/sbin/pw user show "${USER}" 2>/dev/null; then
+ echo "You already have a user \"${USER}\", so I will use it."
+ else
+ if /usr/sbin/pw useradd ${USER} -g ${GROUP} -h - \
+ -s /sbin/nologin \
+ -c "Imap Daemon"
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+fi
diff --git a/mail/dovecot-devel/pkg-plist b/mail/dovecot-devel/pkg-plist
new file mode 100644
index 000000000000..69f03552bbbc
--- /dev/null
+++ b/mail/dovecot-devel/pkg-plist
@@ -0,0 +1,13 @@
+etc/dovecot-example.conf
+etc/rc.d/dovecot-imapd.sh
+lib/dovecot/imap
+lib/dovecot/imap-auth
+lib/dovecot/imap-login
+sbin/imap-master
+%%DOCS%%share/doc/dovecot/auth.txt
+%%DOCS%%share/doc/dovecot/design.txt
+%%DOCS%%share/doc/dovecot/nfs.txt
+%%DOCS%%share/doc/dovecot/index.txt
+%%DOCS%%share/doc/dovecot/multiaccess.txt
+%%DOCS%%@dirrm share/doc/dovecot
+@dirrm lib/dovecot
diff --git a/mail/dovecot/Makefile b/mail/dovecot/Makefile
new file mode 100644
index 000000000000..c3aa1f3f4e88
--- /dev/null
+++ b/mail/dovecot/Makefile
@@ -0,0 +1,53 @@
+# New ports collection makefile for: dovecot
+# Date created: 12/08/2002
+# Whom: Dominic Marks <dominic_marks@btinternet.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= dovecot
+PORTVERSION= 0.97
+CATEGORIES= mail ipv6
+MASTER_SITES= http://dovecot.procontrol.fi/
+
+MAINTAINER= dominic_marks@btinternet.com
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS+= --disable-shadow --enable-ipv6 \
+ --localstatedir=/var/dovecot
+
+.if !defined(NOPORTDOCS)
+PLIST_SUB+= DOCS=""
+.else
+PLIST_SUB+= DOCS="@comment "
+.endif
+
+pre-build:
+ @${SED} 's,%%PREFIX%%,${PREFIX},' < ${WRKSRC}/dovecot-example.conf \
+ > ${WRKSRC}/dovecot-example.conf.new
+ @${MV} ${WRKSRC}/dovecot-example.conf.new ${WRKSRC}/dovecot-example.conf
+
+pre-install:
+ @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
+post-install:
+ @${MKDIR} /var/dovecot
+ @${MKDIR} /var/dovecot/auth
+ @${MKDIR} /var/dovecot/login
+ @${CHOWN} imapd.imapd /var/dovecot
+ @if [ ! -f ${PREFIX}/etc/rc.d/dovecot-imapd.sh ]; then \
+ ${ECHO} "Install ${PREFIX}/etc/rc.d/dovecot-imapd.sh startup file."; \
+ ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/dovecot-imapd.sh ${PREFIX}/etc/rc.d/dovecot-imapd.sh; \
+ fi
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${PREFIX}/share/doc/dovecot
+ @${INSTALL_DATA} \
+ ${WRKSRC}/doc/auth.txt \
+ ${WRKSRC}/doc/design.txt \
+ ${WRKSRC}/doc/index.txt \
+ ${WRKSRC}/doc/multiaccess.txt \
+ ${WRKSRC}/doc/nfs.txt \
+ ${PREFIX}/share/doc/dovecot
+.endif
+
+.include <bsd.port.mk>
diff --git a/mail/dovecot/distinfo b/mail/dovecot/distinfo
new file mode 100644
index 000000000000..03c24b5f7bb0
--- /dev/null
+++ b/mail/dovecot/distinfo
@@ -0,0 +1 @@
+MD5 (dovecot-0.97.tar.gz) = e11fb1b9cd005d6072332e9df87ba620
diff --git a/mail/dovecot/files/dovecot-imapd.sh b/mail/dovecot/files/dovecot-imapd.sh
new file mode 100644
index 000000000000..8295fbea37ea
--- /dev/null
+++ b/mail/dovecot/files/dovecot-imapd.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
+ echo "$0: Cannot determine the PREFIX" >&2
+ exit 1
+fi
+
+case "$1" in
+start)
+ [ -x ${PREFIX}/sbin/imap-master ] && \
+ ${PREFIX}/sbin/imap-master && echo -n ' dovecot-imapd'
+ ;;
+stop)
+ /usr/bin/killall imap-master && echo -n ' dovecot-imapd'
+ ;;
+*)
+ echo "Usage: `basename $0` { start | stop }" >&2
+ ;;
+esac
+
+exit 0
diff --git a/mail/dovecot/files/patch-aa b/mail/dovecot/files/patch-aa
new file mode 100644
index 000000000000..b9fb6fe42327
--- /dev/null
+++ b/mail/dovecot/files/patch-aa
@@ -0,0 +1,10 @@
+--- src/auth/userinfo-pam.c Thu Aug 1 05:16:44 2002
++++ src/auth/userinfo-pam.c Mon Aug 12 23:41:48 2002
+@@ -21,7 +21,6 @@
+
+ #include <stdlib.h>
+ #include <unistd.h>
+-#include <shadow.h>
+
+ #include <security/pam_appl.h>
+
diff --git a/mail/dovecot/files/patch-dovecot-example.conf b/mail/dovecot/files/patch-dovecot-example.conf
new file mode 100644
index 000000000000..a78d0c468700
--- /dev/null
+++ b/mail/dovecot/files/patch-dovecot-example.conf
@@ -0,0 +1,47 @@
+--- dovecot-example.conf.orig Thu Aug 29 07:59:26 2002
++++ dovecot-example.conf Sun Sep 1 22:07:55 2002
+@@ -38,7 +38,7 @@
+ ##
+
+ # Executable location
+-#login_executable = /usr/lib/dovecot/imap-login
++#login_executable = %%PREFIX%%/lib/dovecot/imap-login
+
+ # User to use for imap-login process
+ #login_user = imapd
+@@ -46,7 +46,7 @@
+ # Directory where imap-auth places authentication UNIX sockets which login
+ # needs to be able to connect to. The sockets are created when running as
+ # root, so you don't need to give imap-auth any access for it.
+-#login_dir = /var/run/dovecot/login
++#login_dir = /var/dovecot/login
+
+ # chroot() imap-login process to the login_dir. Only reason not to do this
+ # is if you wish to run the whole imapd without roots.
+@@ -64,7 +64,7 @@
+ ##
+
+ # Executable location
+-#imap_executable = /usr/lib/dovecot/imap
++#imap_executable = %%PREFIX%%/lib/dovecot/imap
+
+ # Maximum number of running imap processes. When this limit is reached,
+ # new users aren't allowed to log in.
+@@ -139,7 +139,7 @@
+ auth_userinfo = pam
+
+ # Executable location
+-#auth_executable = /var/lib/dovecot/imap-auth
++#auth_executable = %%PREFIX%%/lib/dovecot/imap-auth
+
+ # User to use for the process. Only shadow and pam authentication requires
+ # roots, so use something else if possible.
+@@ -162,7 +162,7 @@
+ #auth_realms =
+ #auth_userinfo = passwd-file /etc/passwd.imap
+ #auth_user = imapauth
+-#auth_chroot = /var/run/dovecot/auth
++#auth_chroot = /var/dovecot/auth
+
+ # if you plan to use only passwd-file, you don't need the two auth processes,
+ # simply set "auth_methods = plain digest-md5"
diff --git a/mail/dovecot/pkg-comment b/mail/dovecot/pkg-comment
new file mode 100644
index 000000000000..7eb50288824c
--- /dev/null
+++ b/mail/dovecot/pkg-comment
@@ -0,0 +1 @@
+Secure and compact IMAP server
diff --git a/mail/dovecot/pkg-descr b/mail/dovecot/pkg-descr
new file mode 100644
index 000000000000..f0c0d704eadc
--- /dev/null
+++ b/mail/dovecot/pkg-descr
@@ -0,0 +1,5 @@
+Dovecot is a secure and compact IMAP server which is in the early stages
+of developement. It supports Maildirs and mbox formats and much of the
+IMAP v4 protocol including SSL/TLS. IPv6 support is also included.
+
+WWW: http://dovecot.procontrol.fi/
diff --git a/mail/dovecot/pkg-install b/mail/dovecot/pkg-install
new file mode 100644
index 000000000000..423775324699
--- /dev/null
+++ b/mail/dovecot/pkg-install
@@ -0,0 +1,70 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+BATCH=${BATCH:=no}
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" -a x${BATCH} = xno ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local question default answer
+
+ question=$1
+ default=$2
+ while :; do
+ answer=$(ask "${question}" "${default}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if [ x"$2" = xPRE-INSTALL ]; then
+ USER=imapd
+ GROUP=imapd
+
+ if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then
+ echo "You already have a group \"${GROUP}\", so I will use it."
+ else
+ if /usr/sbin/pw groupadd ${GROUP} -h -
+ then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+ if /usr/sbin/pw user show "${USER}" 2>/dev/null; then
+ echo "You already have a user \"${USER}\", so I will use it."
+ else
+ if /usr/sbin/pw useradd ${USER} -g ${GROUP} -h - \
+ -s /sbin/nologin \
+ -c "Imap Daemon"
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+fi
diff --git a/mail/dovecot/pkg-plist b/mail/dovecot/pkg-plist
new file mode 100644
index 000000000000..69f03552bbbc
--- /dev/null
+++ b/mail/dovecot/pkg-plist
@@ -0,0 +1,13 @@
+etc/dovecot-example.conf
+etc/rc.d/dovecot-imapd.sh
+lib/dovecot/imap
+lib/dovecot/imap-auth
+lib/dovecot/imap-login
+sbin/imap-master
+%%DOCS%%share/doc/dovecot/auth.txt
+%%DOCS%%share/doc/dovecot/design.txt
+%%DOCS%%share/doc/dovecot/nfs.txt
+%%DOCS%%share/doc/dovecot/index.txt
+%%DOCS%%share/doc/dovecot/multiaccess.txt
+%%DOCS%%@dirrm share/doc/dovecot
+@dirrm lib/dovecot