From 66779f85b06c5ee8f7689e44010e71912b01b161 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: May 23 2008 18:33:53 +0000 Subject: - Add a patch to handle both X-Spam-Score and X-Spam-Level --- diff --git a/email2trac-0.13-spamlevel.patch b/email2trac-0.13-spamlevel.patch new file mode 100644 index 0000000..0eb4b20 --- /dev/null +++ b/email2trac-0.13-spamlevel.patch @@ -0,0 +1,17 @@ +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'): diff --git a/email2trac.spec b/email2trac.spec index f87199c..e9a8306 100644 --- a/email2trac.spec +++ b/email2trac.spec @@ -2,7 +2,7 @@ # Jon Topper 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 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 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 @@ with the following extensions: %prep %setup -q %patch0 -p1 +%patch1 -p1 %build @@ -59,6 +61,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri May 23 2008 Jesse Keating - 0.13-3 +- Add a patch to handle both X-Spam-Score and X-Spam-Level + * Tue May 20 2008 Jesse Keating - 0.13-2 - BR python as per review.