aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2005-11-09 14:44:52 +0000
committerRenato Botelho <garga@FreeBSD.org>2005-11-09 14:44:52 +0000
commitaac3781ea8082c889003d46c4c97619a208b44ba (patch)
tree015b45cd32a8cd8d7e9b0e42266349d79132ed1d
parentad22739ea8fa52cdf9f40c0ea7f5707ec4f56581 (diff)
downloadports-aac3781ea8082c889003d46c4c97619a208b44ba.tar.gz
ports-aac3781ea8082c889003d46c4c97619a208b44ba.zip
Notes
-rw-r--r--mail/Makefile1
-rw-r--r--mail/qmail-activedir/Makefile70
-rw-r--r--mail/qmail-activedir/distinfo3
-rw-r--r--mail/qmail-activedir/files/pkg-message.in45
-rw-r--r--mail/qmail-activedir/pkg-descr5
5 files changed, 124 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile
index 0c16bbc9ef9e..f59488b4c45d 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -413,6 +413,7 @@
SUBDIR += qconfirm
SUBDIR += qmHandle
SUBDIR += qmail
+ SUBDIR += qmail-activedir
SUBDIR += qmail-autoresponder
SUBDIR += qmail-conf
SUBDIR += qmail-contrib
diff --git a/mail/qmail-activedir/Makefile b/mail/qmail-activedir/Makefile
new file mode 100644
index 000000000000..e745e6b1f980
--- /dev/null
+++ b/mail/qmail-activedir/Makefile
@@ -0,0 +1,70 @@
+# New ports collection makefile for: qmail-activedir
+# Date created: 2005-11-08
+# Whom: Jean Milanez Melo <jmelo@freebsdbrasil.com.br>
+#
+# $FreeBSD$
+#
+
+PORTNAME= qmail-activedir
+PORTVERSION= 0.15
+CATEGORIES= mail
+MASTER_SITES= http://fo2k.com/qmail-activedir/
+
+MAINTAINER= jmelo@freebsdbrasil.com.br
+COMMENT= Programs to allow qmail to authenticate users through a MS ad
+
+BUILD_DEPENDS= ${QMAIL_PREFIX}/bin/qmail-send:${PORTSDIR}/mail/qmail
+RUN_DEPENDS= ${BUILD_DEPENDS}
+
+SUB_FILES= pkg-message
+SUB_LIST+= QMAIL_PREFIX=${QMAIL_PREFIX}
+USE_OPENLDAP= yes
+USE_REINPLACE= yes
+QMAIL_PREFIX?= /var/qmail
+
+BINARIES= checkadpassword qmail-adgetpw create_alias_files
+
+CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib -Wall -lldap
+
+PLIST_FILES= bin/checkadpassword \
+ bin/create_alias_files \
+ bin/qmail-adgetpw
+
+PORTDOCS= INSTALL README
+
+.if defined(WITH_OPENLDAP_VER)
+WANT_OPENLDAP_VER= ${WITH_OPENLDAP_VER}
+.endif
+
+.include <bsd.port.pre.mk>
+
+post-patch:
+ @${REINPLACE_CMD} -e 's,/var/qmail,${QMAIL_PREFIX},g' \
+ -e 's,\(#define AD_USE_GC\) 1,\1 0,' \
+ -e 's,\(#define AD_ONLY_USE_SSL\) 1,\1 0,' \
+ ${WRKSRC}/ad_func.h
+
+do-build:
+.for prog in ${BINARIES}
+ ${CC} ${CFLAGS} ${WRKSRC}/${prog}.c ${WRKSRC}/ad_func.c -o \
+ ${WRKSRC}/${prog}
+.endfor
+
+do-install:
+.for prog in ${BINARIES}
+ ${INSTALL_PROGRAM} ${WRKSRC}/${prog} ${PREFIX}/bin/
+.endfor
+ ${CHMOD} 700 ${PREFIX}/bin/checkadpassword \
+ ${PREFIX}/bin/create_alias_files
+ ${CHMOD} 711 ${PREFIX}/bin/qmail-adgetpw
+ ${CHOWN} root:qmail ${PREFIX}/bin/qmail-adgetpw
+ ${CHOWN} root:wheel ${PREFIX}/bin/create_alias_files
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+.for i in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
+.endfor
+.endif
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/mail/qmail-activedir/distinfo b/mail/qmail-activedir/distinfo
new file mode 100644
index 000000000000..97ece52bde4c
--- /dev/null
+++ b/mail/qmail-activedir/distinfo
@@ -0,0 +1,3 @@
+MD5 (qmail-activedir-0.15.tar.gz) = f0e839132db948f047dee61fb701ff38
+SHA256 (qmail-activedir-0.15.tar.gz) = ec32b180d5ad6a902e3e748fcfe29043480dbb1a457092d8232dac8ce3f0fe97
+SIZE (qmail-activedir-0.15.tar.gz) = 12005
diff --git a/mail/qmail-activedir/files/pkg-message.in b/mail/qmail-activedir/files/pkg-message.in
new file mode 100644
index 000000000000..589bc941076f
--- /dev/null
+++ b/mail/qmail-activedir/files/pkg-message.in
@@ -0,0 +1,45 @@
+*****************************************************************************
+You have installed the qmail-activedir.
+
+Now you need follow this steps:
+
+1) create the control files.
+
+2.a) Test
+
+# %%QMAIL_PREFIX%%/bin/qmail-popup blah %%PREFIX%%/bin/checkadpassword id
+
+Put in a valid username and password and it should give you the results of id.
+Do the same with pwd to make sure that the user, group and directory are
+correct.
+
+Do it again with an invalid username and password to verify that it will
+actually reject failures.
+
+Check the auth log to verify that the failure occurred.
+
+2.b) Test some more
+
+Next test the ad_getpw:
+
+# %%PREFIX%%/bin/ad_getpw user
+It should return the user, uid, gid, homedir, separated by NULL character
+
+2.c) Just using create_alias_files will let you know if it works...
+Do %%PREFIX%%/bin/create_alias_files -h for more info.
+
+3) Copy the original someplace and rename:
+# mv %%QMAIL_PREFIX%%/bin/qmail-getpw %%QMAIL_PREFIX%%/bin/qmail-getpw_old
+# cp %%PREFIX%%/bin/qmail-adgetpw %%QMAIL_PREFIX%%/bin/qmail-getpw
+
+4) Update your qmail pop scripts (run file) like this:
+...
+%%QMAIL_PREFIX%%/bin/qmail-popup "${POPUPHOST-`sed 1q %%QMAIL_PREFIX%%/control/me`}" \
+%%PREFIX%%/checkadpassword \
+%%QMAIL_PREFIX%%/bin/qmail-pop3d "${MAILDIRNAME-Maildir}"
+...
+
+and restart. Run some trial tests.
+
+For more information you should read %%DOCSDIR%%/README.
+
diff --git a/mail/qmail-activedir/pkg-descr b/mail/qmail-activedir/pkg-descr
new file mode 100644
index 000000000000..9c3d126dcc82
--- /dev/null
+++ b/mail/qmail-activedir/pkg-descr
@@ -0,0 +1,5 @@
+A few programs to allow qmail to authenticate users through a Microsoft
+Active Directory.
+
+Author: Leslie VanExel <prok@fo2k.com>
+WWW: http://fo2k.com/qmail-activedir/