[spamass-milter/el5: 27/27] Help for users authenticating to Postfix (#730308)

Paul Howarth pghmcfc at fedoraproject.org
Wed Aug 24 20:05:20 UTC 2011


commit 559998327826871bc843d1c301625d6f7983c06f
Author: Paul Howarth <paul at city-fan.org>
Date:   Thu Aug 18 14:27:41 2011 +0100

    Help for users authenticating to Postfix (#730308)
    
    This change is to help users with Postfix that aren't using the -I option
    to not pass mail from authenticated users through SpamAssassin. Postfix,
    unlike Sendmail, does not provide the {auth_ssf} macro, so in the case
    where mail is from an authenticated user, the modified code can now add
    an (authenticated) hint in the dummy Received: header (where Sendmail would
    add (authenticated bits=nnn)), and this is scored favourably by SpamAssassin.
    
    http://bugzilla.redhat.com/730308

 spamass-milter-0.3.2-auth-no-ssf.patch |   28 ++++++++++++++++++++++++++++
 spamass-milter.spec                    |   11 +++++++++--
 2 files changed, 37 insertions(+), 2 deletions(-)
---
diff --git a/spamass-milter-0.3.2-auth-no-ssf.patch b/spamass-milter-0.3.2-auth-no-ssf.patch
new file mode 100644
index 0000000..ce38173
--- /dev/null
+++ b/spamass-milter-0.3.2-auth-no-ssf.patch
@@ -0,0 +1,28 @@
+This change is to help users with Postfix that aren't using the -I option
+to not pass mail from authenticated users through SpamAssassin. Postfix,
+unlike Sendmail, does not provide the {auth_ssf} macro, so in the case
+where mail is from an authenticated user, the modified code can now add
+an (authenticated) hint in the dummy Received: header (where Sendmail would
+add (authenticated bits=nnn)), and this is scored favourably by SpamAssassin.
+
+http://bugzilla.redhat.com/730308
+
+--- spamass-milter-0.3.2/spamass-milter.cpp
++++ spamass-milter-0.3.2/spamass-milter.cpp
+@@ -1046,9 +1046,14 @@
+ 
+ 		rec_header = (string) "Received: from " + macro_s + " (" + macro__ + ")\r\n\t";
+ 
+-		if (strlen(macro_auth_ssf))
++		if (strlen(macro_auth_authen))
+ 		{
+-			rec_header += (string) "(authenticated bits=" + macro_auth_ssf + ")\r\n\t";
++			rec_header += (string) "(authenticated";
++			if (strlen(macro_auth_ssf))
++			{
++				rec_header += (string) " bits=" + macro_auth_ssf;
++			}
++			rec_header += (string) ")\r\n\t";
+ 		}
+ 
+ 		rec_header += (string) "by " + macro_j + " (" + macro_v + "/" + macro_Z + ") with " +
diff --git a/spamass-milter.spec b/spamass-milter.spec
index f9485da..7603d61 100644
--- a/spamass-milter.spec
+++ b/spamass-milter.spec
@@ -1,7 +1,7 @@
 Summary:	Milter (mail filter) for spamassassin
 Name:		spamass-milter
 Version:	0.3.2
-Release:	2%{?dist}
+Release:	3%{?dist}
 License:	GPLv2+
 Group:		System Environment/Daemons
 URL:		http://savannah.nongnu.org/projects/spamass-milt/
@@ -18,8 +18,9 @@ Patch2:		spamass-milter-0.3.1-authuser.patch
 Patch3:		spamass-milter-0.3.2-rcvd.patch
 Patch4:		spamass-milter-0.3.2-bits.patch
 Patch5:		spamass-milter-0.3.1-group.patch
-# Patch not yet submitted upstream
+# Patches not yet submitted upstream
 Patch7:		spamass-milter-0.3.1-ipv6.patch
+Patch8:		spamass-milter-0.3.2-auth-no-ssf.patch
 # Fedora-specific patches
 Patch10:	spamass-milter-0.3.1-pathnames.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
@@ -75,6 +76,9 @@ socket to communicate with the Postfix MTA.
 # Add IPv6 whitelisting support
 %patch7 -p1 -b .ipv6
 
+# Help for users authenticating to Postfix (#730308)
+%patch8 -p1 -b .postfix-auth
+
 # Local patch for initscript and socket paths
 %patch10 -p1 -b .pathnames
 
@@ -161,6 +165,9 @@ fi
 %dir %attr(-,sa-milt,postfix) %{_localstatedir}/run/spamass-milter/postfix/
 
 %changelog
+* Thu Aug 18 2011 Paul Howarth <paul at city-fan.org> 0.3.2-3
+- Help for users authenticating to Postfix (#730308)
+
 * Mon Jul 18 2011 Paul Howarth <paul at city-fan.org> 0.3.2-2
 - Drop the wrapper, which hasn't been needed since 0.3.1 was released
 - Nobody else likes macros for commands


More information about the scm-commits mailing list