For dgilmore

Janez Nemanič janez.nemanic at gmail.com
Tue Jan 21 19:17:37 UTC 2014


Hi,
here is a patch for ticket
https://fedorahosted.org/fedora-infrastructure/ticket/3632. Dgilmore could
you have a look at it? Let me know if something is wrong?

diff --git a/utils/spam-o-matic b/utils/spam-o-matic
index ba9e059..53c7b32 100755
--- a/utils/spam-o-matic
+++ b/utils/spam-o-matic
@@ -12,6 +12,7 @@ from optparse import OptionParser
 from yum.constants import *
 from yum.misc import getCacheDir
 from collections import defaultdict
+from email.mime.text import MIMEText

 # HAAACK
 import imp
@@ -168,11 +169,19 @@ Subject: Broken dependencies: %s

 %s
 """ % (fromaddr, guilty, string.join(conspirators,','), pkgname, data)
+
+    email = MIMEText(msg)
+    email['Precedence'] = 'bulk'
+    email['Auto-Submitted'] = 'auto-generated'
+    email['Subject'] = 'Broken dependencies'
+    email['From'] = fromaddr
+    email['To'] = guilty
+    email['Cc'] = ','.join(conspirators)
     if sendmail:
         try:
             server = smtplib.SMTP('localhost')
             server.set_debuglevel(1)
-            server.sendmail(fromaddr, toaddrs, msg)
+            server.sendmail(fromaddr, toaddrs, email.as_string())
         except:
             print 'sending mail failed'


-- 
Janez Nemanic

Lep pozdrav

Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20140121/8143a1bb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_1
Type: application/octet-stream
Size: 1030 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20140121/8143a1bb/attachment.obj>


More information about the infrastructure mailing list