Date: Tue, 11 Mar 2003 21:22:46 -0500 (EST) From: "Eric W.Bates" <ericx@vineyard.net> To: FreeBSD-gnats-submit@FreeBSD.org Cc: ericx@vineyard.net Subject: ports/49944: New Port: mail/pop-before-smtp - smtp authentication tool Message-ID: <20030312022246.8EE2A16BB2@smtp.ericx.net>
next in thread | raw e-mail | index | archive | help
>Number: 49944 >Category: ports >Synopsis: New Port: mail/pop-before-smtp - smtp authentication tool >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Mar 11 18:30:12 PST 2003 >Closed-Date: >Last-Modified: >Originator: Eric W. Bates >Release: FreeBSD 4.7-RELEASE-p6 i386 >Organization: >Environment: System: FreeBSD ethel.ericx.net 4.7-RELEASE-p6 FreeBSD 4.7-RELEASE-p6 #12: Sat Mar 1 16:50:39 EST 2003 ericx@ethel.ericx.net:/usr/obj/usr/src/sys/ETHEL i386 >Description: A log parser to identify valid POP/IMAP logins for later smtp authentication >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # pop-before-smtp # pop-before-smtp/files # pop-before-smtp/files/pop-before-smtp.sh # pop-before-smtp/Makefile # pop-before-smtp/distinfo # pop-before-smtp/pkg-descr # pop-before-smtp/pkg-plist # pop-before-smtp/pkg-message # echo c - pop-before-smtp mkdir -p pop-before-smtp > /dev/null 2>&1 echo c - pop-before-smtp/files mkdir -p pop-before-smtp/files > /dev/null 2>&1 echo x - pop-before-smtp/files/pop-before-smtp.sh sed 's/^X//' >pop-before-smtp/files/pop-before-smtp.sh << 'END-of-pop-before-smtp/files/pop-before-smtp.sh' X#!/bin/sh X# File: pop-before-smtp.sh X# Date: Fri Mar 7 11:20:43 2003 X# Time-stamp: <2003-03-08 23:58:53 ericx> X# Description: start/stop script for pop-before-smtp daemon X# X# $FreeBSD$ X X# Thanks to ume@FreeBSD.org for a nifty saslauthd.sh to steal from... X Xaction=$1 X XPREFIX=%PREFIX% X X# Suck in the configuration variables. Xif [ -z "${source_rc_confs_defined}" ]; then X if [ -r /etc/defaults/rc.conf ]; then X . /etc/defaults/rc.conf X source_rc_confs X elif [ -r /etc/rc.conf ]; then X . /etc/rc.conf X fi Xfi X X# The following pop_before_smtp_* variables may be defined in rc.conf X# X# pop_before_smtp_enable - Set to YES to enable pop-before-smtp X# Default: no X# X# pop_before_smtp_program - Path to pop-before-smtp program X# Default: ${PREFIX}/sbin/pop-before-smtp X# X# pop_before_smtp_config - Path to pop-before-smtp configuration X# Default: X# ${PREFIX}/etc/pop-before-smtp-conf.pl X# X# pop_before_smtp_flags - Flags to pop-before-smtp program X# Default: [none] X# X# pop_before_smtp_pid - Path to pop-before-smtp pid file X# Default: /var/run/pop-before-smtp.pid X# X Xif [ -z "${pop_before_smtp_enable}" ]; then X pop_before_smtp_enable=no Xfi X Xif [ -z "${pop_before_smtp_program}" ]; then X pop_before_smtp_program=${PREFIX}/sbin/pop-before-smtp Xfi X Xif [ -z "${pop_before_smtp_config}" ]; then X pop_before_smtp_config=${PREFIX}/etc/pop-before-smtp-conf.pl Xfi X Xif [ -z "${pop_before_smtp_flags}" ]; then X pop_before_smtp_flags="" Xfi X Xif [ -z "${pop_before_smtp_pid}" ]; then X pop_before_smtp_pid=/var/run/pop-before-smtp.pid Xfi X Xrc=0 X Xcase "${pop_before_smtp_enable}" in X [Yy][Ee][Ss]) X case "${action}" in X X start) X if [ -x ${pop_before_smtp_program} ] ; then X ${pop_before_smtp_program} \ X --config=${pop_before_smtp_config} \ X ${pop_before_smtp_flags} \ X --daemon=${pop_before_smtp_pid} \ X >/dev/null 2>&1 && \ X echo -n " pop-before-smtp " X fi X ;; X X stop) X if [ -r ${pop_before_smtp_pid} ]; then X kill `cat ${pop_before_smtp_pid}` && \ X echo -n " pop-before-smtp" X rm ${pop_before_smtp_pid} X fi X ;; X X *) X echo "usage: $0 {start|stop}" 1>&2 X rc=64 X ;; X esac X ;; X *) X rc=0 X ;; Xesac X Xexit $rc END-of-pop-before-smtp/files/pop-before-smtp.sh echo x - pop-before-smtp/Makefile sed 's/^X//' >pop-before-smtp/Makefile << 'END-of-pop-before-smtp/Makefile' X# New ports collection makefile for: pop-before-smtp X# Date created: March 7, 2003 X# Whom: Eric W. Bates X# X# $FreeBSD$ X# X XPORTNAME= pop-before-smtp XPORTVERSION= 1.32 XCATEGORIES= mail perl5 XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE} XMASTER_SITE_SUBDIR= popbsmtp X XMAINTAINER= ericx@vineyard.net XCOMMENT= A log parser to identify valid POP/IMAP logins for later smtp X XRUN_DEPENDS= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/File/Tail.pm:${PORTSDIR}/devel/p5-File-Tail \ X ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \ X ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Net/Netmask.pm:${PORTSDIR}/net/p5-Net-Netmask \ X ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Date/Parse.pm:${PORTSDIR}/devel/p5-TimeDate \ X ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Date/Format.pm:${PORTSDIR}/devel/p5-TimeDate X XNO_BUILD= yes XUSE_PERL5= yes XUSE_REINPLACE= yes X XPKGMESSAGE= ${WRKDIR}/.pkg-message X XDOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME} X X# Override this as you see fit XPOPBSMTP_RC_SCRIPT?= ${PREFIX}/etc/rc.d/pop-before-smtp.sh.sample X Xpost-patch: X @${REINPLACE_CMD} 's|^#!/usr/bin/perl|#!${PERL}|; \ X s|/etc/postfix/pop-before-smtp|${PREFIX}/etc/postfix/pop-before-smtp|g;' \ X ${WRKSRC}/pop-before-smtp X Xdo-install: X ${INSTALL_SCRIPT} ${WRKSRC}/pop-before-smtp ${PREFIX}/sbin X ${INSTALL_SCRIPT} \ X ${WRKSRC}/pop-before-smtp-conf.pl \ X ${PREFIX}/etc/pop-before-smtp-conf.pl.sample X @${SED} -e "s|%PREFIX%|${PREFIX}|g" \ X < ${FILESDIR}/pop-before-smtp.sh > ${POPBSMTP_RC_SCRIPT} X @${CHMOD} 755 ${POPBSMTP_RC_SCRIPT} X.if !defined(NOPORTDOCS) X @${MKDIR} ${DOCSDIR} X.for file in COPYING ChangeLog README TODO X ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} X.endfor X.for file in README.QUICKSTART README.rootless-install X ${INSTALL_DATA} ${WRKSRC}/contrib/${file} ${DOCSDIR} X.endfor X @${MKDIR} ${DOCSDIR}/popa3d X.for file in README popa3d-0.4.patch X ${INSTALL_DATA} ${WRKSRC}/contrib/popa3d/${file} ${DOCSDIR}/popa3d X.endfor X.endif X Xpost-install: X @${SED} -e "s|%PREFIX%|${PREFIX}|" \ X ${.CURDIR}/pkg-message > ${PKGMESSAGE} X @${CAT} ${PKGMESSAGE} X X.include <bsd.port.mk> END-of-pop-before-smtp/Makefile echo x - pop-before-smtp/distinfo sed 's/^X//' >pop-before-smtp/distinfo << 'END-of-pop-before-smtp/distinfo' XMD5 (pop-before-smtp-1.32.tar.gz) = 65f8128349d1bdc97da4306e6d500ad5 END-of-pop-before-smtp/distinfo echo x - pop-before-smtp/pkg-descr sed 's/^X//' >pop-before-smtp/pkg-descr << 'END-of-pop-before-smtp/pkg-descr' XSpam prevention requires preventing open relaying through email Xservers. However, legit users want to be able to relay. If legit users Xalways stayed in one spot, they'd be easy to describe to the Xdaemon. However, what with roving laptops, logins from home, etc., Xlegit users refuse to stay in one spot. X Xpop-before-smtp watches the mail log, looking for successful pop/imap Xlogins, and posts the originating IP address into a database which can Xbe checked by the MTA, to allow relaying for people who have recently Xdownloaded their email. X XWWW: http://popbsmtp.sourceforge.net/ END-of-pop-before-smtp/pkg-descr echo x - pop-before-smtp/pkg-plist sed 's/^X//' >pop-before-smtp/pkg-plist << 'END-of-pop-before-smtp/pkg-plist' Xetc/pop-before-smtp-conf.pl.sample Xetc/rc.d/pop-before-smtp.sh.sample Xsbin/pop-before-smtp Xshare/doc/pop-before-smtp/COPYING Xshare/doc/pop-before-smtp/ChangeLog Xshare/doc/pop-before-smtp/README Xshare/doc/pop-before-smtp/README.QUICKSTART Xshare/doc/pop-before-smtp/README.rootless-install Xshare/doc/pop-before-smtp/TODO Xshare/doc/pop-before-smtp/popa3d/README Xshare/doc/pop-before-smtp/popa3d/popa3d-0.4.patch X@dirrm share/doc/pop-before-smtp/popa3d X@dirrm share/doc/pop-before-smtp END-of-pop-before-smtp/pkg-plist echo x - pop-before-smtp/pkg-message sed 's/^X//' >pop-before-smtp/pkg-message << 'END-of-pop-before-smtp/pkg-message' X************************************************************************* X* ____ _ __ __ * X* | _ \ ___ __ _ __| | \/ | ___ * X* | |_) / _ \/ _` |/ _` | |\/| |/ _ \ * X* | _ < __/ (_| | (_| | | | | __/ * X* |_| \_\___|\__,_|\__,_|_| |_|\___| * X* * X* By default, %PREFIX%/etc/rc.d/pop-before-smtp.sh * X* will not start the daemon. You need to set * X* 'pop_before_smtp_enable=yes' somewhere in your rc.conf * X* chain. * X* * X* Please see: 'perldoc %PREFIX%/sbin/pop-before-smtp', * X* '%PREFIX%/etc/pop-before-smtp.conf.pl.sample' and * X* '%PREFIX%/share/docs/pop-before-smtp'. * X* * X* There is no man page. * X* * X************************************************************************* END-of-pop-before-smtp/pkg-message exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030312022246.8EE2A16BB2>