From mm@mail2.vx.sk  Thu Sep  9 10:24:55 2010
Return-Path: <mm@mail2.vx.sk>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 36D4810656B3;
	Thu,  9 Sep 2010 10:24:55 +0000 (UTC)
	(envelope-from mm@mail2.vx.sk)
Received: from mail2.vx.sk (mail2.vx.sk [IPv6:2a01:4f8:100:84a3::3])
	by mx1.freebsd.org (Postfix) with ESMTP id ABB7A8FC16;
	Thu,  9 Sep 2010 10:24:54 +0000 (UTC)
Received: from neo.vx.sk (localhost [127.0.0.1])
	by mail2.vx.sk (Postfix) with ESMTP id A4C2FDDE64;
	Thu,  9 Sep 2010 12:24:53 +0200 (CEST)
Received: from mail2.vx.sk ([127.0.0.1])
	by neo.vx.sk (mail.vx.sk [127.0.0.1]) (amavisd-new, port 10024)
	with LMTP id MnFO2fYvXAtm; Thu,  9 Sep 2010 12:24:41 +0200 (CEST)
Received: by mail2.vx.sk (Postfix, from userid 1001)
	id 34376DDE5C; Thu,  9 Sep 2010 12:24:41 +0200 (CEST)
Message-Id: <20100909102441.34376DDE5C@mail2.vx.sk>
Date: Thu,  9 Sep 2010 12:24:41 +0200 (CEST)
From: Martin Matuska <mm@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: sahil@FreeBSD.org
Subject: [PATCH] mail/postfix: reintroduce SPF support
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         150428
>Category:       ports
>Synopsis:       [PATCH] mail/postfix: reintroduce SPF support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sahil
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 09 10:30:01 UTC 2010
>Closed-Date:    Mon Sep 13 02:10:22 UTC 2010
>Last-Modified:  Mon Sep 13 02:10:22 UTC 2010
>Originator:     Martin Matuska
>Release:        FreeBSD 8.1-STABLE amd64
>Organization:
>Environment:
System: FreeBSD neo.vx.sk 8.1-STABLE FreeBSD 8.1-STABLE #0 r210674M: Sat Jul 31 12:28:28 CEST
>Description:
Reintroduce SPF support with updated patch for Postfix 2.7.1.

Original patch (old and outdated):
http://www.ipnet6.org/postfix/download/postfix-libspf2-2.2.0-5.patch

Updated patch for new postfix API changes and libspf2 1.2.x API:
http://www.linuxrulz.org/nkukard/postfix/postfix-2.3/postfix-2.3.2_libspf2-1.2.x-20060819.patch

Port maintainer (sahil@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- postfix-2.7.1_1,1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/mail/postfix/Makefile,v
retrieving revision 1.158
diff -u -r1.158 Makefile
--- Makefile	10 Jun 2010 02:25:30 -0000	1.158
+++ Makefile	9 Sep 2010 10:19:28 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	postfix
 PORTVERSION=	2.7.1
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	mail ipv6
 MASTER_SITES=	ftp://ftp.porcupine.org/mirrors/postfix-release/official/ \
@@ -32,7 +33,7 @@
 
 # back compat pull in settings from POSTFIX_OPTIONS for convenience when
 # make config is run (happens first time port is built, too)
-.for o in SASL2 SASLKRB5 SASLKRB5MIT TLS BDB MySQL PgSQL OpenLDAP CDB NIS VDA Test
+.for o in SASL2 SASLKRB5 SASLKRB5MIT TLS BDB MySQL PgSQL OpenLDAP CDB NIS VDA Test SPF
 STATUS_${o}=off
 .endfor
 .if defined(POSTFIX_OPTIONS)
@@ -55,6 +56,7 @@
 		NIS		"NIS maps lookups"					${STATUS_NIS} \
 		VDA		"VDA (Virtual Delivery Agent 32Bit)"			${STATUS_VDA} \
 		TEST		"SMTP/LMTP test server and generator"			${STATUS_Test} \
+		SPF		"SPF support (via libspf2 1.2.x)"			${STATUS_SPF} \
 		INST_BASE	"Install into /usr and /etc/postfix"			off
 
 .include <bsd.port.options.mk>
@@ -150,6 +152,19 @@
 POSTFIX_AUXLIBS+=	-L${OPENSSLLIB} ${LDFLAGS} -lssl -lcrypto
 .endif
 
+.if defined(WITH_SPF)
+LIB_DEPENDS+=		spf2.3:${PORTSDIR}/mail/libspf2
+PATCH_SITES+=		${MASTER_SITE_LOCAL}
+PATCH_SITE_SUBDIR=	mm
+PATCHFILES+=		postfix-2.7.1-libspf2-1.2.x.patch.gz
+PATCH_DIST_STRIP=	-p1
+POSTFIX_CCARGS+=	-DHAVE_NS_TYPE -I${LOCALBASE}/include
+POSTFIX_AUXLIBS+=	-L${LOCALBASE}/lib -lspf2
+PLIST_SUB+=	SPF=""
+.else
+PLIST_SUB+=	SPF="@comment "
+.endif
+
 .if defined(WITH_BDB)
 USE_BDB=		yes
 POSTFIX_CCARGS+=	-I${BDB_INCLUDE_DIR}
@@ -295,6 +310,12 @@
 	@${ECHO} '$$html_directory/$f:f:root:-:644' \
 		>> ${WRKSRC}/conf/postfix-files
 .endfor
+.if defined(WITH_SPF)
+	@${ECHO} '$$readme_directory/SPF_README:f:root:-:644' \
+		>> ${WRKSRC}/conf/postfix-files
+	@${REINPLACE_CMD} -E -e '${REINPLACE}' \
+		${WRKSRC}/README_FILES/SPF_README
+.endif
 .if defined(WITH_VDA)
 	@${ECHO} '$$readme_directory/VDA_README:f:root:-:644' \
 		>> ${WRKSRC}/conf/postfix-files
Index: distinfo
===================================================================
RCS file: /home/pcvs/ports/mail/postfix/distinfo,v
retrieving revision 1.107
diff -u -r1.107 distinfo
--- distinfo	10 Jun 2010 02:25:30 -0000	1.107
+++ distinfo	9 Sep 2010 10:19:28 -0000
@@ -1,6 +1,9 @@
 MD5 (postfix/postfix-2.7.1.tar.gz) = b7a5c3ccd309156a65d6f8d2683d4fa1
 SHA256 (postfix/postfix-2.7.1.tar.gz) = 12301aa8dae18d333c8c96dbf7673f8f05139f10406e7afe278cfd4a1f132df0
 SIZE (postfix/postfix-2.7.1.tar.gz) = 3418747
+MD5 (postfix/postfix-2.7.1-libspf2-1.2.x.patch.gz) = 28261fa4db230433cade2ebbee629a18
+SHA256 (postfix/postfix-2.7.1-libspf2-1.2.x.patch.gz) = 98e39c8494bb20a2e790ca3e1452eec94446eb858c628e33bf4d3730fb31150d
+SIZE (postfix/postfix-2.7.1-libspf2-1.2.x.patch.gz) = 7074
 MD5 (postfix/postfix-2.6.5-vda-ng.patch.gz) = 43e54d0a1a016b90d15a1bd231e6fa38
 SHA256 (postfix/postfix-2.6.5-vda-ng.patch.gz) = e1c04e9d268dc84832334997e1f593af9877dbd5030708280427a0dc4452e797
 SIZE (postfix/postfix-2.6.5-vda-ng.patch.gz) = 12435
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/mail/postfix/pkg-plist,v
retrieving revision 1.32
diff -u -r1.32 pkg-plist
--- pkg-plist	28 Mar 2010 18:41:40 -0000	1.32
+++ pkg-plist	9 Sep 2010 10:19:28 -0000
@@ -132,6 +132,7 @@
 %%PORTDOCS%%%%DOCSDIR%%/SMTPD_PROXY_README.html
 %%PORTDOCS%%%%DOCSDIR%%/SOHO_README
 %%PORTDOCS%%%%DOCSDIR%%/SOHO_README.html
+%%SPF%%%%PORTDOCS%%%%DOCSDIR%%/SPF_README
 %%PORTDOCS%%%%DOCSDIR%%/STANDARD_CONFIGURATION_README
 %%PORTDOCS%%%%DOCSDIR%%/STANDARD_CONFIGURATION_README.html
 %%PORTDOCS%%%%DOCSDIR%%/STRESS_README
--- postfix-2.7.1_1,1.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->sahil 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Sep 9 10:30:15 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150428 
State-Changed-From-To: open->closed 
State-Changed-By: sahil 
State-Changed-When: Mon Sep 13 02:10:21 UTC 2010 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150428 
>Unformatted:
