~ubuntu-branches/ubuntu/hardy/mailman/hardy-updates

« back to all changes in this revision

Viewing changes to debian/patches/73_list-id_strict_rfc.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-10-30 13:00:30 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20061030130030-hvz4ipqc82e3wbi6
Tags: 1:2.1.9-2ubuntu1
* Synchronize to Debian; remaining Ubuntu change:
  - debian/control: exim4 -> postfix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
## 73_list-id_strict_rfc.dpatch by  <lionel@mamane.lu>
3
 
##
4
 
## All lines beginning with `## DP:' are a description of the patch.
5
 
## DP: Make sure the List-Id header strictly conforms to RFC 2919:
6
 
## DP: always put the list-id between brackets.
7
 
 
8
 
@DPATCH@
9
 
diff -urNad mailman-2.1.5~/Mailman/Handlers/CookHeaders.py mailman-2.1.5/Mailman/Handlers/CookHeaders.py
10
 
--- mailman-2.1.5~/Mailman/Handlers/CookHeaders.py      2003-12-18 15:58:22.000000000 +0100
11
 
+++ mailman-2.1.5/Mailman/Handlers/CookHeaders.py       2005-11-13 18:14:47.546324750 +0100
12
 
@@ -172,7 +172,10 @@
13
 
         desc = str(h)
14
 
     else:
15
 
         desc = ''
16
 
-    listid_h = formataddr((desc, listid))
17
 
+    if (desc == ''):
18
 
+        listid_h = '<%s>' % listid
19
 
+    else:
20
 
+        listid_h = formataddr((desc, listid))
21
 
     # BAW: I think the message object should handle any necessary wrapping.
22
 
     del msg['list-id']
23
 
     msg['List-Id'] = listid_h