rpms/email2trac/EL-5 email2trac-0.13-spamlevel.patch, NONE, 1.1 email2trac.spec, 1.1, 1.2

Jesse Keating (jkeating) fedora-extras-commits at redhat.com
Fri May 23 18:36:29 UTC 2008


Author: jkeating

Update of /cvs/pkgs/rpms/email2trac/EL-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27746/EL-5

Modified Files:
	email2trac.spec 
Added Files:
	email2trac-0.13-spamlevel.patch 
Log Message:
Add patch for spam score/level.


email2trac-0.13-spamlevel.patch:

--- NEW FILE email2trac-0.13-spamlevel.patch ---
diff -up email2trac-0.13/email2trac.py.in.spam email2trac-0.13/email2trac.py.in
--- email2trac-0.13/email2trac.py.in.spam	2008-05-23 14:31:40.000000000 -0400
+++ email2trac-0.13/email2trac.py.in	2008-05-23 14:32:25.000000000 -0400
@@ -247,6 +247,13 @@ class TicketEmailParser(object):
 			if number >= self.SPAM_LEVEL:
 				spam = True
 				
+		if message.has_key('X-Spam-Level'):
+			spam_l = string.split(message['X-Spam-Level'])
+			number = spam_l[0].count('*')
+
+			if number >= self.SPAM_LEVEL:
+				spam = True
+				
 		# treat virus mails as spam
 		#
 		elif message.has_key('X-Virus-found'):			


Index: email2trac.spec
===================================================================
RCS file: /cvs/pkgs/rpms/email2trac/EL-5/email2trac.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- email2trac.spec	20 May 2008 20:52:05 -0000	1.1
+++ email2trac.spec	23 May 2008 18:35:48 -0000	1.2
@@ -2,7 +2,7 @@
 # Jon Topper <jon at topper dot me dot uk>
 Name:           email2trac
 Version:        0.13
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Utilities for converting emails to trac tickets
 
 Group:          Applications/Internet
@@ -15,6 +15,7 @@
 BuildRequires:  python
 Requires:       trac
 Patch0:         email2trac-0.13-installperms.patch
+Patch1:         email2trac-0.13-spamlevel.patch
 
 %description
 This is a release of the SARA package email2trac that contains utilities that 
@@ -33,6 +34,7 @@
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 
 %build
@@ -59,6 +61,9 @@
 
 
 %changelog
+* Fri May 23 2008 Jesse Keating <jkeating at redhat.com> - 0.13-3
+- Add a patch to handle both X-Spam-Score and X-Spam-Level
+
 * Tue May 20 2008 Jesse Keating <jkeating at redhat.com> - 0.13-2
 - BR python as per review.
 




More information about the fedora-extras-commits mailing list