diff options
author | sergei <sergei@FreeBSD.org> | 2003-12-24 10:42:36 +0000 |
---|---|---|
committer | sergei <sergei@FreeBSD.org> | 2003-12-24 10:42:36 +0000 |
commit | 3740b9166406692a2be530fb977bf23b9b0eae75 (patch) | |
tree | be105a18bc7a63aeef5c1067e26aca7ea2f42d51 /mail/relay-ctrl | |
parent | 6a55f7896f6c283d2c0b7133ac55159f483be86c (diff) | |
download | FreeBSD-ports-3740b9166406692a2be530fb977bf23b9b0eae75.zip FreeBSD-ports-3740b9166406692a2be530fb977bf23b9b0eae75.tar.gz |
Add relay-ctrl 3.1.1, SMTP Relaying Control for qmail & tcpserver.
This set of programs controls access to relaying for users that
authenticate using either POP3 using the qmail-popup/qmail-pop3d
or pop3front servers, or IMAP using Courier IMAP.
Author: Bruce Guenther <bruceg@em.ca>
WWW: http://untroubled.org/relay-ctrl/
PR: 60471
Submitted by: Fumihiko Kimura <jfkimura@yahoo.co.jp>
Diffstat (limited to 'mail/relay-ctrl')
-rw-r--r-- | mail/relay-ctrl/Makefile | 51 | ||||
-rw-r--r-- | mail/relay-ctrl/distinfo | 1 | ||||
-rw-r--r-- | mail/relay-ctrl/pkg-descr | 6 | ||||
-rw-r--r-- | mail/relay-ctrl/pkg-install.in | 63 | ||||
-rw-r--r-- | mail/relay-ctrl/pkg-message | 4 | ||||
-rw-r--r-- | mail/relay-ctrl/pkg-plist | 16 |
6 files changed, 141 insertions, 0 deletions
diff --git a/mail/relay-ctrl/Makefile b/mail/relay-ctrl/Makefile new file mode 100644 index 0000000..0331ec5 --- /dev/null +++ b/mail/relay-ctrl/Makefile @@ -0,0 +1,51 @@ +# New ports collection makefile for: relay-ctrl +# Date created: 2003-12-05 +# Whom: Fumihiko Kimura <jfkimura@yahoo.co.jp> +# +# $FreeBSD$ +# + +PORTNAME= relay-ctrl +PORTVERSION= 3.1.1 +CATEGORIES= mail +MASTER_SITES= http://untroubled.org/${PORTNAME}/ + +MAINTAINER= jfkimura@yahoo.co.jp +COMMENT= SMTP Relaying Control for qmail & tcpserver + +.if defined(WITH_DAEMONTOOLS) +RUN_DEPENDS+= ${LOCALBASE}/bin/envdir:${PORTSDIR}/sysutils/daemontools +.endif + +RELAY_CTRL_EXPIRY?= 900 +RELAY_CTRL_RELAYCLIENT?= # e.g. "@example.com" (default: empty) + +MAN8= relay-ctrl-age.8 relay-ctrl-allow.8 relay-ctrl-check.8 \ + relay-ctrl-send.8 relay-ctrl-udp.8 +DOCS= ANNOUNCEMENT NEWS README TODO packet.html + +PKGINSTALL= ${WRKDIR}/pkg-install +PKGDEINSTALL= ${WRKDIR}/pkg-install +PKGMESSAGE= ${WRKDIR}/pkg-message + +do-configure: + ${ECHO_CMD} "${CC} ${CFLAGS}" > ${WRKSRC}/conf-cc + ${ECHO_CMD} "${CC} ${STRIP}" > ${WRKSRC}/conf-ld + ${ECHO_CMD} "${PREFIX}/bin" > ${WRKSRC}/conf-bin + ${ECHO_CMD} "${MANPREFIX}/man" > ${WRKSRC}/conf-man + +do-install: + cd ${WRKSRC} && ./installer +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR} +.endif + @${SED} -e 's,%%EXPIRY%%,${RELAY_CTRL_EXPIRY},' \ + -e 's,%%FIXUP%%,${RELAY_CTRL_RELAYCLIENT},' \ + ${PKGDIR}/pkg-install.in > ${PKGINSTALL} + @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @${SED} -e 's,%%PREFIX%%,${PREFIX},g; s,%%LOCALBASE%%,${LOCALBASE},g' \ + ${PKGDIR}/pkg-message > ${PKGMESSAGE} + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/mail/relay-ctrl/distinfo b/mail/relay-ctrl/distinfo new file mode 100644 index 0000000..6e2684f --- /dev/null +++ b/mail/relay-ctrl/distinfo @@ -0,0 +1 @@ +MD5 (relay-ctrl-3.1.1.tar.gz) = b35133e21bf52b532b4b839e11cb883c diff --git a/mail/relay-ctrl/pkg-descr b/mail/relay-ctrl/pkg-descr new file mode 100644 index 0000000..f238e0e --- /dev/null +++ b/mail/relay-ctrl/pkg-descr @@ -0,0 +1,6 @@ +This set of programs controls access to relaying for users that +authenticate using either POP3 using the qmail-popup/qmail-pop3d +or pop3front servers, or IMAP using Courier IMAP. + +Author: Bruce Guenther <bruceg@em.ca> +WWW: http://untroubled.org/relay-ctrl/ diff --git a/mail/relay-ctrl/pkg-install.in b/mail/relay-ctrl/pkg-install.in new file mode 100644 index 0000000..5160faa --- /dev/null +++ b/mail/relay-ctrl/pkg-install.in @@ -0,0 +1,63 @@ +#!/bin/sh + +[ $# != 2 ] && exit 1 +PKGNAME=$1 +ACTION=$2 + + +CHMOD=/bin/chmod +ECHO_CMD=echo +RM='/bin/rm -rf' +CP='/bin/cp -p' +CMP='/usr/bin/cmp -s' +MKDIR='/bin/mkdir -p' + +RELAYCTRL_EXPIRY=600 + +PREFIX=${PKG_PREFIX} +SPOOLDIR=/var/spool +ETCDIR=${PREFIX}/etc/relay-ctrl +RELAYCLIENT=${ETCDIR}/RELAY_CTRL_RELAYCLIENT +EXPIRY=${ETCDIR}/RELAY_CTRL_EXPIRY + +case "$ACTION" in + +POST-INSTALL) + ${MKDIR} ${ETCDIR} ${SPOOLDIR}/relay-ctrl/allow + ${CHMOD} 0700 ${SPOOLDIR}/relay-ctrl + ${CHMOD} 0777 ${SPOOLDIR}/relay-ctrl/allow + ${ECHO_CMD} "${SPOOLDIR}/relay-ctrl/allow" > ${ETCDIR}/RELAY_CTRL_DIR + ${ECHO_CMD} "%%RELAYCTRL_EXPIRY%%" > ${EXPIRY} + if [ -z "%%FIXUP%%" ]; then + ${ECHO_CMD} "===> RELAY-CTRL: Script do not create RELAY_CTRL_RELAYCLIENT" + else + if [ -e "${RELAYCLIENT}" ]; then + ${ECHO_CMD} ":allow,RELAYCLIENT='%%FIXUP%%'" > ${RELAYCLIENT}-sample + else + ${ECHO_CMD} ":allow,RELAYCLIENT='%%FIXUP%%'" > ${RELAYCLIENT} + ${CP} ${RELAYCLIENT} ${RELAYCLIENT}-dist + fi + fi + ;; + +DEINSTALL) + ${RM} ${SPOOLDIR}/relay-ctrl + if ${CMP} ${RELAYCLIENT} ${RELAYCLIENT}-dist; then \ + ${RM} ${RELAYCLIENT} + fi + if [ -e ${RELAYCLIENT}-dist ]; then + ${RM} ${RELAYCLIENT}-dist + else + ${RM} ${RELAYCLIENT}-sample + fi + ;; + +PRE-INSTALL|POST-DEINSTALL) + ;; + +*) + exit 1 + ;; +esac + +exit diff --git a/mail/relay-ctrl/pkg-message b/mail/relay-ctrl/pkg-message new file mode 100644 index 0000000..08a5eed --- /dev/null +++ b/mail/relay-ctrl/pkg-message @@ -0,0 +1,4 @@ +You may need to edit root's crontab: + +#minute hour mday month wday who command +* * * * * root %%LOCALBASE%%/bin/envdir %%PREFIX%%/etc/relay-ctrl %%PREFIX%%/bin/relay-ctrl-age diff --git a/mail/relay-ctrl/pkg-plist b/mail/relay-ctrl/pkg-plist new file mode 100644 index 0000000..d873f95 --- /dev/null +++ b/mail/relay-ctrl/pkg-plist @@ -0,0 +1,16 @@ +@comment $FreeBSD$ +bin/relay-ctrl-age +bin/relay-ctrl-allow +bin/relay-ctrl-chdir +bin/relay-ctrl-check +bin/relay-ctrl-send +bin/relay-ctrl-udp +etc/relay-ctrl/RELAY_CTRL_DIR +etc/relay-ctrl/RELAY_CTRL_EXPIRY +@unexec rmdir %D/etc/relay-ctrl 2>/dev/null || true +%%PORTDOCS%%%%DOCSDIR%%/ANNOUNCEMENT +%%PORTDOCS%%%%DOCSDIR%%/NEWS +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/TODO +%%PORTDOCS%%%%DOCSDIR%%/packet.html +%%PORTDOCS%%@dirrm %%DOCSDIR%% |