From snabb@tiktik.epipe.com  Thu May 27 04:49:00 2010
Return-Path: <snabb@tiktik.epipe.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6F348106566B
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 27 May 2010 04:49:00 +0000 (UTC)
	(envelope-from snabb@tiktik.epipe.com)
Received: from tiktik.epipe.com (tiktik.epipe.com [IPv6:2001:470:8940:10::1])
	by mx1.freebsd.org (Postfix) with ESMTP id 0F4F48FC1B
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 27 May 2010 04:48:59 +0000 (UTC)
Received: from tiktik.epipe.com (localhost [127.0.0.1])
	by tiktik.epipe.com (8.14.3/8.14.3) with ESMTP id o4R4muAK058560
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 27 May 2010 04:48:59 GMT
	(envelope-from snabb@tiktik.epipe.com)
Received: (from snabb@localhost)
	by tiktik.epipe.com (8.14.3/8.14.3/Submit) id o4R4mp0h058559;
	Thu, 27 May 2010 04:48:51 GMT
	(envelope-from snabb)
Message-Id: <201005270448.o4R4mp0h058559@tiktik.epipe.com>
Date: Thu, 27 May 2010 04:48:51 GMT
From: Janne Snabb <snabb@epipe.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [NEW PORT] mail/scam-backscatter: Address verification milter to prevent spam backscatter
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         147115
>Category:       ports
>Synopsis:       [NEW PORT] mail/scam-backscatter: Address verification milter to prevent spam backscatter
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 27 04:50:08 UTC 2010
>Closed-Date:    Thu Aug 26 14:57:28 UTC 2010
>Last-Modified:  Thu Aug 26 15:00:19 UTC 2010
>Originator:     Janne Snabb
>Release:        FreeBSD 8.0-RELEASE-p1 i386
>Organization:
EPIPE Communications
>Environment:
System: FreeBSD tiktik.epipe.com 8.0-RELEASE-p1 FreeBSD 8.0-RELEASE-p1 #1: Fri Dec  4 03:20:55 UTC
>Description:
scam-backscatter milter

Scam-backscatter prevents backscatter (accept and bounce) on mail servers
which don't host mailboxes locally. It validates mailboxes by verifying the
recipient addresses hosted on a different mail server.

WWW:	http://www.elandsys.com/scam/scam-backscatter/

Generated with FreeBSD Port Tools 0.99

This port requires new UID and GID as follows:
--- UIDs.orig	2010-05-13 04:32:56.000000000 +0000
+++ UIDs	2010-05-27 03:12:15.000000000 +0000
@@ -142,6 +142,7 @@
 polkit:*:562:562::0:0:PolicyKit User:/nonexistent:/usr/sbin/nologin
 pulse:*:563:563::0:0:PulseAudio System User:/nonexistent:/usr/sbin/nologin
 _xsi:*:600:600::0:0:XMLSysInfo User:/nonexistent:/usr/sbin/nologin
+scamback:*:625:625::0:0:scam-backscatter milter:/nonexistent:/usr/sbin/nologin
 _pla:*:636:80::0:0:phpLDAPAdmin Owner:/nonexistent:/usr/sbin/nologin
 bnetd:*:700:700::0:0:Bnetd user:/nonexistent:/usr/sbin/nologin
 bopm:*:717:717::0:0:Blitzed Open Proxy Monitor:/nonexistent:/bin/sh
--- GIDs.orig	2010-05-05 02:21:58.000000000 +0000
+++ GIDs	2010-05-27 03:12:37.000000000 +0000
@@ -133,6 +133,7 @@
 pulse:*:563:
 pulse-access:*:564:
 _xsi:*:600:
+scamback:*:625:
 bnetd:*:700:
 bopm:*:717:
 openxpki:*:777:

>How-To-Repeat:
>Fix:

--- scam-backscatter-1.5.1.shar begins here ---
# 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:
#
#	scam-backscatter
#	scam-backscatter/files
#	scam-backscatter/files/pkg-message.in
#	scam-backscatter/files/scam-backscatter.in
#	scam-backscatter/files/patch-scam-back.c
#	scam-backscatter/files/patch-scam.conf
#	scam-backscatter/distinfo
#	scam-backscatter/Makefile
#	scam-backscatter/pkg-descr
#	scam-backscatter/pkg-plist
#
echo c - scam-backscatter
mkdir -p scam-backscatter > /dev/null 2>&1
echo c - scam-backscatter/files
mkdir -p scam-backscatter/files > /dev/null 2>&1
echo x - scam-backscatter/files/pkg-message.in
sed 's/^X//' >scam-backscatter/files/pkg-message.in << 'f4765b3237d58259895c53692fff3679'
X===> IMPORTANT NOTE
X
X    A sample configuration file has been installed in %%PREFIX%%/etc/mail
X    directory. Copy and edit it to suit your needs before launching
X    scam-backscatter milter.
X
X    Add following lines to your /etc/mail/<your_host>.mc configuration.
X
X    define(`confMILTER_MACROS_ENVRCPT', confMILTER_MACROS_ENVRCPT``{rcpt_mailer}, {rcpt_host}, {rcpt_addr}'')dnl
X    INPUT_MAIL_FILTER(`scam-back', `S=unix:/var/scam-back/scam-back.sock, F=T, T=S:240s;R:240s;E:5m')dnl
X
X    To run scam-backscatter from startup, add scambackscatter_enable="YES"
X    in your /etc/rc.conf or your /etc/rc.conf.local
X
X    See %%DOCSDIR%%/INSTALL for configuration details.
X
f4765b3237d58259895c53692fff3679
echo x - scam-backscatter/files/scam-backscatter.in
sed 's/^X//' >scam-backscatter/files/scam-backscatter.in << 'be84f17c49827ea816c6a0b65e477c5b'
X#!/bin/sh
X# $FreeBSD$
X
X# PROVIDE: scambackscatter
X# REQUIRE: LOGIN
X# BEFORE: mail
X
X# This file should be installed as /usr/local/etc/rc.d/scam-backscatter
X#
X# Define scambackscatter_* variables in one of these files:
X# 	/etc/rc.conf
X# 	/etc/rc.conf.local
X#
X# Add the following line to enable:
X# 	scambackscatter_enable="YES"
X#
X# DO NOT CHANGE THE DEFAULT VALUES BELOW
X#
X
X. /etc/rc.subr
X
Xname="scambackscatter"
Xrcvar=`set_rcvar`
Xcommand="%%PREFIX%%/libexec/scam-back"
Xstart_precmd="${name}_prestart"
X
Xscambackscatter_user=${scambackscatter_user-"%%USERS%%"}
Xscambackscatter_group=${scambackscatter_group-"%%GROUPS%%"}
X
Xscambackscatter_enable=${scambackscatter_enable-"NO"}
Xscambackscatter_dir=${scambackscatter_dir-"/var/scam-back"}
Xscambackscatter_runas=${scambackscatter_runas-"$scambackscatter_user"}
Xscambackscatter_pidfile=${scambackscatter_pidfile-"/var/run/scam-back.pid"}
Xscambackscatter_sockfile=${scambackscatter_sockfile-"$scambackscatter_dir/scam-back.sock"}
Xscambackscatter_cfgfile=${scambackscatter_cfgfile-"%%PREFIX%%/etc/mail/scam-back.conf"}
Xscambackscatter_flags=${scambackscatter_flags-"-p unix:$scambackscatter_sockfile \
X-f $scambackscatter_cfgfile -u $scambackscatter_runas -P $scambackscatter_pidfile \
X-b $scambackscatter_dir/backscatter.txt -D"}
X
Xload_rc_config ${name}
X
Xscambackscatter_prestart()
X{
X	if [ ! -d "${scambackscatter_dir}/." ]; then
X		mkdir ${scambackscatter_dir}
X		chown ${scambackscatter_user}:${scambackscatter_group} ${scambackscatter_dir}
X		chmod 700 ${scambackscatter_dir}
X	fi
X	if [ ! -f "${scambackscatter_pidfile}" ]; then
X		touch ${scambackscatter_pidfile}
X		chown ${scambackscatter_user}:${scambackscatter_group} ${scambackscatter_pidfile}
X	fi
X}
X
Xrun_rc_command "$1"
be84f17c49827ea816c6a0b65e477c5b
echo x - scam-backscatter/files/patch-scam-back.c
sed 's/^X//' >scam-backscatter/files/patch-scam-back.c << 'c317308e9054dbaf14aea86292105a74'
X--- scam-back.c.orig	2010-02-21 07:20:47.000000000 +0000
X+++ scam-back.c	2010-05-26 17:39:32.000000000 +0000
X@@ -437,7 +437,7 @@
X 
X #ifndef LINUX
X #ifdef ALLDOMAINS
X-	backsslen = backss.ss_len
X+	backsslen = backss.ss_len;
X #else
X 	backsslen  = priv->backss.ss_len;
X #ifdef FALLBACKEND
X@@ -1174,7 +1174,7 @@
X 	{
X 		syslog (LOG_ERR, "cannot open pidfile");
X 	} else {
X-		snprintf (buf, sizeof (buf), "%ld", (long) pid);
X+		snprintf (buf, sizeof (buf), "%ld\n", (long) pid);
X 		if (write (fd, buf, strlen (buf)) != strlen (buf)) {
X 			syslog (LOG_ERR, "cannot write to pidfile");
X 		}
c317308e9054dbaf14aea86292105a74
echo x - scam-backscatter/files/patch-scam.conf
sed 's/^X//' >scam-backscatter/files/patch-scam.conf << '01ca4ef36f22dbcc691cc49edfc3f52b'
X--- scam.conf.orig	2010-05-26 17:27:03.000000000 +0000
X+++ scam.conf	2010-05-26 17:28:31.000000000 +0000
X@@ -58,12 +58,12 @@
X # SMTP timeouts, in seconds
X # Determines the time to wait for a connection to the backend SMTP server.
X 
X-#TimeoutSMTPconnect:2
X+#TimeoutSMTPConnect:2
X 
X # Determines the time to wait for a reply from the backend SMTP
X # server after sending a SMTP command.
X 
X-#TimeoutSMTPreply:3
X+#TimeoutSMTPReply:3
X 
X # Bypass the Scam-backscatter check
X 
01ca4ef36f22dbcc691cc49edfc3f52b
echo x - scam-backscatter/distinfo
sed 's/^X//' >scam-backscatter/distinfo << 'e316c312472fe47c96e71f6e62bef34d'
XMD5 (scamback-1.5.1.tgz) = 63165c21ba6bde4bc0532f4af67c3e09
XSHA256 (scamback-1.5.1.tgz) = db5b650f92f51cfddf1e2e172791396f01375fefd0456eaee910f0645bae6738
XSIZE (scamback-1.5.1.tgz) = 22748
e316c312472fe47c96e71f6e62bef34d
echo x - scam-backscatter/Makefile
sed 's/^X//' >scam-backscatter/Makefile << '6d68b22dc36ed7ba1cb08e16287aaf7b'
X# New ports collection makefile for:	scam-backscatter
X# Date created:				2010-05-27
X# Whom:					Janne Snabb <snabb@epipe.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	scam-backscatter
XPORTVERSION=	1.5.1
XCATEGORIES=	mail
XMASTER_SITES=	http://www.elandsys.com/scam/scam-backscatter/ \
X		http://dist.epipe.com/mirrors/scam-backscatter/
XDISTNAME=	scamback-${PORTVERSION}
XEXTRACT_SUFX=	.tgz
X
XMAINTAINER=	snabb@epipe.com
XCOMMENT=	Address verification milter to prevent spam backscatter
X
XOPTIONS=	ALLDOMAINS "Verify any domain with the backend" Off \
X		EHLO "Use EHLO instead of HELO in SMTP session" Off \
X		USEMAILERTABLE "Use mailertable to map domains to backends" Off
X
X.include <bsd.port.options.mk>
X.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"
X
XWRKSRC=		${WRKDIR}/scamback
X
XUSERS=		scamback
XGROUPS=		scamback
X
XUSE_RC_SUBR=	scam-backscatter
X
XPKGMESSAGE=	${WRKDIR}/pkg-message
XSUB_FILES+=	pkg-message
X
XSUB_LIST=	USERS=${USERS} GROUPS=${GROUPS}
X
XMAKEFILE=	Makefile.freebsd
XALL_TARGET=
X
XLDFLAGS+=	${SENDMAIL_LDFLAGS}
XLIBS+=		-lmilter
XLIBS+=		${SENDMAIL_LDADD}
X
XCFLAGS+=	${PTHREAD_CFLAGS}
XLIBS+=		${PTHREAD_LIBS}
X
X.if defined(WITH_ALLDOMAINS)
XCFLAGS+=	-DALLDOMAINS
X.endif
X.if defined(WITH_EHLO)
XCFLAGS+=	-DEHLO
X.endif
X.if defined(WITH_USEMAILERTABLE)
XCFLAGS+=	-DUSEMAILERTABLE
X.endif
X
XMAKE_ARGS+=	CC="${CC}" CCFLAGS="${CFLAGS}" CFLAGS="" \
X		LDFLAGS="${LDFLAGS}" LIBS="${LIBS}"
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's|/var/spool/scam/scam-back\.pid|/var/run/scam-back\.pid|g' ${WRKSRC}/scam-back.c
X	@${REINPLACE_CMD} -e 's|/etc/mail/scam\.conf|${PREFIX}/etc/mail/scam-back\.conf|' ${WRKSRC}/scam-back.c
X
Xdo-install:
X	${MKDIR} ${PREFIX}/etc/mail
X	${INSTALL_PROGRAM} ${WRKSRC}/scam-back ${PREFIX}/libexec/scam-back
X	${INSTALL_DATA} ${WRKSRC}/scam.conf ${PREFIX}/etc/mail/scam-back.conf.sample
X
Xpost-install:
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X	${INSTALL_MAN} ${WRKSRC}/INSTALL ${DOCSDIR}
X	${INSTALL_MAN} ${WRKSRC}/License ${DOCSDIR}
X.endif
X	${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
6d68b22dc36ed7ba1cb08e16287aaf7b
echo x - scam-backscatter/pkg-descr
sed 's/^X//' >scam-backscatter/pkg-descr << '684612100234eb0cb8761a1570c78787'
Xscam-backscatter milter
X
XScam-backscatter prevents backscatter (accept and bounce) on mail servers
Xwhich don't host mailboxes locally. It validates mailboxes by verifying the
Xrecipient addresses hosted on a different mail server.
X
XWWW:	http://www.elandsys.com/scam/scam-backscatter/
684612100234eb0cb8761a1570c78787
echo x - scam-backscatter/pkg-plist
sed 's/^X//' >scam-backscatter/pkg-plist << '58bc8ada9c659cdfb25f9818034cf994'
X@comment $FreeBSD$
Xlibexec/scam-back
Xetc/mail/scam-back.conf.sample
X%%PORTDOCS%%%%DOCSDIR%%/INSTALL
X%%PORTDOCS%%%%DOCSDIR%%/License
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
X@dirrmtry etc/mail
X@unexec [ -f /var/scam-back/backscatter.txt ] || /bin/rmdir /var/scam-back 2>/dev/null || true
58bc8ada9c659cdfb25f9818034cf994
exit
--- scam-backscatter-1.5.1.shar ends here ---

>Release-Note:
>Audit-Trail:

From: Janne Snabb <snabb@epipe.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/147115: [NEW PORT] mail/scam-backscatter: Address verification
 milter to prevent spam backscatter
Date: Sat, 29 May 2010 02:02:10 +0000 (UTC)

 Hi,
 
 My apologies, but there is a cut'n'paste goof-up in pkg-message.in.
 Please apply the following patch before commiting. I am thinking
 it is better to just send a patch instead of sending the whole
 sharball again...
 
 Best Regards,
 --
 Janne Snabb / EPIPE Communications
 snabb@epipe.com - http://epipe.com/
 
 --- files/pkg-message.in.orig	2010-05-26 13:14:12.000000000 +0000
 +++ files/pkg-message.in	2010-05-29 01:55:22.000000000 +0000
 @@ -6,7 +6,7 @@
 
       Add following lines to your /etc/mail/<your_host>.mc configuration.
 
 -    define(`confMILTER_MACROS_ENVRCPT', confMILTER_MACROS_ENVRCPT``{rcpt_mailer}, {rcpt_host}, {rcpt_addr}'')dnl
 +    define(`confMILTER_MACROS_ENVRCPT', `{rcpt_mailer}, {rcpt_host}, {rcpt_addr}')dnl
       INPUT_MAIL_FILTER(`scam-back', `S=unix:/var/scam-back/scam-back.sock, F=T, T=S:240s;R:240s;E:5m')dnl
 
       To run scam-backscatter from startup, add scambackscatter_enable="YES"
 

From: Janne Snabb <snabb@epipe.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/147115: [NEW PORT] mail/scam-backscatter: Address verification
 milter to prevent spam backscatter
Date: Fri, 18 Jun 2010 09:19:16 +0000 (UTC)

 Hi,
 
 After seeing that this port was not committed quickly, I thought I
 would review it again and make it better. I did find some things
 to improve.
 
 New UIDs and GIDs are no longer needed! (The port uses mailnull
 user instead.)
 
 Please fetch the updated port tarball from:
 
 http://dist.epipe.com/tmp/scam-backscatter-1.5.1-freebsd-port.tar.gz
 
 ...and ignore any previous shar arhives or patches in this PR.
 
 The following is a summary of the improvements:
   - use mailnull user and group instead of port-specific user
   - merged two REINPLACE_CMDs into one in Makefile
   - improved documentation in pkg-message.in
   - other minor documentation and comment improvements
 
 Please inform me if there are any other ways this port should be
 improved before getting committed. I find this very useful piece
 of software and would like to see it in the ports tree.
 
 The startup script includes a kludge to enable writing the pid file
 in /var/run. This is because the software writes its pid file after
 dropping root privileges (which is IMHO not the right way, but it
 should be fixed at upstream).
 
 The patches included in the files-subdirectory have been sent to
 upstream maintainer (Eland Systems) and should be included in the
 next official release.
 
 Kind Regards,
 --
 Janne Snabb / EPIPE Communications
 snabb@epipe.com - http://epipe.com/
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Thu Aug 26 14:51:13 UTC 2010 
State-Changed-Why:  
New port added, thank you! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=147115 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/147115: commit references a PR
Date: Thu, 26 Aug 2010 14:57:27 +0000 (UTC)

 pav         2010-08-26 14:57:15 UTC
 
   FreeBSD ports repository
 
   Modified files:
     mail                 Makefile 
   Added files:
     mail/scam-backscatter Makefile distinfo pkg-descr pkg-plist 
     mail/scam-backscatter/files patch-scam-back.c patch-scam.conf 
                                 pkg-message.in scam-backscatter.in 
   Log:
   scam-backscatter milter
   
   Scam-backscatter prevents spam backscatter (accept and bounce) on
   mail servers which don't host mailboxes locally. It validates
   mailboxes by verifying the recipient addresses hosted on a different
   mail server.
   
   WWW:    http://www.elandsys.com/scam/scam-backscatter/
   
   PR:             ports/147115
   Submitted by:   Janne Snabb <snabb@epipe.com>
   
   Revision  Changes    Path
   1.1030    +1 -0      ports/mail/Makefile
   1.1       +72 -0     ports/mail/scam-backscatter/Makefile (new)
   1.1       +3 -0      ports/mail/scam-backscatter/distinfo (new)
   1.1       +20 -0     ports/mail/scam-backscatter/files/patch-scam-back.c (new)
   1.1       +17 -0     ports/mail/scam-backscatter/files/patch-scam.conf (new)
   1.1       +21 -0     ports/mail/scam-backscatter/files/pkg-message.in (new)
   1.1       +56 -0     ports/mail/scam-backscatter/files/scam-backscatter.in (new)
   1.1       +8 -0      ports/mail/scam-backscatter/pkg-descr (new)
   1.1       +8 -0      ports/mail/scam-backscatter/pkg-plist (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
