(mail/courie-imap) Candidate to update version 5.0.7
This commit is contained in:
parent
c94e5aacb0
commit
f78939b354
|
@ -0,0 +1,20 @@
|
|||
# $NetBSD: DEINSTALL,v 1.8 2006/06/09 22:12:10 jlam Exp $
|
||||
|
||||
case ${STAGE} in
|
||||
DEINSTALL)
|
||||
#
|
||||
# Note some additional files that may be created by the sysadmin
|
||||
# that can probably be removed.
|
||||
#
|
||||
if ${TEST} -x ./+FILES; then
|
||||
for file in \
|
||||
${PKG_SYSCONFDIR}/imapd.pem \
|
||||
${PKG_SYSCONFDIR}/imapd.rand \
|
||||
${PKG_SYSCONFDIR}/pop3d.pem \
|
||||
${PKG_SYSCONFDIR}/pop3d.rand
|
||||
do
|
||||
${ECHO} "# FILE: $file . /dev/null" >> ./+FILES
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,18 @@
|
|||
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.
|
||||
|
||||
This package differs from a vanilla Courier-IMAP installation in that
|
||||
the files are installed at locations that more closely correspond to
|
||||
a Courier installation.
|
|
@ -0,0 +1,103 @@
|
|||
# $NetBSD: Makefile,v 1.89 2020/08/31 18:09:54 wiz Exp $
|
||||
|
||||
DISTNAME= courier-imap-5.0.7
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=courier/}
|
||||
EXTRACT_SUFX= .tar.bz2
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
COMMENT= IMAP server for access to maildir-style mailboxes
|
||||
HOMEPAGE= https://www.courier-mta.org/imap/
|
||||
|
||||
DEPENDS+= courier-maildir>=0.65.0:../../mail/courier-maildir
|
||||
DEPENDS+= couriertcpd>=0.65.0:../../net/couriertcpd
|
||||
|
||||
USE_TOOLS+= env gmake perl pkg-config
|
||||
USE_LANGUAGES= c c++
|
||||
USE_LIBTOOL= yes
|
||||
|
||||
.include "options.mk"
|
||||
|
||||
.include "../../mail/courier-mta/Makefile.common"
|
||||
|
||||
CONFIGURE_ARGS+= --datadir=${DATADIR}
|
||||
CONFIGURE_ARGS+= --libexecdir=${LIBEXECDIR}
|
||||
CONFIGURE_ARGS+= --with-mailuser=${REAL_ROOT_USER}
|
||||
CONFIGURE_ARGS+= --with-piddir=${COURIER_STATEDIR}/tmp
|
||||
CONFIGURE_ARGS+= --program-transform-name='s/\.rc$$//'
|
||||
CONFIGURE_ARGS+= --with-notice=unicode
|
||||
CONFIGURE_ENV+= CERTTOOL=${COURIER_CERTTOOL:Q}
|
||||
CONFIGURE_ENV+= OPENSSL=${COURIER_OPENSSL:Q}
|
||||
|
||||
# The rfc1035 and tcpd bits are built and installed by net/couriertcpd.
|
||||
# However, we still need to build in these directories because there
|
||||
# are some convenience libraries built and used by other parts of the
|
||||
# imap code. We configure without IPv6 support because those necessary
|
||||
# convenience libraries don't have any IPv6 code, and we want to avoid
|
||||
# breakage due to IPv6 mis-detection.
|
||||
CONFIGURE_ARGS+= --without-ipv6
|
||||
|
||||
INSTALL_AM_MAKEFLAGS= sysconfdir=${EGDIR:Q}
|
||||
INSTALL_MAKE_FLAGS= ${MAKE_FLAGS} AM_MAKEFLAGS=${INSTALL_AM_MAKEFLAGS:Q}
|
||||
|
||||
REQD_DIRS+= ${DATADIR} ${DOCDIR} ${EGDIR} ${LIBEXECDIR}
|
||||
MAKE_DIRS+= ${COURIER_STATEDIR}
|
||||
MAKE_DIRS_PERMS+= ${COURIER_STATEDIR}/tmp \
|
||||
${COURIER_USER} ${COURIER_GROUP} 0770
|
||||
|
||||
.for _file_ in imapd.cnf imapd.dist imapd-ssl.dist \
|
||||
pop3d.cnf pop3d.dist pop3d-ssl.dist
|
||||
CONF_FILES_PERMS+= ${EGDIR}/${_file_} \
|
||||
${PKG_SYSCONFDIR}/${_file_:S/.dist$//} \
|
||||
${COURIER_FILE_PERMS}
|
||||
.endfor
|
||||
RCD_SCRIPTS= courierimap courierimaps courierpop courierpops
|
||||
SMF_METHODS= courier-imap
|
||||
|
||||
SUBST_CLASSES+= courier
|
||||
SUBST_FILES.courier= libs/imap/imapd-ssl.dist.in
|
||||
SUBST_FILES.courier+= libs/imap/imapd.8.in
|
||||
SUBST_FILES.courier+= libs/imap/imapd.dist.in
|
||||
SUBST_FILES.courier+= libs/imap/mkpop3dcert.html.in
|
||||
SUBST_FILES.courier+= libs/imap/pop3d-ssl.dist.in
|
||||
SUBST_FILES.courier+= libs/imap/pop3d.dist.in
|
||||
SUBST_FILES.courier+= imapd-ssl.rc.in
|
||||
SUBST_FILES.courier+= imapd.rc.in
|
||||
SUBST_FILES.courier+= pop3d-ssl.rc.in
|
||||
SUBST_FILES.courier+= pop3d.rc.in
|
||||
SUBST_SED.courier= -e "s|^IMAPDSTART=.*|IMAPDSTART=YES|g"
|
||||
SUBST_SED.courier+= -e "s|^IMAPDSSLSTART=.*|IMAPDSSLSTART=YES|g"
|
||||
SUBST_SED.courier+= -e "s|^POP3DSTART=.*|POP3DSTART=YES|g"
|
||||
SUBST_SED.courier+= -e "s|^POP3DSSLSTART=.*|POP3DSSLSTART=YES|g"
|
||||
SUBST_SED.courier+= -e "s|@mydatadir@|@sysconfdir@|g"
|
||||
SUBST_SED.courier+= -e "s|@datadir@/imapd.pem|@sysconfdir@/imapd.pem|g"
|
||||
SUBST_SED.courier+= -e "s|@datadir@/imapd.rand|@sysconfdir@/imapd.rand|g"
|
||||
SUBST_SED.courier+= -e "s|@datadir@/pop3d.pem|@sysconfdir@/pop3d.pem|g"
|
||||
SUBST_SED.courier+= -e "s|@datadir@/pop3d.rand|@sysconfdir@/pop3d.rand|g"
|
||||
SUBST_SED.courier+= -e "s|@libexecdir@/couriertcpd|@sbindir@/couriertcpd|g"
|
||||
SUBST_SED.courier+= -e "s|@sbindir@/imaplogin|@libexecdir@/imaplogin|g"
|
||||
SUBST_SED.courier+= -e "s|@sbindir@/pop3login|@libexecdir@/courierpop3login|g"
|
||||
SUBST_SED.courier+= -e "s|@bindir@/pop3d|@libexecdir@/courierpop3d|g"
|
||||
SUBST_STAGE.courier= pre-configure
|
||||
|
||||
# configure: Cannot obtain information for user courier: Undefined error: 0
|
||||
NOT_FOR_UNPRIVILEGED= yes
|
||||
|
||||
.include "../../security/courier-authlib/buildlink3.mk"
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}
|
||||
${INSTALL_DATA_DIR} ${DESTDIR}${DOCDIR}/imap
|
||||
${INSTALL_DATA} ${WRKSRC}/imap/BUGS.html ${DESTDIR}${DOCDIR}/imap
|
||||
${INSTALL_DATA} ${WRKSRC}/imap/README.html ${DESTDIR}${DOCDIR}/imap
|
||||
${INSTALL_DATA} ${WRKSRC}/imap/README.proxy.html ${DESTDIR}${DOCDIR}/imap
|
||||
${INSTALL_DATA} ${WRKSRC}/imap/courierpop3d.html ${DESTDIR}${DOCDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/imap/imapd.html ${DESTDIR}${DOCDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/imap/mkimapdcert.html ${DESTDIR}${DOCDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/imap/mkpop3dcert.html ${DESTDIR}${DOCDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/imap/imapd.pam ${DESTDIR}${EGDIR}/imap.authpam
|
||||
${INSTALL_DATA} ${WRKSRC}/imap/pop3d.pam ${DESTDIR}${EGDIR}/pop3.authpam
|
||||
|
||||
.include "../../devel/libidn/buildlink3.mk"
|
||||
.include "../../mail/courier-unicode/buildlink3.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
|
@ -0,0 +1,36 @@
|
|||
@comment $NetBSD: PLIST,v 1.19 2014/03/11 14:05:02 jperkin Exp $
|
||||
bin/imapd
|
||||
libexec/courier/courierpop3d
|
||||
libexec/courier/courierpop3login
|
||||
libexec/courier/imaplogin
|
||||
man/man8/courierimapd.8
|
||||
man/man8/courierpop3d.8
|
||||
man/man8/mkimapdcert.8
|
||||
man/man8/mkpop3dcert.8
|
||||
sbin/imapd
|
||||
sbin/imapd-ssl
|
||||
sbin/mkimapdcert
|
||||
sbin/mkpop3dcert
|
||||
sbin/pop3d
|
||||
sbin/pop3d-ssl
|
||||
share/courier/imapd-ssl.rc
|
||||
share/courier/imapd.rc
|
||||
share/courier/mkimapdcert
|
||||
share/courier/mkpop3dcert
|
||||
share/courier/pop3d-ssl.rc
|
||||
share/courier/pop3d.rc
|
||||
share/doc/courier/courierpop3d.html
|
||||
share/doc/courier/imap/BUGS.html
|
||||
share/doc/courier/imap/README.html
|
||||
share/doc/courier/imap/README.proxy.html
|
||||
share/doc/courier/imapd.html
|
||||
share/doc/courier/mkimapdcert.html
|
||||
share/doc/courier/mkpop3dcert.html
|
||||
share/examples/courier/imap.authpam
|
||||
share/examples/courier/imapd-ssl.dist
|
||||
share/examples/courier/imapd.cnf
|
||||
share/examples/courier/imapd.dist
|
||||
share/examples/courier/pop3.authpam
|
||||
share/examples/courier/pop3d-ssl.dist
|
||||
share/examples/courier/pop3d.cnf
|
||||
share/examples/courier/pop3d.dist
|
|
@ -0,0 +1,14 @@
|
|||
$NetBSD: distinfo,v 1.28 2015/11/03 23:27:02 agc Exp $
|
||||
|
||||
SHA1 (courier-imap-5.0.7.tar.bz2) = 0bf8d32faf7eae06ac51156f7b2070957221cba8
|
||||
RMD160 (courier-imap-5.0.7.tar.bz2) = a61a792c0c86ec8ac9248c06f75b7da539206f23
|
||||
SHA512 (courier-imap-5.0.7.tar.bz2) = a0be5cb3e6bc42f4bf45b14132e7d4ad7e822c26aa3b3dd4bfefa7783a047b9c928ad503b462c8e832fddefb356af58b4adfa5ee91481bd024149992157a1aad
|
||||
Size (courier-imap-5.0.7.tar.bz2) = 3296879 bytes
|
||||
SHA1 (patch-aa) = e06c1ca95128002276130f4e298be693f779bf5b
|
||||
SHA1 (patch-ad) = 1091c9a5991c746855db7fc4d3e2e744142b2e3c
|
||||
SHA1 (patch-ae) = 9d925f4639086af9f6faecd6a2fab2a9ecab670c
|
||||
SHA1 (patch-af) = 0fa0e0bd2f1908404f866de9358c74403615967f
|
||||
SHA1 (patch-ag) = 6ddd8b3f6a2cfbab4d814b51552dbf364384cf57
|
||||
SHA1 (patch-ah) = e81da45833698ff6da23de640efc322ce34cec0d
|
||||
SHA1 (patch-ak) = 0aefdc67f825068d7dd14210519562d171990f17
|
||||
SHA1 (patch-ao) = 9a1ef6ed806920699a3c69f4f90b1c1f86f45900
|
|
@ -0,0 +1,68 @@
|
|||
#!@RCD_SCRIPTS_SHELL@
|
||||
#
|
||||
# $NetBSD: courierimap.sh,v 1.16 2008/02/19 18:45:14 jlam Exp $
|
||||
#
|
||||
# Courier IMAP services daemon
|
||||
#
|
||||
# PROVIDE: courierimap
|
||||
# REQUIRE: authdaemond
|
||||
# KEYWORD: shutdown
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="courierimap"
|
||||
rcvar=${name}
|
||||
command="@PREFIX@/sbin/couriertcpd"
|
||||
ctl_command="@PREFIX@/sbin/imapd"
|
||||
pidfile="@COURIER_STATEDIR@/tmp/imapd.pid"
|
||||
required_files="@PKG_SYSCONFDIR@/imapd @PKG_SYSCONFDIR@/imapd-ssl"
|
||||
|
||||
start_precmd="${name}_prestart"
|
||||
start_cmd="${name}_doit start"
|
||||
stop_cmd="${name}_doit stop"
|
||||
|
||||
mkdir_perms()
|
||||
{
|
||||
dir="$1"; user="$2"; group="$3"; mode="$4"
|
||||
@TEST@ -d $dir || @MKDIR@ $dir
|
||||
@CHOWN@ $user $dir
|
||||
@CHGRP@ $group $dir
|
||||
@CHMOD@ $mode $dir
|
||||
}
|
||||
|
||||
courierimap_prestart()
|
||||
{
|
||||
mkdir_perms @COURIER_STATEDIR@/tmp \
|
||||
@COURIER_USER@ @COURIER_GROUP@ 0770
|
||||
}
|
||||
|
||||
courierimap_doit()
|
||||
{
|
||||
action=$1
|
||||
case $action in
|
||||
start)
|
||||
for f in $required_files; do
|
||||
if [ ! -r "$f" ]; then
|
||||
@ECHO@ 1>&2 "$0: WARNING: $f is not readable"
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
||||
. @PKG_SYSCONFDIR@/imapd
|
||||
|
||||
case x$IMAPDSTART in
|
||||
x[yY]*)
|
||||
@ECHO@ "Starting ${name}."
|
||||
${ctl_command} $action
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
@ECHO@ "Stopping ${name}."
|
||||
${ctl_command} $action
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
|
@ -0,0 +1,84 @@
|
|||
#!@RCD_SCRIPTS_SHELL@
|
||||
#
|
||||
# $NetBSD: courierimaps.sh,v 1.18 2008/02/19 18:45:14 jlam Exp $
|
||||
#
|
||||
# Courier IMAP/SSL services daemon
|
||||
#
|
||||
# PROVIDE: courierimaps
|
||||
# REQUIRE: authdaemond
|
||||
# KEYWORD: shutdown
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="courierimaps"
|
||||
rcvar=${name}
|
||||
command="@PREFIX@/sbin/couriertcpd"
|
||||
ctl_command="@PREFIX@/sbin/imapd-ssl"
|
||||
pidfile="@COURIER_STATEDIR@/tmp/imapd-ssl.pid"
|
||||
required_files="@PKG_SYSCONFDIR@/imapd @PKG_SYSCONFDIR@/imapd-ssl"
|
||||
|
||||
start_precmd="${name}_prestart"
|
||||
start_cmd="${name}_doit start"
|
||||
stop_cmd="${name}_doit stop"
|
||||
|
||||
mkdir_perms()
|
||||
{
|
||||
dir="$1"; user="$2"; group="$3"; mode="$4"
|
||||
@TEST@ -d $dir || @MKDIR@ $dir
|
||||
@CHOWN@ $user $dir
|
||||
@CHGRP@ $group $dir
|
||||
@CHMOD@ $mode $dir
|
||||
}
|
||||
|
||||
courierimaps_prestart()
|
||||
{
|
||||
mkdir_perms @COURIER_STATEDIR@/tmp \
|
||||
@COURIER_USER@ @COURIER_GROUP@ 0770
|
||||
}
|
||||
|
||||
courierimaps_doit()
|
||||
{
|
||||
action=$1
|
||||
case $action in
|
||||
start)
|
||||
for f in $required_files; do
|
||||
if [ ! -r "$f" ]; then
|
||||
@ECHO@ 1>&2 "$0: WARNING: $f is not readable"
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
||||
. @PKG_SYSCONFDIR@/imapd
|
||||
. @PKG_SYSCONFDIR@/imapd-ssl
|
||||
|
||||
f="$TLS_CERTFILE"
|
||||
if [ -z "$f" ]; then
|
||||
@ECHO@ 1>&2 "$0: WARNING: TLS_CERTFILE is empty"
|
||||
return 1
|
||||
fi
|
||||
if [ ! -f "$f" ] && \
|
||||
[ "$f" = "@PKG_SYSCONFDIR@/imapd.pem" ]; then
|
||||
@ECHO@ "Generating IMAP SSL certificate in $f."
|
||||
@PREFIX@/sbin/mkimapdcert >/dev/null 2>&1
|
||||
fi
|
||||
if [ ! -r "$f" ]; then
|
||||
@ECHO@ 1>&2 "$0: WARNING: $f is not readable"
|
||||
return 1
|
||||
fi
|
||||
|
||||
case x$IMAPDSSLSTART in
|
||||
x[yY]*)
|
||||
@ECHO@ "Starting ${name}."
|
||||
${ctl_command} $action
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
@ECHO@ "Stopping ${name}."
|
||||
${ctl_command} $action
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
|
@ -0,0 +1,68 @@
|
|||
#!@RCD_SCRIPTS_SHELL@
|
||||
#
|
||||
# $NetBSD: courierpop.sh,v 1.16 2008/02/19 18:45:14 jlam Exp $
|
||||
#
|
||||
# Courier POP3 services daemon
|
||||
#
|
||||
# PROVIDE: courierpop
|
||||
# REQUIRE: authdaemond
|
||||
# KEYWORD: shutdown
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="courierpop"
|
||||
rcvar=${name}
|
||||
command="@PREFIX@/sbin/couriertcpd"
|
||||
ctl_command="@PREFIX@/sbin/pop3d"
|
||||
pidfile="@COURIER_STATEDIR@/tmp/pop3d.pid"
|
||||
required_files="@PKG_SYSCONFDIR@/pop3d @PKG_SYSCONFDIR@/pop3d-ssl"
|
||||
|
||||
start_precmd="${name}_prestart"
|
||||
start_cmd="${name}_doit start"
|
||||
stop_cmd="${name}_doit stop"
|
||||
|
||||
mkdir_perms()
|
||||
{
|
||||
dir="$1"; user="$2"; group="$3"; mode="$4"
|
||||
@TEST@ -d $dir || @MKDIR@ $dir
|
||||
@CHOWN@ $user $dir
|
||||
@CHGRP@ $group $dir
|
||||
@CHMOD@ $mode $dir
|
||||
}
|
||||
|
||||
courierpop_prestart()
|
||||
{
|
||||
mkdir_perms @COURIER_STATEDIR@/tmp \
|
||||
@COURIER_USER@ @COURIER_GROUP@ 0770
|
||||
}
|
||||
|
||||
courierpop_doit()
|
||||
{
|
||||
action=$1
|
||||
case $action in
|
||||
start)
|
||||
for f in $required_files; do
|
||||
if [ ! -r "$f" ]; then
|
||||
@ECHO@ 1>&2 "$0: WARNING: $f is not readable"
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
||||
. @PKG_SYSCONFDIR@/pop3d
|
||||
|
||||
case x$POP3DSTART in
|
||||
x[yY]*)
|
||||
@ECHO@ "Starting ${name}."
|
||||
${ctl_command} $action
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
@ECHO@ "Stopping ${name}."
|
||||
${ctl_command} $action
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
|
@ -0,0 +1,84 @@
|
|||
#!@RCD_SCRIPTS_SHELL@
|
||||
#
|
||||
# $NetBSD: courierpops.sh,v 1.18 2008/02/19 18:45:14 jlam Exp $
|
||||
#
|
||||
# Courier POP3/SSL services daemon
|
||||
#
|
||||
# PROVIDE: courierpops
|
||||
# REQUIRE: authdaemond
|
||||
# KEYWORD: shutdown
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="courierpops"
|
||||
rcvar=${name}
|
||||
command="@PREFIX@/sbin/couriertcpd"
|
||||
ctl_command="@PREFIX@/sbin/pop3d-ssl"
|
||||
pidfile="@COURIER_STATEDIR@/tmp/pop3d-ssl.pid"
|
||||
required_files="@PKG_SYSCONFDIR@/pop3d @PKG_SYSCONFDIR@/pop3d-ssl"
|
||||
|
||||
start_precmd="${name}_prestart"
|
||||
start_cmd="${name}_doit start"
|
||||
stop_cmd="${name}_doit stop"
|
||||
|
||||
mkdir_perms()
|
||||
{
|
||||
dir="$1"; user="$2"; group="$3"; mode="$4"
|
||||
@TEST@ -d $dir || @MKDIR@ $dir
|
||||
@CHOWN@ $user $dir
|
||||
@CHGRP@ $group $dir
|
||||
@CHMOD@ $mode $dir
|
||||
}
|
||||
|
||||
courierpops_prestart()
|
||||
{
|
||||
mkdir_perms @COURIER_STATEDIR@/tmp \
|
||||
@COURIER_USER@ @COURIER_GROUP@ 0770
|
||||
}
|
||||
|
||||
courierpops_doit()
|
||||
{
|
||||
action=$1
|
||||
case $action in
|
||||
start)
|
||||
for f in $required_files; do
|
||||
if [ ! -r "$f" ]; then
|
||||
@ECHO@ 1>&2 "$0: WARNING: $f is not readable"
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
||||
. @PKG_SYSCONFDIR@/pop3d
|
||||
. @PKG_SYSCONFDIR@/pop3d-ssl
|
||||
|
||||
f="$TLS_CERTFILE"
|
||||
if [ -z "$f" ]; then
|
||||
@ECHO@ 1>&2 "$0: WARNING: TLS_CERTFILE is empty"
|
||||
return 1
|
||||
fi
|
||||
if [ ! -f "$f" ] && \
|
||||
[ "$f" = "@PKG_SYSCONFDIR@/pop3d.pem" ]; then
|
||||
@ECHO@ "Generating POP3 SSL certificate in $f."
|
||||
@PREFIX@/sbin/mkpop3dcert >/dev/null 2>&1
|
||||
fi
|
||||
if [ ! -r "$f" ]; then
|
||||
@ECHO@ 1>&2 "$0: WARNING: $f is not readable"
|
||||
return 1
|
||||
fi
|
||||
|
||||
case x$POP3DSSLSTART in
|
||||
x[yY]*)
|
||||
@ECHO@ "Starting ${name}."
|
||||
${ctl_command} $action
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
@ECHO@ "Stopping ${name}."
|
||||
${ctl_command} $action
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
|
@ -0,0 +1,122 @@
|
|||
#!@SMF_METHOD_SHELL@
|
||||
#
|
||||
# $NetBSD: courier-imap.sh,v 1.1 2014/03/11 14:34:38 jperkin Exp $
|
||||
#
|
||||
# Init script for Courier-IMAP.
|
||||
#
|
||||
|
||||
. /lib/svc/share/smf_include.sh
|
||||
|
||||
prefix=@PREFIX@
|
||||
exec_prefix=@PREFIX@
|
||||
bindir=${exec_prefix}/bin
|
||||
sbindir=${exec_prefix}/sbin
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
cd /
|
||||
. $prefix/etc/courier/imapd
|
||||
|
||||
printf "Starting Courier-IMAP server:"
|
||||
|
||||
case x$IMAPDSTART in
|
||||
x[yY]*)
|
||||
# Start daemons.
|
||||
$sbindir/imapd start
|
||||
printf "\n imap"
|
||||
;;
|
||||
esac
|
||||
|
||||
. $prefix/etc/courier/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 $TLS_CERTFILE
|
||||
then
|
||||
printf "\n generating-SSL-certificate..."
|
||||
$prefix/share/courier/mkimapdcert >/dev/null 2>&1
|
||||
fi
|
||||
$sbindir/imapd-ssl start
|
||||
printf "\n imap-ssl"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
POP3DSTART=""
|
||||
POP3DSSLSTART=""
|
||||
|
||||
if test -f $prefix/etc/courier/pop3d
|
||||
then
|
||||
. $prefix/etc/courier/pop3d
|
||||
fi
|
||||
|
||||
case x$POP3DSTART in
|
||||
x[yY]*)
|
||||
# Start daemons.
|
||||
$sbindir/pop3d start
|
||||
printf "\n pop3"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -f $prefix/etc/courier/pop3d-ssl
|
||||
then
|
||||
. $prefix/etc/courier/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 $TLS_CERTFILE
|
||||
then
|
||||
printf "\n generating-SSL-certificate..."
|
||||
$prefix/share/courier/mkpop3dcert >/dev/null 2>&1
|
||||
fi
|
||||
$sbindir/pop3d-ssl start
|
||||
printf "\n pop3-ssl"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ""
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping Courier-IMAP server:"
|
||||
. $prefix/etc/courier/imapd
|
||||
. $prefix/etc/courier/imapd-ssl
|
||||
$sbindir/imapd stop
|
||||
printf "\n imap"
|
||||
if test -x $COURIERTLS
|
||||
then
|
||||
$sbindir/imapd-ssl stop
|
||||
printf "\n imap-ssl"
|
||||
fi
|
||||
|
||||
if test -f $prefix/etc/courier/pop3d
|
||||
then
|
||||
$sbindir/pop3d stop
|
||||
printf "\n pop3"
|
||||
|
||||
if test -x $COURIERTLS
|
||||
then
|
||||
$sbindir/pop3d-ssl stop
|
||||
printf "\n pop3-ssl"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ""
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 3
|
||||
$0 start
|
||||
;;
|
||||
esac
|
||||
exit 0
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version='1.0'?>
|
||||
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
|
||||
<service_bundle type='manifest' name='export'>
|
||||
<service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
|
||||
<create_default_instance enabled="false" />
|
||||
<single_instance />
|
||||
<dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
|
||||
<service_fmri value='svc:/system/filesystem/local' />
|
||||
</dependency>
|
||||
<dependency name='network-service' grouping='require_all' restart_on='none' type='service'>
|
||||
<service_fmri value='svc:/network/service' />
|
||||
</dependency>
|
||||
<dependency name='system-log' grouping='optional_all' restart_on='none' type='service'>
|
||||
<service_fmri value='svc:/system/system-log' />
|
||||
</dependency>
|
||||
<dependency name='config-files' grouping='require_any' restart_on='refresh' type='path'>
|
||||
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/pop3d-ssl' />
|
||||
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/pop3d' />
|
||||
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/imapd-ssl' />
|
||||
<service_fmri value='file://localhost@PKG_SYSCONFDIR@/imapd' />
|
||||
</dependency>
|
||||
<dependency name='authlib' grouping='require_all' restart_on='none' type='service'>
|
||||
<service_fmri value='svc:/@SMF_PREFIX@/courier-authlib' />
|
||||
</dependency>
|
||||
<exec_method name='start' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.courier-imap@ start' timeout_seconds='120' />
|
||||
<exec_method name='stop' type='method' exec='@PREFIX@/@SMF_METHOD_FILE.courier-imap@ stop' timeout_seconds='60' />
|
||||
<property_group name='startd' type='framework'>
|
||||
<propval name='ignore_error' type='astring' value='core,signal' />
|
||||
</property_group>
|
||||
<property_group name='general' type='framework'>
|
||||
<propval name='action_authorization' type='astring' value='solaris.smf.manage.courier-imap' />
|
||||
</property_group>
|
||||
<template>
|
||||
<common_name>
|
||||
<loctext xml:lang='C'>imap - Courier IMAP provides access to Maildirs</loctext>
|
||||
</common_name>
|
||||
<documentation>
|
||||
<manpage title='imapd' section='8' manpath='@PREFIX@/@PKGMANDIR@' />
|
||||
</documentation>
|
||||
</template>
|
||||
</service>
|
||||
</service_bundle>
|
|
@ -0,0 +1,37 @@
|
|||
# $NetBSD: options.mk,v 1.3 2018/01/10 00:19:48 rillig Exp $
|
||||
|
||||
PKG_OPTIONS_VAR= PKG_OPTIONS.courier-imap
|
||||
PKG_SUPPORTED_OPTIONS= courier-gnutls fam
|
||||
PKG_SUGGESTED_OPTIONS= # empty
|
||||
|
||||
.include "../../mk/bsd.options.mk"
|
||||
|
||||
###
|
||||
### Support using the GNU TLS tools for creating certificates; otherwise
|
||||
### default to using OpenSSL.
|
||||
###
|
||||
COURIER_CERTTOOL= ${PREFIX}/bin/certtool
|
||||
.if !empty(PKG_OPTIONS:Mcourier-gnutls)
|
||||
COURIER_OPENSSL= ${PREFIX}/bin/openssl
|
||||
.else
|
||||
USE_TOOLS+= openssl:run
|
||||
COURIER_OPENSSL= ${TOOLS_OPENSSL}
|
||||
.endif
|
||||
|
||||
SUBST_CLASSES+= tls
|
||||
SUBST_FILES.tls= libs/imap/mkimapdcert.in libs/imap/mkpop3dcert.in
|
||||
SUBST_STAGE.tls= pre-configure
|
||||
.if !empty(PKG_OPTIONS:Mcourier-gnutls)
|
||||
SUBST_SED.tls= -e "s|@ssllib@|gnutls|g"
|
||||
.else
|
||||
SUBST_SED.tls= -e "s|@ssllib@|openssl|g"
|
||||
.endif
|
||||
|
||||
###
|
||||
### File Alteration Monitor support. This allows multiple imapd or pop3d
|
||||
### processes to be notified of changes to the underlying maildirs instead
|
||||
### of needing to poll the maildirs.
|
||||
###
|
||||
.if !empty(PKG_OPTIONS:Mfam)
|
||||
. include "../../mk/fam.buildlink3.mk"
|
||||
.endif
|
|
@ -0,0 +1,35 @@
|
|||
$NetBSD$
|
||||
|
||||
|
||||
--- Makefile.in.orig 2019-03-28 08:34:40.000000000 +0900
|
||||
+++ Makefile.in 2020-11-09 12:20:23.322706380 +0900
|
||||
@@ -432,9 +432,9 @@ man_MANS = couriertcpd.1 deliverquota.8
|
||||
EXTRA_DIST = README README.cygwin COPYING.GPL NEWS.html $(TEMPLFILES) \
|
||||
pgpkeys.txt sysconftool
|
||||
sysconf_DATA = imapd.dist imapd-ssl.dist pop3d.dist pop3d-ssl.dist \
|
||||
- imapd.cnf pop3d.cnf quotawarnmsg.example
|
||||
+ imapd.cnf pop3d.cnf
|
||||
|
||||
-libexec_SCRIPTS = imapd.rc imapd-ssl.rc pop3d.rc pop3d-ssl.rc
|
||||
+libexec_SCRIPTS =
|
||||
HTML2TXT = links -dump -no-numbering -no-references
|
||||
|
||||
# NOTE: when using a complex directory hierarchy it is only necessary to
|
||||
@@ -1454,6 +1454,9 @@ install-exec-local:
|
||||
for f in mkimapdcert mkpop3dcert mkdhparams; \
|
||||
do rm -f $(DESTDIR)$(sbindir)/$$f ; \
|
||||
$(LN_S) $(databindir)/$$f $(DESTDIR)$(sbindir)/$$f ; done
|
||||
+ for f in imapd-ssl imapd pop3d pop3d-ssl ; \
|
||||
+ do rm -f $(DESTDIR)$(sbindir)/$$f ; \
|
||||
+ $(LN_S) $(databindir)/$$f.rc $(DESTDIR)$(sbindir)/$$f ; done
|
||||
$(mkinstalldirs) $(DESTDIR)$(localstatedir)
|
||||
|
||||
install-exec-hook:
|
||||
@@ -1480,7 +1483,6 @@ install-data-local: install-man
|
||||
uninstall-local:
|
||||
for f in mkimapdcert mkpop3dcert mkdhparams; \
|
||||
do rm -f $(DESTDIR)$(sbindir)/$$f ; done
|
||||
- rm -f $(DESTDIR)$(bindir)/couriertls
|
||||
|
||||
INSTALL.txt: INSTALL.html
|
||||
$(HTML2TXT) INSTALL.html >INSTALL.txt
|
|
@ -0,0 +1,14 @@
|
|||
$NetBSD: patch-ad,v 1.11 2010/11/10 10:00:06 adam Exp $
|
||||
|
||||
--- configure.orig 2010-10-04 11:12:59.000000000 +0000
|
||||
+++ configure
|
||||
@@ -11061,9 +11061,6 @@ else
|
||||
fi
|
||||
|
||||
|
||||
-INSTALL_DATA='${INSTALL} -m 0600'
|
||||
-INSTALL_SCRIPT='${INSTALL}'
|
||||
-
|
||||
if ulimit -v 2>/dev/null
|
||||
then
|
||||
ULIMIT='ulimit -v'
|
|
@ -0,0 +1,20 @@
|
|||
$NetBSD: patch-ae,v 1.8 2005/08/11 00:04:01 jlam Exp $
|
||||
|
||||
--- imapd-ssl.rc.in.orig 2005-07-01 21:13:56.000000000 -0400
|
||||
+++ imapd-ssl.rc.in
|
||||
@@ -9,6 +9,7 @@ prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
bindir=@bindir@
|
||||
libexecdir=@libexecdir@
|
||||
+sbindir=@sbindir@
|
||||
|
||||
if test ! -f @sysconfdir@/imapd
|
||||
then
|
||||
@@ -40,6 +41,7 @@ start)
|
||||
exec_prefix=@exec_prefix@ ;
|
||||
bindir=@bindir@ ;
|
||||
libexecdir=@libexecdir@ ;
|
||||
+ sbindir=@sbindir@ ;
|
||||
. @sysconfdir@/imapd ; \
|
||||
. @sysconfdir@/imapd-ssl ; \
|
||||
PROXY_HOSTNAME=$PROXY_HOSTNAME ; \
|
|
@ -0,0 +1,20 @@
|
|||
$NetBSD: patch-af,v 1.9 2010/06/15 23:07:07 pettai Exp $
|
||||
|
||||
--- imapd.rc.in.orig 2005-07-01 21:13:56.000000000 -0400
|
||||
+++ imapd.rc.in
|
||||
@@ -9,6 +9,7 @@ prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
bindir=@bindir@
|
||||
libexecdir=@libexecdir@
|
||||
+sbindir=@sbindir@
|
||||
|
||||
if test ! -f @sysconfdir@/imapd
|
||||
then
|
||||
@@ -40,6 +41,7 @@ start)
|
||||
exec_prefix=@exec_prefix@ ;
|
||||
bindir=@bindir@ ;
|
||||
libexecdir=@libexecdir@ ;
|
||||
+ sbindir=@sbindir@ ;
|
||||
. @sysconfdir@/imapd-ssl ; \
|
||||
. @sysconfdir@/imapd ; \
|
||||
IMAP_STARTTLS=$IMAPDSTARTTLS ; \
|
|
@ -0,0 +1,20 @@
|
|||
$NetBSD: patch-ag,v 1.8 2005/08/11 00:04:01 jlam Exp $
|
||||
|
||||
--- pop3d-ssl.rc.in.orig 2005-07-01 21:13:56.000000000 -0400
|
||||
+++ pop3d-ssl.rc.in
|
||||
@@ -9,6 +9,7 @@ prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
bindir=@bindir@
|
||||
libexecdir=@libexecdir@
|
||||
+sbindir=@sbindir@
|
||||
|
||||
if test ! -f @sysconfdir@/pop3d
|
||||
then
|
||||
@@ -33,6 +34,7 @@ start)
|
||||
exec_prefix=@exec_prefix@ ;
|
||||
bindir=@bindir@ ;
|
||||
libexecdir=@libexecdir@ ;
|
||||
+ sbindir=@sbindir@ ;
|
||||
. @sysconfdir@/pop3d ; \
|
||||
. @sysconfdir@/pop3d-ssl ; \
|
||||
PROXY_HOSTNAME=$PROXY_HOSTNAME ; \
|
|
@ -0,0 +1,20 @@
|
|||
$NetBSD: patch-ah,v 1.8 2010/06/15 23:07:07 pettai Exp $
|
||||
|
||||
--- pop3d.rc.in.orig 2005-07-01 21:13:56.000000000 -0400
|
||||
+++ pop3d.rc.in
|
||||
@@ -9,6 +9,7 @@ prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
bindir=@bindir@
|
||||
libexecdir=@libexecdir@
|
||||
+sbindir=@sbindir@
|
||||
|
||||
if test ! -f @sysconfdir@/pop3d
|
||||
then
|
||||
@@ -32,6 +33,7 @@ start)
|
||||
exec_prefix=@exec_prefix@ ;
|
||||
bindir=@bindir@ ;
|
||||
libexecdir=@libexecdir@ ;
|
||||
+ sbindir=@sbindir@ ;
|
||||
. @sysconfdir@/pop3d-ssl ; \
|
||||
. @sysconfdir@/pop3d ; \
|
||||
PROXY_HOSTNAME=$PROXY_HOSTNAME ; \
|
|
@ -0,0 +1,28 @@
|
|||
$NetBSD: patch-ak,v 1.4 2010/11/10 10:00:06 adam Exp $
|
||||
|
||||
--- imap/mkimapdcert.in.orig 2010-06-29 01:39:59.000000000 +0000
|
||||
+++ libs/imap/mkimapdcert.in
|
||||
@@ -9,7 +9,13 @@
|
||||
# IMAP over SSL. Normally this script would get called by an automatic
|
||||
# package installation routine.
|
||||
|
||||
-if test "@ssllib@" = "openssl"
|
||||
+case "$1" in
|
||||
+gnutls) ssllib=gnutls ;;
|
||||
+openssl) ssllib=openssl ;;
|
||||
+*) ssllib="@ssllib@" ;;
|
||||
+esac
|
||||
+
|
||||
+if test "$ssllib" = "openssl"
|
||||
then
|
||||
test -x @OPENSSL@ || exit 0
|
||||
else
|
||||
@@ -36,7 +42,7 @@ cleanup() {
|
||||
|
||||
cd @certsdir@
|
||||
|
||||
-if test "@ssllib@" = "openssl"
|
||||
+if test "$ssllib" = "openssl"
|
||||
then
|
||||
cp /dev/null @certsdir@/imapd.pem
|
||||
chmod 600 @certsdir@/imapd.pem
|
|
@ -0,0 +1,19 @@
|
|||
$NetBSD: patch-ao,v 1.2 2010/11/10 10:00:06 adam Exp $
|
||||
|
||||
--- libs/imap/mkpop3dcert.in.orig 2013-11-11 02:56:33.000000000 +0000
|
||||
+++ libs/imap/mkpop3dcert.in
|
||||
@@ -8,7 +8,13 @@
|
||||
# POP3 over SSL. Normally this script would get called by an automatic
|
||||
# package installation routine.
|
||||
|
||||
-if test "@ssllib@" = "openssl"
|
||||
+case "$1" in
|
||||
+gnutls) ssllib="gnutls" ;;
|
||||
+openssl) ssllib="openssl" ;;
|
||||
+*) ssllib="@ssllib@" ;;
|
||||
+esac
|
||||
+
|
||||
+if test "$ssllib" = "openssl"
|
||||
then
|
||||
test -x @OPENSSL@ || exit 0
|
||||
else
|
Loading…
Reference in New Issue