Date: Thu, 13 Sep 2007 15:50:38 GMT From: Felippe de Meirelles Motta <lippe@freebsdbrasil.com.br> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/116332: [NEW PORT] mail/xf-spf Message-ID: <200709131550.l8DFoc06057563@www.freebsd.org> Resent-Message-ID: <200709131600.l8DG06QN000424@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 116332 >Category: ports >Synopsis: [NEW PORT] mail/xf-spf >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: Thu Sep 13 16:00:06 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Felippe de Meirelles Motta >Release: FreeBSD 6.2-STABLE i386 >Organization: FreeBSD Brasil LTDA >Environment: FreeBSD dev.bh.freebsdbrasil.com.br 6.2-STABLE FreeBSD 6.2-STABLE #0: Mon Jun 25 13:46:23 BRT 2007 lippe@dev.bh.freebsdbrasil.com.br:/usr/obj/usr/src/sys/GENERIC i386 >Description: xf-spf is an customized SPF checker for qmail to be used with qmail and SMTPEXTFORK patch. When an SMTP session starts, xf-spf is expected to be forked from qmail-smtpd - this is why you need SMTPEXTFORK. When forked, this proces- ses gets all enviroment variables which were available for the parent process (qmail-smtpd). When forked, xf-spf will use TCPREMOTEIP, REMOTEMF, REMOTERCPT and REMOTEHELO enviroment vars. The first one is set by tcpserver(1) and the last three are set my SMTPEXTFORK patch; xf-spf will them use libspf2 to perform the SPF check and validate the sender according to RFC-4408. WWW: http://www6.freebsdbrasil.com.br/~eksffa/l/dev/qmail-smtpextfork/ >How-To-Repeat: >Fix: Patch attached with submission follows: # 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: # # xf-spf # xf-spf/pkg-descr # xf-spf/Makefile # xf-spf/files # xf-spf/files/pkg-message.in # xf-spf/distinfo # xf-spf/pkg-plist # echo c - xf-spf mkdir -p xf-spf > /dev/null 2>&1 echo x - xf-spf/pkg-descr sed 's/^X//' >xf-spf/pkg-descr << 'END-of-xf-spf/pkg-descr' Xxf-spf is an customized SPF checker for qmail to be used with qmail and XSMTPEXTFORK patch. When an SMTP session starts, xf-spf is expected to be forked Xfrom qmail-smtpd - this is why you need SMTPEXTFORK. When forked, this proces- Xses gets all enviroment variables which were available for the parent process X(qmail-smtpd). X XWhen forked, xf-spf will use TCPREMOTEIP, REMOTEMF, REMOTERCPT and REMOTEHELO Xenviroment vars. The first one is set by tcpserver(1) and the last three are Xset my SMTPEXTFORK patch; xf-spf will them use libspf2 to perform the SPF Xcheck and validate the sender according to RFC-4408. X XWWW: http://www6.freebsdbrasil.com.br/~eksffa/l/dev/qmail-smtpextfork/ END-of-xf-spf/pkg-descr echo x - xf-spf/Makefile sed 's/^X//' >xf-spf/Makefile << 'END-of-xf-spf/Makefile' X# New ports collection makefile for: xf-spf X# Date created: 2007-09-12 X# Whom: Felippe de Meirelles Motta <lippe@freebsdbrasil.com.br> X# X# $FreeBSD$ X# X XPORTNAME= xf-spf XPORTVERSION= 0.1 XCATEGORIES= mail XMASTER_SITES= http://www6.freebsdbrasil.com.br/~eksffa/l/dev/qmail-smtpextfork/ X XMAINTAINER= lippe@freebsdbrasil.com.br XCOMMENT= SPF checker for Qmail's SMTPEXTFORK patch X XLIB_DEPENDS+= spf2.2:${PORTSDIR}/mail/libspf2 X XUSE_QMAIL= yes XUSE_BZIP2= yes X XSUB_FILES= pkg-message XSUB_LIST= QMAIL_PREFIX=${QMAIL_PREFIX} XPLIST_SUB= QMAIL_PREFIX=${QMAIL_PREFIX} X XPORTDOCS= README TODO CHANGELOG COPYRIGHT X X.include <bsd.port.pre.mk> X Xpost-install: X.if !defined(NOPORTDOCS) X @${MKDIR} ${DOCSDIR} X. for i in ${PORTDOCS} X @${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR} X. endfor X.endif X @${CAT} ${PKGMESSAGE} X X.include <bsd.port.post.mk> END-of-xf-spf/Makefile echo c - xf-spf/files mkdir -p xf-spf/files > /dev/null 2>&1 echo x - xf-spf/files/pkg-message.in sed 's/^X//' >xf-spf/files/pkg-message.in << 'END-of-xf-spf/files/pkg-message.in' X=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= X XThe enviroment var, SPFBEHAVIOR needs to be set. If it is not set, xf-spf Xwill not run, and will log a message stating SPFBEHAVIOR enviroment var Xis not available. SPFBEHAVIOR will define the proper behavior of xf-spf. X XIf you want to disable xf-spf for some reason, or disable it's checking for Xone particular IP address, using tcprules(1), set SPFBEHAVIOR to 0. X XConfigure xf-spf usage on qmail-smtpd's SMTPEXTFORK patch: X XAdd %%QMAIL_PREFIX%%/bin/xf-spf to the appropriated enviroment variable: X X echo %%QMAIL_PREFIX%%/bin/xf-spf > /var/service/smtpd/env/SMTPEXTFORK X XOr use it with tcprules: X X :allow,SMTPEXTFORK="%%QMAIL_PREFIX%%/bin/xf-spf" X XRemember that more than one program can be used with SMTPEXTFORK patch. If Xyou already use any other, add xf-spf separated by comma: X X :allow,SMTPEXTFORK="%%QMAIL_PREFIX%%/bin/xf-spf,/some/other/prog" X XOr X X echo "/some/other/prog,%%QMAIL_PREFIX%%/bin/xf-spf" \ X > /var/service/smtpd/env/SMTPEXTFORK X X=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= X END-of-xf-spf/files/pkg-message.in echo x - xf-spf/distinfo sed 's/^X//' >xf-spf/distinfo << 'END-of-xf-spf/distinfo' XMD5 (xf-spf-0.1.tar.bz2) = 1b503b6c7bfe2952acf511594f00d58f XSHA256 (xf-spf-0.1.tar.bz2) = 2dbde5d60c4c72fbfc1492c9f93971fbb45816ae5d6642ff0324eeecafa5c42d XSIZE (xf-spf-0.1.tar.bz2) = 6111 END-of-xf-spf/distinfo echo x - xf-spf/pkg-plist sed 's/^X//' >xf-spf/pkg-plist << 'END-of-xf-spf/pkg-plist' X@cwd %%QMAIL_PREFIX%% Xbin/xf-spf END-of-xf-spf/pkg-plist exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709131550.l8DFoc06057563>