diff options
author | edwin <edwin@FreeBSD.org> | 2003-10-06 11:25:48 +0800 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2003-10-06 11:25:48 +0800 |
commit | b95c1ac9f206336d14cd290cbe75ca9b3eec7b01 (patch) | |
tree | 9ef0f79d0cafdff3f2f4706c0b4b8620fd440576 | |
parent | d880beb356c674251f7c0ef3acb90a9e5aa1bbd1 (diff) | |
download | freebsd-ports-gnome-b95c1ac9f206336d14cd290cbe75ca9b3eec7b01.tar.gz freebsd-ports-gnome-b95c1ac9f206336d14cd290cbe75ca9b3eec7b01.tar.zst freebsd-ports-gnome-b95c1ac9f206336d14cd290cbe75ca9b3eec7b01.zip |
New Port: mail/pop-before-smtp - smtp authentication tool
A log parser to identify valid POP/IMAP logins for later
smtp authentication
PR: ports/49944
Submitted by: Eric W. Bates <ericx@vineyard.net>
-rw-r--r-- | mail/Makefile | 1 | ||||
-rw-r--r-- | mail/pop-before-smtp/Makefile | 66 | ||||
-rw-r--r-- | mail/pop-before-smtp/distinfo | 1 | ||||
-rw-r--r-- | mail/pop-before-smtp/files/pop-before-smtp.sh | 100 | ||||
-rw-r--r-- | mail/pop-before-smtp/pkg-descr | 12 | ||||
-rw-r--r-- | mail/pop-before-smtp/pkg-message | 19 | ||||
-rw-r--r-- | mail/pop-before-smtp/pkg-plist | 13 |
7 files changed, 212 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile index e5419291abf2..3c26988e564f 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -240,6 +240,7 @@ SUBDIR += pine4 SUBDIR += pm-lib SUBDIR += pmail + SUBDIR += pop-before-smtp SUBDIR += pop3gwd SUBDIR += pop3lite SUBDIR += pop3vscan diff --git a/mail/pop-before-smtp/Makefile b/mail/pop-before-smtp/Makefile new file mode 100644 index 000000000000..ed67b4ddd662 --- /dev/null +++ b/mail/pop-before-smtp/Makefile @@ -0,0 +1,66 @@ +# New ports collection makefile for: pop-before-smtp +# Date created: March 7, 2003 +# Whom: Eric W. Bates +# +# $FreeBSD$ +# + +PORTNAME= pop-before-smtp +PORTVERSION= 1.32 +CATEGORIES= mail perl5 +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= popbsmtp + +MAINTAINER= ericx@vineyard.net +COMMENT= A log parser to identify valid POP/IMAP logins for later smtp + +RUN_DEPENDS= ${SITE_PERL}/File/Tail.pm:${PORTSDIR}/devel/p5-File-Tail \ + ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \ + ${SITE_PERL}/Net/Netmask.pm:${PORTSDIR}/net/p5-Net-Netmask \ + ${SITE_PERL}/Date/Parse.pm:${PORTSDIR}/devel/p5-TimeDate \ + ${SITE_PERL}/Date/Format.pm:${PORTSDIR}/devel/p5-TimeDate + +NO_BUILD= yes +USE_PERL5= yes +USE_REINPLACE= yes + +PKGMESSAGE= ${WRKDIR}/.pkg-message + +DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME} + +# Override this as you see fit +POPBSMTP_RC_SCRIPT?= ${PREFIX}/etc/rc.d/pop-before-smtp.sh.sample + +post-patch: + @${REINPLACE_CMD} 's|^#!/usr/bin/perl|#!${PERL}|; \ + s|/etc/postfix/pop-before-smtp|${PREFIX}/etc/postfix/pop-before-smtp|g;' \ + ${WRKSRC}/pop-before-smtp + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/pop-before-smtp ${PREFIX}/sbin + ${INSTALL_SCRIPT} \ + ${WRKSRC}/pop-before-smtp-conf.pl \ + ${PREFIX}/etc/pop-before-smtp-conf.pl.sample + @${SED} -e "s|%PREFIX%|${PREFIX}|g" \ + < ${FILESDIR}/pop-before-smtp.sh > ${POPBSMTP_RC_SCRIPT} + @${CHMOD} 755 ${POPBSMTP_RC_SCRIPT} +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +.for file in COPYING ChangeLog README TODO + ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} +.endfor +.for file in README.QUICKSTART README.rootless-install + ${INSTALL_DATA} ${WRKSRC}/contrib/${file} ${DOCSDIR} +.endfor + @${MKDIR} ${DOCSDIR}/popa3d +.for file in README popa3d-0.4.patch + ${INSTALL_DATA} ${WRKSRC}/contrib/popa3d/${file} ${DOCSDIR}/popa3d +.endfor +.endif + +post-install: + @${SED} -e "s|%PREFIX%|${PREFIX}|" \ + ${.CURDIR}/pkg-message > ${PKGMESSAGE} + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/mail/pop-before-smtp/distinfo b/mail/pop-before-smtp/distinfo new file mode 100644 index 000000000000..faf291f0999b --- /dev/null +++ b/mail/pop-before-smtp/distinfo @@ -0,0 +1 @@ +MD5 (pop-before-smtp-1.32.tar.gz) = 65f8128349d1bdc97da4306e6d500ad5 diff --git a/mail/pop-before-smtp/files/pop-before-smtp.sh b/mail/pop-before-smtp/files/pop-before-smtp.sh new file mode 100644 index 000000000000..d3a226b5b0e6 --- /dev/null +++ b/mail/pop-before-smtp/files/pop-before-smtp.sh @@ -0,0 +1,100 @@ +#!/bin/sh +# File: pop-before-smtp.sh +# Date: Fri Mar 7 11:20:43 2003 +# Time-stamp: <2003-03-08 23:58:53 ericx> +# Description: start/stop script for pop-before-smtp daemon +# +# $FreeBSD$ + +# Thanks to ume@FreeBSD.org for a nifty saslauthd.sh to steal from... + +action=$1 + +PREFIX=%PREFIX% + +# Suck in the configuration variables. +if [ -z "${source_rc_confs_defined}" ]; then + if [ -r /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs + elif [ -r /etc/rc.conf ]; then + . /etc/rc.conf + fi +fi + +# The following pop_before_smtp_* variables may be defined in rc.conf +# +# pop_before_smtp_enable - Set to YES to enable pop-before-smtp +# Default: no +# +# pop_before_smtp_program - Path to pop-before-smtp program +# Default: ${PREFIX}/sbin/pop-before-smtp +# +# pop_before_smtp_config - Path to pop-before-smtp configuration +# Default: +# ${PREFIX}/etc/pop-before-smtp-conf.pl +# +# pop_before_smtp_flags - Flags to pop-before-smtp program +# Default: [none] +# +# pop_before_smtp_pid - Path to pop-before-smtp pid file +# Default: /var/run/pop-before-smtp.pid +# + +if [ -z "${pop_before_smtp_enable}" ]; then + pop_before_smtp_enable=no +fi + +if [ -z "${pop_before_smtp_program}" ]; then + pop_before_smtp_program=${PREFIX}/sbin/pop-before-smtp +fi + +if [ -z "${pop_before_smtp_config}" ]; then + pop_before_smtp_config=${PREFIX}/etc/pop-before-smtp-conf.pl +fi + +if [ -z "${pop_before_smtp_flags}" ]; then + pop_before_smtp_flags="" +fi + +if [ -z "${pop_before_smtp_pid}" ]; then + pop_before_smtp_pid=/var/run/pop-before-smtp.pid +fi + +rc=0 + +case "${pop_before_smtp_enable}" in + [Yy][Ee][Ss]) + case "${action}" in + + start) + if [ -x ${pop_before_smtp_program} ] ; then + ${pop_before_smtp_program} \ + --config=${pop_before_smtp_config} \ + ${pop_before_smtp_flags} \ + --daemon=${pop_before_smtp_pid} \ + >/dev/null 2>&1 && \ + echo -n " pop-before-smtp " + fi + ;; + + stop) + if [ -r ${pop_before_smtp_pid} ]; then + kill `cat ${pop_before_smtp_pid}` && \ + echo -n " pop-before-smtp" + rm ${pop_before_smtp_pid} + fi + ;; + + *) + echo "usage: $0 {start|stop}" 1>&2 + rc=64 + ;; + esac + ;; + *) + rc=0 + ;; +esac + +exit $rc diff --git a/mail/pop-before-smtp/pkg-descr b/mail/pop-before-smtp/pkg-descr new file mode 100644 index 000000000000..c185083d8927 --- /dev/null +++ b/mail/pop-before-smtp/pkg-descr @@ -0,0 +1,12 @@ +Spam prevention requires preventing open relaying through email +servers. However, legit users want to be able to relay. If legit users +always stayed in one spot, they'd be easy to describe to the +daemon. However, what with roving laptops, logins from home, etc., +legit users refuse to stay in one spot. + +pop-before-smtp watches the mail log, looking for successful pop/imap +logins, and posts the originating IP address into a database which can +be checked by the MTA, to allow relaying for people who have recently +downloaded their email. + +WWW: http://popbsmtp.sourceforge.net/ diff --git a/mail/pop-before-smtp/pkg-message b/mail/pop-before-smtp/pkg-message new file mode 100644 index 000000000000..2189d2323fba --- /dev/null +++ b/mail/pop-before-smtp/pkg-message @@ -0,0 +1,19 @@ +************************************************************************* +* ____ _ __ __ * +* | _ \ ___ __ _ __| | \/ | ___ * +* | |_) / _ \/ _` |/ _` | |\/| |/ _ \ * +* | _ < __/ (_| | (_| | | | | __/ * +* |_| \_\___|\__,_|\__,_|_| |_|\___| * +* * +* By default, %PREFIX%/etc/rc.d/pop-before-smtp.sh * +* will not start the daemon. You need to set * +* 'pop_before_smtp_enable=yes' somewhere in your rc.conf * +* chain. * +* * +* Please see: 'perldoc %PREFIX%/sbin/pop-before-smtp', * +* '%PREFIX%/etc/pop-before-smtp.conf.pl.sample' and * +* '%PREFIX%/share/docs/pop-before-smtp'. * +* * +* There is no man page. * +* * +************************************************************************* diff --git a/mail/pop-before-smtp/pkg-plist b/mail/pop-before-smtp/pkg-plist new file mode 100644 index 000000000000..26a619971a82 --- /dev/null +++ b/mail/pop-before-smtp/pkg-plist @@ -0,0 +1,13 @@ +etc/pop-before-smtp-conf.pl.sample +etc/rc.d/pop-before-smtp.sh.sample +sbin/pop-before-smtp +share/doc/pop-before-smtp/COPYING +share/doc/pop-before-smtp/ChangeLog +share/doc/pop-before-smtp/README +share/doc/pop-before-smtp/README.QUICKSTART +share/doc/pop-before-smtp/README.rootless-install +share/doc/pop-before-smtp/TODO +share/doc/pop-before-smtp/popa3d/README +share/doc/pop-before-smtp/popa3d/popa3d-0.4.patch +@dirrm share/doc/pop-before-smtp/popa3d +@dirrm share/doc/pop-before-smtp |