Date: Wed, 28 Oct 2009 02:34:25 +0100 (CET) From: Harald Schmalzbauer <freebsd@omnilan.de> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/140034: New port: mail/scam-backscatter A recipient verification milter Message-ID: <200910280134.n9S1YPFs005491@titan.flintsbach.schmalzbauer.de> Resent-Message-ID: <200910280140.n9S1e1wc086464@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 140034 >Category: ports >Synopsis: New port: mail/scam-backscatter A recipient verification milter >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Oct 28 01:40:00 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Harald Schmalzbauer >Release: FreeBSD 8.0-RC1 i386 >Organization: >Environment: System: FreeBSD titan.flintsbach.schmalzbauer.de 8.0-RC1 FreeBSD 8.0-RC1 #22: Sat Oct 10 23:46:14 CEST 2009 harry@titan.flintsbach.schmalzbauer.de:/usr/obj/usr/src/sys/TITAN i386 >Description: This is a new port for the very valuable backaend recipient checking. It requires UIDs and GIDs additions: --- GIDs.orig 2009-10-27 20:16:13.000000000 +0100 +++ GIDs 2009-10-27 20:17:30.000000000 +0100 @@ -130,6 +130,8 @@ pulse:*:563: pulse-access:*:564: _xsi:*:600: +scamback:*:625: bnetd:*:700: bopm:*:717: openxpki:*:777: --- UIDs.orig 2009-10-28 02:33:10.000000000 +0100 +++ UIDs 2009-10-27 20:18:15.000000000 +0100 @@ -139,7 +139,9 @@ 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 openxpki:*:777:777::0:0:OpenXPKI Owner:/nonexistent:/usr/sbin/nologin >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: # # mail/scam-backscatter/ # mail/scam-backscatter/files # mail/scam-backscatter/files/pkg-message.in # mail/scam-backscatter/files/scam-backscatter.in # mail/scam-backscatter/distinfo # mail/scam-backscatter/Makefile # mail/scam-backscatter/pkg-descr # mail/scam-backscatter/pkg-plist # echo c - mail/scam-backscatter/ mkdir -p mail/scam-backscatter/ > /dev/null 2>&1 echo c - mail/scam-backscatter/files mkdir -p mail/scam-backscatter/files > /dev/null 2>&1 echo x - mail/scam-backscatter/files/pkg-message.in sed 's/^X//' >mail/scam-backscatter/files/pkg-message.in << 'cc65eed2b2f783cef08cbc6dacc064ff' 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/scam-back.sock, F=T, T=S:240s;R:240s;E:5m')dnl X X To run scam-backscatter from startup, add scam-backscatter_enable="YES" X in your /etc/rc.conf or your /etc/rc.conf.local X cc65eed2b2f783cef08cbc6dacc064ff echo x - mail/scam-backscatter/files/scam-backscatter.in sed 's/^X//' >mail/scam-backscatter/files/scam-backscatter.in << 'df8c620bb34a82727ee3d52b742a27f2' X#!/bin/sh X X# PROVIDE: scambackscatter X# REQUIRE: NETWORKING X# BEFORE: sendmail X X# Written for FreeBSD. X# X# $FreeBSD: $ X# X# Copy this file into /usr/local/etc/rc.d as /usr/local/etc/rc.d/scam-backscatter X# Add this line to /etc/rc.conf: X# X# scambackscatter_enable="YES" X X. %%RC_SUBR%% X Xname="scambackscatter" Xrcvar=`set_rcvar` Xcommand="%%PREFIX%%/libexec/scam-back" Xstart_precmd="${name}_prestart" X Xscambackuser=scamback Xscamgroup=scamback Xscamdir=/var/scam X Xscambackscatter_enable=${scambackscatter_enable-"NO"} Xscambackscatter_runas=${scambackscatter_runas-"$scambackuser"} Xscambackscatter_pidfile=${scambackscatter_pidfile-"/var/run/scam-back.pid"} Xscambackscatter_sockfile=${scambackscatter_sockfile-"$scamdir/scam-back.sock"} Xscambackscatter_cfgfile=${scambackscatter_cfgfile-"%%PREFIX%%/etc/mail/scam.conf"} Xscambackscatter_flags=${scambackscatter_flags-"-p unix:$scambackscatter_sockfile \ X-f $scambackscatter_cfgfile -u $scambackscatter_runas -P $scambackscatter_pidfile \ X-b $scamdir/backscatter.txt -D"} X Xload_rc_config ${name} X Xscambackscatter_prestart() X{ X if [ ! -d "${scamdir}/." ]; then X mkdir ${scamdir} X fi X if [ ! -f "${scambackscatter_pidfile}" ]; then X touch ${scambackscatter_pidfile} X fi X chown ${scambackuser}:${scamgroup} ${scamdir} ${scambackscatter_pidfile} X chmod 700 ${scamdir} X} X Xrun_rc_command "$1" df8c620bb34a82727ee3d52b742a27f2 echo x - mail/scam-backscatter/distinfo sed 's/^X//' >mail/scam-backscatter/distinfo << '405fdbb4fe36730e061cb64f90118f37' XMD5 (scamback-1.5.0.tgz) = 171a95c0d59768df3dae044696bce38a XSHA256 (scamback-1.5.0.tgz) = a1b89f2b191a953f2d47ae0deed02a0fa4ac1aa4b13855779f0f11c2acc36ba8 XSIZE (scamback-1.5.0.tgz) = 22298 405fdbb4fe36730e061cb64f90118f37 echo x - mail/scam-backscatter/Makefile sed 's/^X//' >mail/scam-backscatter/Makefile << 'f60fa6c7bfbf22ace4c00a169790072f' X# New ports collection makefile for: mail/scam-backscatter X# Date created: 27/10/2009 X# Whom: Harald Schmalzbauer <freebsd@omnilan.de> X# X# $$ X# X XPORTNAME= scam-backscatter XDISTVERSION= 1.5.0 XDISTNAME= scamback XEXTRACT_SUFX= .tgz XDISTFILES= ${DISTNAME}-${DISTVERSION}${EXTRACT_SUFX} XCATEGORIES= mail XMASTER_SITES= http://www.elandsys.com/scam/scam-backscatter/ X XMAINTAINER= freebsd@omnilan.de XCOMMENT= Recipient verification milter X XUSERS= scamback XGROUPS= scamback X XUSE_RC_SUBR= scam-backscatter X X# broben ATM OPTIONS= SMT "Read domains and their backend servers from mailertable" On X XPKGMESSAGE= ${WRKDIR}/pkg-message X X.include <bsd.port.pre.mk> X XMAKEFILE= Makefile.freebsd XALL_TARGET= X X.if defined(WITH_SMT) XMAKE_ENV+= CCFLAGS="-DUSEMAILERTABLE" X.endif XMAKE_ENV+= CCFLAGS="-DVERBOSE -DEHLO" X XSUB_FILES+= pkg-message X Xdo-install: X @${MKDIR} ${PREFIX}/etc/mail X ${INSTALL_DATA} ${WRKSRC}/scam.conf $(PREFIX)/etc/mail/scam.conf.sample X ${INSTALL_PROGRAM} ${WRKSRC}/scam-back $(PREFIX)/libexec/scam-back X Xpost-install: X @echo "[*] Creating directory \"/var/scam\"" X @${MKDIR} /var/scam X @${CHOWN} ${USERS}:${GROUPS} /var/scam X @${CHMOD} 700 /var/scam X.if !defined(NOPORTDOCS) X @${MKDIR} ${DOCSDIR} X @${INSTALL_DATA} ${WRKSRC}/INSTALL ${DOCSDIR} X.endif X.if !defined (NOPORTEXAMPLES) X @${MKDIR} ${EXAMPLESDIR} X @${INSTALL_DATA} ${WRKSRC}/scam.conf ${EXAMPLESDIR} X.endif X @${CAT} ${PKGMESSAGE} X X#.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk" X X.include <bsd.port.post.mk> f60fa6c7bfbf22ace4c00a169790072f echo x - mail/scam-backscatter/pkg-descr sed 's/^X//' >mail/scam-backscatter/pkg-descr << '22874d62906591684a69692adf743483' 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/ 22874d62906591684a69692adf743483 echo x - mail/scam-backscatter/pkg-plist sed 's/^X//' >mail/scam-backscatter/pkg-plist << '820d922ccfc165e3045a294c022d191c' Xlibexec/scam-back Xetc/mail/scam.conf.sample X%%PORTDOCS%%%%DOCSDIR%%/INSTALL X%%PORTEXAMPLES%%%%EXAMPLESDIR%%/scam.conf X%%PORTDOCS%%@dirrm %%DOCSDIR%% X%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%% X@dirrmtry etc/mail X@unexec [ -f /var/scam/backscatter.txt ] || /bin/rmdir /var/scam || true 820d922ccfc165e3045a294c022d191c exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910280134.n9S1YPFs005491>