pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/relay-ctrl Initial import of relay-ctrl 3.1.1.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/091ae80ee88a
branches:  trunk
changeset: 526074:091ae80ee88a
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Wed Feb 28 14:12:40 2007 +0000

description:
Initial import of relay-ctrl 3.1.1.

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 or Dovecot.

diffstat:

 mail/relay-ctrl/DESCR                           |   3 +
 mail/relay-ctrl/MESSAGE                         |  14 +++++++
 mail/relay-ctrl/Makefile                        |  50 +++++++++++++++++++++++++
 mail/relay-ctrl/PLIST                           |  21 ++++++++++
 mail/relay-ctrl/distinfo                        |   5 ++
 mail/relay-ctrl/files/dovecot-settcpremoteip.sh |   9 ++++
 mail/relay-ctrl/files/ifrelayclient.sh          |  39 +++++++++++++++++++
 7 files changed, 141 insertions(+), 0 deletions(-)

diffs (169 lines):

diff -r a6206dac76bd -r 091ae80ee88a mail/relay-ctrl/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/relay-ctrl/DESCR     Wed Feb 28 14:12:40 2007 +0000
@@ -0,0 +1,3 @@
+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 or Dovecot.
diff -r a6206dac76bd -r 091ae80ee88a mail/relay-ctrl/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/relay-ctrl/MESSAGE   Wed Feb 28 14:12:40 2007 +0000
@@ -0,0 +1,14 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2007/02/28 14:12:40 schmonz Exp $
+
+relay-ctrl needs to be integrated into both your POP/IMAP and SMTP
+services. For SMTP, if you use mail/qmail-run, set the following
+in /etc/rc.conf:
+
+qmailsmtpd_postenv="RELAY_CTRL_DIR='${RELAY_CTRL_DIR}/allow'"
+qmailsmtpd_pretcpserver="${PREFIX}/bin/relay-ctrl-chdir"
+qmailsmtpd_presmtpd="${PREFIX}/bin/relay-ctrl-check"
+
+For other services, see ${PREFIX}/${DOCDIR}/README.
+
+===========================================================================
diff -r a6206dac76bd -r 091ae80ee88a mail/relay-ctrl/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/relay-ctrl/Makefile  Wed Feb 28 14:12:40 2007 +0000
@@ -0,0 +1,50 @@
+# $NetBSD: Makefile,v 1.1.1.1 2007/02/28 14:12:40 schmonz Exp $
+#
+
+DISTNAME=      relay-ctrl-3.1.1
+CATEGORIES=    mail
+MASTER_SITES=  ${HOMEPAGE}
+
+MAINTAINER=    schmonz%NetBSD.org@localhost
+HOMEPAGE=      http://untroubled.org/relay-ctrl/
+COMMENT=       Allows relaying via POP/IMAP-before-SMTP
+
+DJB_RESTRICTED=                NO
+DJB_MAKE_TARGETS=      NO
+
+DOCDIR=                        share/doc/${PKGBASE}
+INSTALLATION_DIRS=     bin ${PKGMANDIR}/man8 ${DOCDIR}
+OWN_DIRS_PERMS+=       ${RELAY_CTRL_DIR} ${ROOT_USER} ${ROOT_GROUP} 700
+OWN_DIRS_PERMS+=       ${RELAY_CTRL_DIR}/allow ${ROOT_USER} ${ROOT_GROUP} 777
+MESSAGE_SUBST+=                RELAY_CTRL_DIR=${RELAY_CTRL_DIR:Q} DOCDIR=${DOCDIR:Q}
+BUILD_DEFS+=           RELAY_CTRL_DIR
+
+ADDON_SCRIPTS=         dovecot-settcpremoteip ifrelayclient
+
+SUBST_CLASSES+=                paths
+SUBST_FILES.paths=     ${ADDON_SCRIPTS}
+SUBST_SED.paths=       -e 's,@ECHO@,${ECHO},g'
+SUBST_SED.paths+=      -e 's,@GREP@,${GREP},g'
+SUBST_SED.paths+=      -e 's,@SED@,${SED},g'
+SUBST_SED.paths+=      -e 's,@SETENV@,${SETENV},g'
+SUBST_SED.paths+=      -e 's,@SH@,${SH},g'
+SUBST_STAGE.paths=     do-configure
+
+post-extract:
+       for f in ${ADDON_SCRIPTS}; do                                   \
+               ${CP} ${FILESDIR}/$$f.sh ${WRKSRC}/$$f;                 \
+       done
+
+do-install:
+       ${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC};                        \
+       ./installer;                                                    \
+       ./instcheck
+       for f in ANNOUNCEMENT COPYING NEWS README TODO packet.html; do  \
+               ${INSTALL_DATA} ${WRKSRC}/$${f} ${PREFIX}/${DOCDIR};    \
+       done
+       for f in ${ADDON_SCRIPTS}; do                                   \
+               ${INSTALL_SCRIPT} ${WRKSRC}/$${f} ${PREFIX}/bin;        \
+       done
+
+.include "../../mk/djbware.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r a6206dac76bd -r 091ae80ee88a mail/relay-ctrl/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/relay-ctrl/PLIST     Wed Feb 28 14:12:40 2007 +0000
@@ -0,0 +1,21 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2007/02/28 14:12:40 schmonz Exp $
+bin/dovecot-settcpremoteip
+bin/ifrelayclient
+bin/relay-ctrl-age
+bin/relay-ctrl-allow
+bin/relay-ctrl-chdir
+bin/relay-ctrl-check
+bin/relay-ctrl-send
+bin/relay-ctrl-udp
+man/man8/relay-ctrl-age.8
+man/man8/relay-ctrl-allow.8
+man/man8/relay-ctrl-check.8
+man/man8/relay-ctrl-send.8
+man/man8/relay-ctrl-udp.8
+share/doc/relay-ctrl/ANNOUNCEMENT
+share/doc/relay-ctrl/COPYING
+share/doc/relay-ctrl/NEWS
+share/doc/relay-ctrl/README
+share/doc/relay-ctrl/TODO
+share/doc/relay-ctrl/packet.html
+@dirrm share/doc/relay-ctrl
diff -r a6206dac76bd -r 091ae80ee88a mail/relay-ctrl/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/relay-ctrl/distinfo  Wed Feb 28 14:12:40 2007 +0000
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1.1.1 2007/02/28 14:12:40 schmonz Exp $
+
+SHA1 (relay-ctrl-3.1.1.tar.gz) = 01ae6eba6fff3b93761ce0bdd5ca7059a999d2d1
+RMD160 (relay-ctrl-3.1.1.tar.gz) = 48fa830f08b1ea3b37ca07d62cde05dc35388287
+Size (relay-ctrl-3.1.1.tar.gz) = 35046 bytes
diff -r a6206dac76bd -r 091ae80ee88a mail/relay-ctrl/files/dovecot-settcpremoteip.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/relay-ctrl/files/dovecot-settcpremoteip.sh   Wed Feb 28 14:12:40 2007 +0000
@@ -0,0 +1,9 @@
+#!@SH@
+#
+# Wrapper for relay-ctrl-allow that sets TCPREMOTEIP by massaging
+#   Dovecot login info.
+
+TCPREMOTEIP=`@ECHO@ "$@" | @SED@ -e 's|.* ||' -e 's|]$||'`
+export TCPREMOTEIP
+
+exec "$@"
diff -r a6206dac76bd -r 091ae80ee88a mail/relay-ctrl/files/ifrelayclient.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/relay-ctrl/files/ifrelayclient.sh    Wed Feb 28 14:12:40 2007 +0000
@@ -0,0 +1,39 @@
+#!@SH@
+#
+# Wrapper for qmail-smtpd command chain that runs the first command
+#   only if RELAYCLIENT is set, running the remaining commands
+#   regardless. End the first command with "--".
+#
+# Useful for e.g. setting RBLSMTPD="" to avoid RBL-blocking an
+#   authenticated user.
+
+relayclient_isset()
+{
+       @SETENV@ | @GREP@ -q '^RELAYCLIENT=' >/dev/null 2>&1
+}
+
+main()
+{
+       local cmd1 arg
+       cmd1=""
+       while [ $# -gt 0 ]; do
+               arg="$1"; shift
+               if [ "${arg}" = '--' ]; then
+                       break
+               else
+                       cmd1="${cmd1} ${arg}"
+               fi
+       done
+       if [ $# -eq 0 ]; then
+               @ECHO@ >&2 "usage: $0 command args -- command args"
+               exit 111
+       fi
+       if relayclient_isset; then
+               exec ${cmd1} "$@"
+       else
+               exec "$@"
+       fi
+}
+
+main "$@"
+exit $?



Home | Main Index | Thread Index | Old Index