From wolpert@codeheadsystems.com  Fri Nov 22 15:05:29 2002
Return-Path: <wolpert@codeheadsystems.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D06AA37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 22 Nov 2002 15:05:29 -0800 (PST)
Received: from www.codeheadsystems.com (codeheadsystems.com [68.14.217.100])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C57F143E91
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 22 Nov 2002 15:05:28 -0800 (PST)
	(envelope-from wolpert@codeheadsystems.com)
Received: from codeheadsystems.com (www.codeheadsystems.com [127.0.0.1])
	by www.codeheadsystems.com (8.12.6/8.12.6) with SMTP id gAMN5P5D007055;
	Fri, 22 Nov 2002 16:05:25 -0700 (MST)
	(envelope-from wolpert@codeheadsystems.com)
Received: from 209.105.253.164
        (SquirrelMail authenticated user wolpert)
        by www.codeheadsystems.com with HTTP;
        Fri, 22 Nov 2002 16:05:25 -0700 (MST)
Message-Id: <46479.209.105.253.164.1038006325.squirrel@www.codeheadsystems.com>
Date: Fri, 22 Nov 2002 16:05:25 -0700 (MST)
From: "Ned Wolpert" <wolpert@codeheadsystems.com>
To: <FreeBSD-gnats-submit@freebsd.org>
Cc: <wolpert@codeheadsystems.com>
Subject: New port: rbl-milter, a sendmail milter

>Number:         45605
>Category:       ports
>Synopsis:       New port: rbl-milter, a sendmail milter
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    dinoex
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 22 15:10:01 PST 2002
>Closed-Date:    Mon Apr 07 21:10:35 CEST 2003
>Last-Modified:  Mon Apr 07 21:11:04 CEST 2003
>Originator:     Ned Wolpert wolpert@codeheadsystems.com
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
Codehead Systems
>Environment:
System: FreeBSD wolpert.codeheadsystems.com 4.7-STABLE FreeBSD
4.7-STABLE #11: Sat Oct 26 07:44:20 MST 2002
wolpert@wolpert.codeheadsystems.com:/opt/usr/obj/opt/usr/src/sys/GODOT
i386

>Description:
	New port ready for FreeBSD. Provides rbl-milter, a sendmail milter
that adds headers to the mail if the site originator or relay for the
mail is an open-relay.  Allows the end-user to filter based on the relay
rather than sendmail simply blocking the site via FEATURE(dnsbl) in the
.mc file. To be used incases the user has some valid open-relay sites
they need to get mail  from.

>How-To-Repeat:

>Fix:

--- rbl-milter.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:
#
#	rbl-milter
#	rbl-milter/Makefile
#	rbl-milter/pkg-comment
#	rbl-milter/pkg-descr
#	rbl-milter/pkg-plist
#	rbl-milter/distinfo
#	rbl-milter/pkg-message
#	rbl-milter/files
#	rbl-milter/files/patch-aa
#	rbl-milter/files/rbl-milter.sh.in
#
echo c - rbl-milter
mkdir -p rbl-milter > /dev/null 2>&1
echo x - rbl-milter/Makefile
sed 's/^X//' >rbl-milter/Makefile << 'END-of-rbl-milter/Makefile'
X# New ports collection makefile for:   rbl-milter
X# Date created:        15 November 2002
X# Whom:                wolpert
X#
X# $FreeBSD$
X#
X
XPORTNAME=      rbl-milter
XPORTVERSION=   0.30
XCATEGORIES=    mail
XMASTER_SITES=  http://opensource.confusticate.com/rbl-milter/
X
XMAINTAINER=    wolpert@codeheadsystems.com
X
XGNU_CONFIGURE= yes
XUSE_GMAKE=     yes
X
XCONFIGURE_ARGS= --with-sendmail=/usr \
X		--with-sendmail-obj=/usr/lib
X
Xpost-install:
X	@${SED} 's|%%PREFIX%%|${PREFIX}|g' \
X		${FILESDIR}/rbl-milter.sh.in > ${WRKDIR}/rbl-milter.sh
X	${INSTALL_SCRIPT} ${WRKDIR}/rbl-milter.sh \
X		${PREFIX}/etc/rc.d/rbl-milter.sh
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
END-of-rbl-milter/Makefile
echo x - rbl-milter/pkg-comment
sed 's/^X//' >rbl-milter/pkg-comment << 'END-of-rbl-milter/pkg-comment'
XA milter that adds mail header warnings on mail from open-relays
END-of-rbl-milter/pkg-comment
echo x - rbl-milter/pkg-descr
sed 's/^X//' >rbl-milter/pkg-descr << 'END-of-rbl-milter/pkg-descr'
XThis is a simple sendmail milter which adds an X-RBL-Warning header to
any  Xemails that are received that come from an open relay as
determined by your  Xchoice of RBL checking service (i.e.
bl.spamcop.net).
X
XThis is useful if you'd rather have the mail user agent (MUA) deal with
 Xpotential spam rather than just blocking it in case you loose
legitimate Xmessages.  Note that the X-RBL-Warning header is only set if
the site was Xfound to be an open-relay.
X
XFor more information, see the rbl-milter website at:
X  WWW: http://opensource.confusticate.com/rbl-milter/
XRBL-Milter was created by Jeremy Beker <gothmog@confusticate.com> and
the Xport is maintained by Ned Wolpert <wolpert@codeheadsystems.com>
END-of-rbl-milter/pkg-descr
echo x - rbl-milter/pkg-plist
sed 's/^X//' >rbl-milter/pkg-plist << 'END-of-rbl-milter/pkg-plist'
Xsbin/rbl-milter
Xetc/rc.d/rbl-milter.sh
END-of-rbl-milter/pkg-plist
echo x - rbl-milter/distinfo
sed 's/^X//' >rbl-milter/distinfo << 'END-of-rbl-milter/distinfo'
XMD5 (rbl-milter-0.30.tar.gz) = 349a080780bbe2a79ee39b2e417c0d10
END-of-rbl-milter/distinfo
echo x - rbl-milter/pkg-message
sed 's/^X//' >rbl-milter/pkg-message << 'END-of-rbl-milter/pkg-message'
XThe start/stop script has been placed in $PREFIX/etc/rc.d/rbl-milter.sh
 XRun the program now with the start command to get rbl-milter running.
By Xdefault, it uses the relays found at relays.ordb.org but you can
change that Xby modifying the script.  It accepts multiple -d commands
for multiple Xsite checks.
X
XNote that you will need to edit the proper sendmail.mc file in your
/etc/mail Xdirectory so that sendmail will pass mail to rbl-milter.  If
you have not Xdone this before, do the following:
X
X  cd /etc/mail
X  cp -p freebsd.mc `hostname`.mc
X
XAdd the INPUT_MAIL_FILTER line to the file:
X
X  INPUT_MAIL_FILTER(`rbl-milter',`S=local:/var/run/rbl-milter')
X
Xand rebuild it
X
X  make
X  make install
X  make restart
X
XBy default, the INPUT_MAIL_FILTER line will ignore the filter if
rbl-milter Xis not running.
END-of-rbl-milter/pkg-message
echo c - rbl-milter/files
mkdir -p rbl-milter/files > /dev/null 2>&1
echo x - rbl-milter/files/patch-aa
sed 's/^X//' >rbl-milter/files/patch-aa <<
'END-of-rbl-milter/files/patch-aa' X*** configure.old	Fri Nov 22
06:30:28 2002
X--- configure	Fri Nov 22 06:30:25 2002
X***************
X*** 1230,1236 ****
X
X  LDFLAGS="$LDFLAGS -L$SENDMAIL_OBJ/libmilter -L$SENDMAIL_OBJ/libsm
-L$SENDMAIL_OBJ/libsmutil -L$SENDMAIL_OBJ/lib"; X  CFLAGS="$CFLAGS -Wall
-Werror"
X! LIBS="$LIBS -pthread -lpthread"
X
X
X  echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
X--- 1230,1236 ----
X
X  LDFLAGS="$LDFLAGS -L$SENDMAIL_OBJ/libmilter -L$SENDMAIL_OBJ/libsm
-L$SENDMAIL_OBJ/libsmutil -L$SENDMAIL_OBJ/lib"; X  CFLAGS="$CFLAGS -Wall
-Werror"
X! LIBS="$LIBS -pthread -lc_r"
X
X
X  echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
END-of-rbl-milter/files/patch-aa
echo x - rbl-milter/files/rbl-milter.sh.in
sed 's/^X//' >rbl-milter/files/rbl-milter.sh.in <<
'END-of-rbl-milter/files/rbl-milter.sh.in' X#!/bin/sh
X
Xif [ ! -f %%PREFIX%%/sbin/rbl-milter ]
Xthen
X	echo "rbl-milter not installed"
X	exit 0;
Xfi
X
Xcase $1 in
Xstart)
X	%%PREFIX%%/sbin/rbl-milter -l -r -p local:/var/run/rbl-milter -d
relays.ordb.org \ X	&& echo -n " rbl-milter" \
X	|| echo " rbl-milter FAILED TO START"
X	;;
Xstop)
X	killall rbl-milter && echo -n " rbl-milter"
X	;;
Xrestart)
X        $0 stop
X        $0 start
X        ;;
X*)
X        echo "Usage: `basename $0` {start|stop}" >&2
X        exit 64
X        ;;
Xesac
X
Xexit 0
X
END-of-rbl-milter/files/rbl-milter.sh.in
exit
--- rbl-milter.shar ends here ---



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: dinoex 
State-Changed-When: Mon Apr 7 21:10:09 CEST 2003 
State-Changed-Why:  
committed, thanks. 

Modifications: 
- use a tab (not space) after a variable name 
- shar archive was linewrapped my your mailer 
- added support for NO_WERROR 

Log: 

===>  Extracting for rbl-milter-0.30 
Responsible-Changed-From-To: freebsd-ports-bugs->dinoex 
Responsible-Changed-By: dinoex 
Responsible-Changed-When: Mon Apr 7 21:10:52 CEST 2003 
Responsible-Changed-Why:  


http://www.freebsd.org/cgi/query-pr.cgi?pr=45605 
>Unformatted:
 >> Checksum OK for rbl-milter-0.30.tar.gz. 
 ===>  Patching for rbl-milter-0.30 
 ===>  Applying FreeBSD patches for rbl-milter-0.30 
 ===>   rbl-milter-0.30 depends on executable: gmake - found 
 ===>  Configuring for rbl-milter-0.30 
 creating cache ./config.cache 
 checking for a BSD compatible install... /usr/bin/install -c -o root -g wheel 
 checking whether build environment is sane... yes 
 checking whether gmake sets ${MAKE}... yes 
 checking for working aclocal... missing 
 checking for working autoconf... missing 
 checking for working automake... missing 
 checking for working autoheader... missing 
 checking for working makeinfo... found 
 checking for gcc... cc 
 checking whether the C compiler (cc -pipe -W -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wconversion -Wformat -Wid-clash-30 -Wimplicit -Wimplicit-function-delcaration -Wimplicit-int -Wlong-long -Wmai n -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-import -Wno-parentheses -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wstrict-prototypes -Wswitch -Wtraditional -Wtrigraphs -Wunused -Wwrite-stri ngs  ) works... yes 
 checking whether the C compiler (cc -pipe -W -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wconversion -Wformat -Wid-clash-30 -Wimplicit -Wimplicit-function-delcaration -Wimplicit-int -Wlong-long -Wmai n -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-import -Wno-parentheses -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wstrict-prototypes -Wswitch -Wtraditional -Wtrigraphs -Wunused -Wwrite-stri ngs  ) is a cross-compiler... no 
 checking whether we are using GNU C... yes 
 checking whether cc accepts -g... yes 
 checking for a BSD compatible install... /usr/bin/install -c -o root -g wheel 
 checking how to run the C preprocessor... cc -E 
 checking for Sendmail... /usr 
 checking for libmilter/mfapi.h... yes 
 checking for sendmail library location... /usr/lib 
 checking for socket in -lsocket... no 
 checking for gethostbyname in -lnsl... no 
 checking for inet_ntop in -lresolv... no 
 checking for sm_snprintf in -lsmutil... no 
 checking for sm_snprintf in -lsm... no 
 checking for smfi_register in -lmilter... yes 
 checking for __res_ninit... no 
 checking for arpa/nameser_compat.h... yes 
 checking whether byte ordering is bigendian... no 
 updating cache ./config.cache 
 creating ./config.status 
 creating Makefile 
 ===>  Building for rbl-milter-0.30 
 cc -DPACKAGE="rbl-milter" -DVERSION="0.30" -DHAVE_LIBMILTER=1 -DHAVE_ARPA_NAMESER_COMPAT_H=1  -I. -I.    -I/usr/include/  -pipe -W -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wconversion -Wformat -Wi d-clash-30 -Wimplicit -Wimplicit-function-delcaration -Wimplicit-int -Wlong-long -Wmain -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-import -Wno-parentheses -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wsig n-compare -Wstrict-prototypes -Wswitch -Wtraditional -Wtrigraphs -Wunused -Wwrite-strings  -Wall  -c rbl-milter.c 
 In file included from rbl-milter.c:19: 
 rbl-milter.h:96: warning: function declaration isn't a prototype 
 rbl-milter.h:115: warning: initialization discards qualifiers from pointer target type 
 rbl-milter.c: In function `makeheader': 
 rbl-milter.c:89: warning: passing arg 1 of `calloc' as unsigned due to prototype 
 rbl-milter.c: In function `dnsblcheck': 
 rbl-milter.c:196: warning: passing arg 2 of `calloc' as unsigned due to prototype 
 rbl-milter.c:182: warning: unused parameter `priv' 
 rbl-milter.c: In function `getips': 
 rbl-milter.c:331: warning: passing arg 1 of `calloc' as unsigned due to prototype 
 rbl-milter.c:336: warning: passing arg 2 of `snprintf' as unsigned due to prototype 
 rbl-milter.c: In function `mlfi_connect': 
 rbl-milter.c:398: warning: unused parameter `hostname' 
 rbl-milter.c: In function `mlfi_eom': 
 rbl-milter.c:489: warning: passing arg 2 of `smfi_addheader' discards qualifiers from pointer target type 
 rbl-milter.c:510: warning: passing arg 2 of `smfi_addheader' discards qualifiers from pointer target type 
 rbl-milter.c: In function `mlfi_envfrom': 
 rbl-milter.c:526: warning: unused parameter `argv' 
 rbl-milter.c: At top level: 
 rbl-milter.c:586: warning: function declaration isn't a prototype 
 rbl-milter.c: In function `main': 
 rbl-milter.c:602: warning: nested extern declaration of `optarg' 
 rbl-milter.c:602: warning: redundant redeclaration of `optarg' in same scope 
 /usr/include/unistd.h:110: warning: previous declaration of `optarg' 
 rbl-milter.c:603: warning: declaration of `socket' shadows global declaration 
 rbl-milter.c:607: warning: declaration of `syslog' shadows global declaration 
 cc  -pipe -W -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wconversion -Wformat -Wid-clash-30 -Wimplicit -Wimplicit-function-delcaration -Wimplicit-int -Wlong-long -Wmain -Wmissing-declarations -Wmissi ng-prototypes -Wnested-externs -Wno-import -Wno-parentheses -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wstrict-prototypes -Wswitch -Wtraditional -Wtrigraphs -Wunused -Wwrite-strings  -Wall  -L/usr/lib/libmilter  -L/usr/lib/libsm -L/usr/lib/libsmutil -L/usr/lib/lib -o rbl-milter  rbl-milter.o  -lmilter  -pthread -lc_r 
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=45605 
