From root@eu.route.mx  Sun Aug 21 10:41:23 2011
Return-Path: <root@eu.route.mx>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8CEE6106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 21 Aug 2011 10:41:23 +0000 (UTC)
	(envelope-from root@eu.route.mx)
Received: from eu.route.mx (eu.route.mx [46.137.95.40])
	by mx1.freebsd.org (Postfix) with ESMTP id 0C2BD8FC0C
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 21 Aug 2011 10:41:22 +0000 (UTC)
Received: (qmail 34423 invoked by uid 0); 21 Aug 2011 10:41:21 -0000
Message-Id: <20110821104121.34422.qmail@eu.route.mx>
Date: 21 Aug 2011 10:41:21 -0000
From: Nicolas de Bari Embriz <nbari@dalmp.com>
Reply-To: Nicolas de Bari Embriz <nbari@dalmp.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: nbari@dalmp.com
Subject: update port mail/qmail	
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         159964
>Category:       ports
>Synopsis:       [PATCH] mail/qmail Add smtpauthuser and SRS support
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    crees
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 21 10:50:07 UTC 2011
>Closed-Date:    Fri Sep 09 17:28:46 UTC 2011
>Last-Modified:  Fri Sep  9 17:30:09 UTC 2011
>Originator:     Nicolas de Bari Embriz <nbari@dalmp.com>
>Release:        FreeBSD 8.2-RELEASE i386
>Organization:
>Environment:
System: FreeBSD eu.route.mx 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Aug 4 15:39:43 UTC 2011 root@ip-10-17-5-252:/usr/obj/i386/usr/src/sys/XEN i386


	
>Description:
2 patches for qmail-ldap

SMTPAUTHUSER && SRS support

The idea is to prevent SPAM, controlling or limiting the number of emails that an account/email could send.
Before a user is available to send email, It must be authorized, using an email/password, this normally is know as SMTP AUTH, this patch sets an environment var called SMTPAUTHUSER containing the email used on the the authentication process.
A user can send email using his own email address or on behalf others, but either the way he does it the SMTPAUTHUSER ENV var will never change rather the 'From' field.
One you have the ENV var, is up to you how to use it, you can use a custom qmail-ldap scheme to set limits per user, or you can use a global limit with out need to modify the ldap.

http://code.google.com/p/qmail-ldap-smtpauthuser/wiki/HowTo


SRS support

Enable support to SRS (Sender Rewriting Scheme) on qmail-ldap 

this patch depends on mail/libsrs2

http://www.qmail-ldap.org/wiki/index.php/SPF_and_SRS



>How-To-Repeat:
	
>Fix:

	

--- FreeBSD-qmail-port-patch.diff begins here ---
diff -urN qmail.old/Makefile qmail/Makefile
--- qmail.old/Makefile	2011-08-21 05:56:39.204328449 -0400
+++ qmail/Makefile	2011-08-20 18:26:09.000000000 -0400
@@ -178,7 +178,9 @@
 		XF_QUITASAP	"Close SMTP session ASAP (SMTPEXTFORK)" off \
 		SENDERCHECK4	"LOOSE checks exclusively for RELAY clients" off \
 		ENHACELOGS	"Enhace qmail-smtpd logs (spamcontrol-like)" off \
-		GRTDELAY	"Add jms1's Greet Delay feature" off
+		GRTDELAY	"Add jms1's Greet Delay feature" off \
+		SMTPAUTHUSER	"create env SMTPAUTHUSER containing authuser" off\
+		SRS	"Sender Rewriting Scheme support" off
 
 LDAP_PARAMS=	ALTQUEUE BIGBROTHER BIGTODO BIND_8_COMPAT\
 		CLEARTEXTPASSWD DASH_EXT DATA_COMPRESS\
@@ -349,6 +351,13 @@
 PLIST_SUB+=	EXTERNAL_TODO="@comment "
 . endif
 
+. if defined(WITH_SRS)
+BUILD_DEPENDS= srs:${PORTSDIR}/mail/libsrs2
+MASTER_SITES+=	http://qmail-ldap-smtpauthuser.googlecode.com/svn/trunk/:srs_ldap
+SRS_LDAP_PATCH =	qmail-ldap-1.03-20060201-SRS.patch
+DISTFILES+=	${SRS_LDAP_PATCH}:srs_ldap
+. endif
+
 .endif
 
 .if defined(WITH_SMTP_AUTH_PATCH) && !defined(BARRIER_SMTP_AUTH_PATCH)
@@ -515,6 +524,17 @@
 PATCHFILES+=	enhacelogging-ldap-${LDAP_PATCH_DATE}_4.patch:ldapenhacelog
 .endif
 
+.if defined(SLAVE_LDAP) && defined(WITH_SMTPAUTHUSER) 
+PATCH_SITES+=	http://qmail-ldap-smtpauthuser.googlecode.com/svn/trunk/:smtpauthuser \
+		${MASTER_SITE_LOCAL:S/$/:smtpauthuser/}
+PATCH_SITE_SUBDIR+= garga/qmail/:smtpauthuser
+. if defined(WITH_ENHACELOGS)
+PATCHFILES+=	qmail-1.03-enhaceloggingSMTPAUTHUSER:smtpauthuser
+. else 
+PATCHFILES+=	SMTPAUTHUSER.patch:smtpauthuser
+. endif
+.endif
+
 .if defined(SLAVE_SPAMCONTROL)
 MASTER_SITES+=	${MASTER_SITE_LOCAL:S/$/:ucspi_ssl/} \
 		http://www.superscript.com/ucspi-ssl/:ucspi_ssl \
@@ -708,6 +728,9 @@
 	@${REINPLACE_CMD} "s|^#LDAPFLAGS=.*$$|LDAPFLAGS=${LDAPFLAGS}|" \
 		${WRKSRC}/Makefile
 . endif
+. if defined(WITH_SRS)
+	@${PATCH} -d ${WRKSRC} < ${DISTDIR}/${DIST_SUBDIR}/${SRS_LDAP_PATCH}
+. endif
 .endif
 .if defined(EXT_BIG_TODO_PATCH)
 	@${PATCH} -d ${WRKSRC} < ${DISTDIR}/${DIST_SUBDIR}/${EXT_BIG_TODO_PATCH}
diff -urN qmail.old/distinfo qmail/distinfo
--- qmail.old/distinfo	2011-08-21 05:56:39.204328449 -0400
+++ qmail/distinfo	2011-08-21 06:02:54.810365655 -0400
@@ -78,3 +78,9 @@
 SIZE (qmail/ucspi-ssl-0.70.tar.gz) = 85111
 SHA256 (qmail/ucspi-ssl-0.70_ucspitls-0.6.patch_) = 35ae45bd17a9ecb9cd79c25a751af47af787189c8b833b26d464b47bed1472ac
 SIZE (qmail/ucspi-ssl-0.70_ucspitls-0.6.patch_) = 12351
+SHA256 (qmail/SMTPAUTHUSER.patch) = 25d55714df2fc61e2cb6ec7853476e2c15f14207fa2218b5d5b68200450beb9c
+SIZE (qmail/SMTPAUTHUSER.patch) = 347
+SHA256 (qmail/qmail-1.03-enhaceloggingSMTPAUTHUSER) = 4e92498aaa2a6d08bf6535524e5220520f97ca9cf28ff464519f5f6f14ec3779
+SIZE (qmail/qmail-1.03-enhaceloggingSMTPAUTHUSER) = 552
+SHA256 (qmail/qmail-ldap-1.03-20060201-SRS.patch) = 2c54abef2af35e7e7a54b94e06cd002877db3ea96fa06f1b53e6d741a62a2154
+SIZE (qmail/qmail-ldap-1.03-20060201-SRS.patch) = 25883
--- FreeBSD-qmail-port-patch.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->garga 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Aug 21 10:50:25 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=159964 
State-Changed-From-To: open->closed 
State-Changed-By: crees 
State-Changed-When: Sun Aug 21 10:56:22 UTC 2011 
State-Changed-Why:  
Duplicate of ports/159965 

http://www.freebsd.org/cgi/query-pr.cgi?pr=159964 
State-Changed-From-To: closed->open 
State-Changed-By: crees 
State-Changed-When: Sun Aug 21 15:49:43 UTC 2011 
State-Changed-Why:  
Reopen after linimon closed ports/159965 for the same reason 

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

From: Nicolas de Bari Embriz Garcia Rojas <nbari@dalmp.com>
To: bug-followup@FreeBSD.org, nbari@dalmp.com
Cc:  
Subject: Re: ports/159964: [PATCH] mail/qmail Add smtpauthuser and SRS support
Date: Thu, 8 Sep 2011 17:04:27 +0100

 --00151740265618ed0004ac703715
 Content-Type: text/plain; charset=ISO-8859-1
 
 Hi, any status ?
 
 --00151740265618ed0004ac703715
 Content-Type: text/html; charset=ISO-8859-1
 
 Hi, any status ?
 
 --00151740265618ed0004ac703715--
Responsible-Changed-From-To: garga->crees 
Responsible-Changed-By: crees 
Responsible-Changed-When: Thu Sep 8 18:51:15 UTC 2011 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=159964 
State-Changed-From-To: open->closed 
State-Changed-By: crees 
State-Changed-When: Fri Sep 9 17:28:44 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/159964: commit references a PR
Date: Fri,  9 Sep 2011 17:28:44 +0000 (UTC)

 crees       2011-09-09 17:28:30 UTC
 
   FreeBSD ports repository
 
   Modified files:
     mail/qmail           Makefile distinfo 
   Log:
   - Add SMTPAUTHUSER and SRS support
   - While here, use WANT_QMAIL rather than hideous relative include
   
   PR:             ports/159964
   Submitted by:   Nicolas de Bari Embriz <nbari@dalmp.com>
   Approved by:    garga (carte blanche via email)
   
   Revision  Changes    Path
   1.155     +28 -5     ports/mail/qmail/Makefile
   1.80      +6 -0      ports/mail/qmail/distinfo
 _______________________________________________
 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:
