Update to use the authdaemon framework, instead of directly accessing
the static authentication modules. This allows us to add two new flavors: ldap and mysql, which communicate via the authdaemon. Note that this requires users to rehaul their configuration scripts; the INSTALL script should detect this and print out a message.
This commit is contained in:
parent
a1c7963065
commit
5fe181752d
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.12 2001/02/28 04:55:03 avsm Exp $
|
||||
# $OpenBSD: Makefile,v 1.13 2001/03/22 03:10:48 avsm Exp $
|
||||
|
||||
DISTNAME= courier-imap-1.3.5
|
||||
CATEGORIES= mail
|
||||
@ -15,12 +15,13 @@ PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
FLAVORS= pop3
|
||||
FLAVORS= pop3 mysql ldap
|
||||
FLAVOR?=
|
||||
|
||||
SEPARATE_BUILD= concurrent
|
||||
COURIERCONF= ${SYSCONFDIR}/courier-imap
|
||||
SUBST_VARS= COURIERCONF
|
||||
COURIERSTATE= /var/run/courier-imap
|
||||
SUBST_VARS= COURIERSTATE COURIERCONF
|
||||
EXAMPLE_DIR= ${PREFIX}/share/examples/courier-imap
|
||||
|
||||
CONFIGURE_STYLE= gnu old
|
||||
@ -29,17 +30,37 @@ CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib" \
|
||||
CPPFLAGS="${CFLAGS} -I${LOCALBASE}/include"
|
||||
CONFIGURE_ARGS= --disable-root-check --datadir=${PREFIX}/sbin \
|
||||
--with-userdb=${SYSCONFDIR}/userdb --with-authuserdb \
|
||||
--without-authmysql --without-authldap \
|
||||
--sysconfdir=${COURIERCONF} \
|
||||
--sysconfdir=${COURIERCONF} --with-authdaemon \
|
||||
--with-authdaemonvar=${COURIERSTATE} \
|
||||
--enable-workarounds-for-imap-client-bugs
|
||||
|
||||
.if ${FLAVOR:L:Mmysql} && ${FLAVOR:L:Mldap}
|
||||
.BEGIN:
|
||||
@echo "Conflicting flavors: You must choose either ldap or mysql."
|
||||
@exit 1
|
||||
.endif
|
||||
|
||||
.if ${FLAVOR:L:Mmysql}
|
||||
CONFIGURE_ARGS+= --with-authmysql
|
||||
LIB_DEPENDS+= mysqlclient::databases/mysql
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-authmysql
|
||||
.endif
|
||||
|
||||
.if ${FLAVOR:L:Mldap}
|
||||
CONFIGURE_ARGS+= --with-authldap
|
||||
LIB_DEPENDS+= ldap.2::databases/openldap
|
||||
.else
|
||||
CONFIGURE_ARGS+= --without-authldap
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/courier-imap
|
||||
.for i in pop3d-ssl imapd-ssl pop3d imapd
|
||||
${INSTALL_DATA} ${WRKINST}${COURIERCONF}/${i}.dist ${EXAMPLE_DIR}/${i}
|
||||
${INSTALL_DATA} ${WRKINST}${COURIERCONF}/$i.dist ${EXAMPLE_DIR}/$i
|
||||
.endfor
|
||||
.for i in imapd pop3d
|
||||
${INSTALL_DATA} ${WRKINST}${COURIERCONF}/${i}.cnf ${EXAMPLE_DIR}
|
||||
.for i in imapd.cnf pop3d.cnf quotawarnmsg.example authdaemonrc.dist
|
||||
${INSTALL_DATA} ${WRKINST}${COURIERCONF}/$i ${EXAMPLE_DIR}
|
||||
.endfor
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -9,6 +9,8 @@ authentication modules (e.g. /etc/passwd, LDAP, PAM), virtual mailbox
|
||||
support, resource controls, SSL/TLS, shared folders, and IPv6 support.
|
||||
|
||||
Flavors:
|
||||
pop3 - build with support for POP3/POP3-SSL
|
||||
pop3 - build with support for POP3/POP3-SSL
|
||||
ldap - build with LDAP user lookup support
|
||||
mysql - build with MySQL user database support
|
||||
|
||||
WWW: ${HOMEPAGE}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $OpenBSD: INSTALL,v 1.2 2001/02/21 19:04:57 avsm Exp $
|
||||
# $OpenBSD: INSTALL,v 1.3 2001/03/22 03:10:50 avsm Exp $
|
||||
#
|
||||
# courier-imap installation to detect old-format config files
|
||||
|
||||
@ -27,6 +27,19 @@ do_notice()
|
||||
echo
|
||||
}
|
||||
|
||||
do_notice2()
|
||||
{
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| As of Courier-IMAP 1.3.5, we have switched to using the "
|
||||
echo "| authdaemon mechanism to handle authentication."
|
||||
echo "| "
|
||||
echo "| Please check your configuration files and update them "
|
||||
echo "| from ${PREFIX}/share/examples/courier-imap"
|
||||
echo "+---------------"
|
||||
echo
|
||||
}
|
||||
|
||||
# verify proper execution
|
||||
#
|
||||
if [ $# -ne 2 ]; then
|
||||
@ -42,8 +55,11 @@ case $2 in
|
||||
;;
|
||||
POST-INSTALL)
|
||||
if [ -f /etc/imapd.cnf -o -f /etc/imapd.config -o -f /etc/imapd-ssl.config ]; then
|
||||
do_notice $1
|
||||
do_notice
|
||||
fi
|
||||
if [ ! -f ${COURIERCONF}/authdaemonrc ]; then
|
||||
do_notice2
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
|
||||
|
@ -2,17 +2,22 @@
|
||||
Example config files for Courier-IMAP have been installed
|
||||
in ${PREFIX}/share/examples/courier-imap.
|
||||
|
||||
Copy imapd, imapd-ssl and imapd.cnf to ${COURIERCONF} and
|
||||
Copy all of the files to ${COURIERCONF} and
|
||||
edit them to your site's needs. Pay particular attention to
|
||||
the details in imapd.cnf, and read ssl(8) if necessary.
|
||||
You MUST set the CN in imapd.cnf to the hostname by which
|
||||
your IMAPserver is accessed, or else clients will complain.
|
||||
your IMAP server is accessed, or else clients will complain.
|
||||
|
||||
When this is done, you can use the 'mkimapdcert' script
|
||||
to automatically generate a server certificate, which
|
||||
is installed into /etc/ssl/private/imapd.pem
|
||||
|
||||
To control the daemon use ${PREFIX}/libexec/imapd.rc and
|
||||
${PREFIX}/libexec/imapd-ssl.rc
|
||||
${PREFIX}/libexec/imapd-ssl.rc, and to run the authdaemon,
|
||||
place the following in /etc/rc.local:
|
||||
|
||||
mkdir -p ${COURIERSTATE}
|
||||
${PREFIX}/libexec/authlib/authdaemond start
|
||||
|
||||
If you also installed the 'pop3' flavor, then the relevant
|
||||
configuration files are called pop3d-* instead of imapd-*
|
||||
|
3
mail/courier-imap/pkg/PFRAG.ldap
Normal file
3
mail/courier-imap/pkg/PFRAG.ldap
Normal file
@ -0,0 +1,3 @@
|
||||
@comment $OpenBSD: PFRAG.ldap,v 1.1 2001/03/22 03:10:50 avsm Exp $
|
||||
libexec/authlib/authdaemond.ldap
|
||||
man/man8/authldap.8
|
3
mail/courier-imap/pkg/PFRAG.mysql
Normal file
3
mail/courier-imap/pkg/PFRAG.mysql
Normal file
@ -0,0 +1,3 @@
|
||||
@comment $OpenBSD: PFRAG.mysql,v 1.1 2001/03/22 03:10:50 avsm Exp $
|
||||
libexec/authlib/authdaemond.mysql
|
||||
man/man8/authmysql.8
|
@ -1,29 +1,22 @@
|
||||
@comment $OpenBSD: PLIST,v 1.5 2000/12/29 18:51:57 avsm Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.6 2001/03/22 03:10:51 avsm Exp $
|
||||
bin/couriertls
|
||||
bin/imapd
|
||||
bin/maildirmake
|
||||
libexec/authlib/authcram
|
||||
libexec/authlib/authcustom
|
||||
libexec/authlib/authpwd
|
||||
libexec/authlib/authuserdb
|
||||
libexec/authlib/authdaemon
|
||||
libexec/authlib/authdaemond
|
||||
libexec/authlib/authdaemond.plain
|
||||
libexec/couriertcpd
|
||||
libexec/deliverquota
|
||||
libexec/imapd-ssl.rc
|
||||
libexec/imapd.rc
|
||||
libexec/logger
|
||||
libexec/makedatprog
|
||||
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/couriertcpd.8
|
||||
man/man8/deliverquota.8
|
||||
man/man8/imapd.8
|
||||
@ -40,8 +33,12 @@ sbin/pw2userdb
|
||||
sbin/userdb
|
||||
sbin/userdbpw
|
||||
sbin/vchkpw2userdb
|
||||
share/examples/courier-imap/authdaemonrc.dist
|
||||
share/examples/courier-imap/imapd
|
||||
share/examples/courier-imap/imapd-ssl
|
||||
share/examples/courier-imap/imapd.cnf
|
||||
share/examples/courier-imap/imapd
|
||||
share/examples/courier-imap/quotawarnmsg.example
|
||||
%%pop3%%
|
||||
%%ldap%%
|
||||
%%mysql%%
|
||||
@dirrm share/examples/courier-imap
|
||||
|
Loading…
Reference in New Issue
Block a user