aboutsummaryrefslogtreecommitdiffstats
path: root/patches/mailman.patch
blob: 1688e692721ff162b645d9a84de904188f467df5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
diff -u mailman/Mailman/HTMLFormatter.py vhost/Mailman/HTMLFormatter.py
--- mailman/Mailman/HTMLFormatter.py
+++ vhost/Mailman/HTMLFormatter.py
@@ -382,7 +382,8 @@
         d = {
             '<mm-mailman-footer>' : self.GetMailmanFooter(),
             '<mm-list-name>' : self.real_name,
-            '<mm-email-user>' : self._internal_name,
+            '<mm-email-user>' : self.local_part,
+            '<mm-complete-name>' : self.internal_name(),
             '<mm-list-description>' : Utils.websafe(self.description),
             '<mm-list-info>' : 
                 '<!---->' + BR.join(self.info.split(NL)) + '<!---->',
diff -u mailman/Mailman/MailList.py vhost/Mailman/MailList.py
--- mailman/Mailman/MailList.py
+++ vhost/Mailman/MailList.py
@@ -253,7 +253,7 @@
         # Using "local_part" here works for both site wide lists on
         # the default url host and for vhost lists on the vhost url host.
         return Utils.ScriptURL(scriptname, self.web_page_url, absolute) + \
-               '/' + self.local_part
+               '/' + self._internal_name

     def GetOptionsURL(self, user, obscure=0, absolute=0):
         url = self.GetScriptURL('options', absolute)
diff -u mailman/Mailman/Archiver/Archiver.py vhost/Mailman/Archiver/Archiver.py
--- mailman/Mailman/Archiver/Archiver.py
+++ vhost/Mailman/Archiver/Archiver.py
@@ -162,7 +162,7 @@
             if hostname == mm_cfg.DEFAULT_URL_HOST:
-                fullname = self.local_part
+                fullname = self._internal_name
             else:
-                fullname = os.path.join(hostname, self.local_part)
+                fullname = os.path.join(hostname, self._internal_name)
             url = mm_cfg.PUBLIC_ARCHIVE_URL % {
                 'listname': fullname,
                 'hostname': hostname
diff -u mailman/Mailman/Handlers/Decorate.py vhost/Mailman/Handlers/Decorate.py
--- mailman/Mailman/Handlers/Decorate.py
+++ vhost/Mailman/Handlers/Decorate.py
@@ -221,7 +221,7 @@
     d = SafeDict({'real_name'     : mlist.real_name,
                   'list_name'     : mlist.local_part,
                   # For backwards compatibility
-                  '_internal_name': mlist.local_part,
+                  '_internal_name': mlist._internal_name,
                   'host_name'     : mlist.host_name,
                   'web_page_url'  : mlist.web_page_url,
                   'description'   : mlist.description,
diff -u lib/bin/postfix-to-mailman.py vhost/bin/postfix-to-mailman.py
--- mailman/bin/postfix-to-mailman.py
+++ vhost/bin/postfix-to-mailman.py
@@ -111,6 +111,11 @@
                              'mailman_destination_recipient_limit=1 '
                              'in main.cf?')
         sys.exit(EX_USAGE)
+    try:
+      l,d = local.split('#',2)
+      local = '%s@%s' % (l,d)
+    except ValueError:
+      l,d = local, None

     # Redirect required addresses to 
     if local in ('postmaster', 'abuse', 'mailer-daemon'):
@@ -140,8 +145,9 @@
                 '-subscribe',
                 '-unsubscribe',
                 ):
-        if local.endswith(ext):
-            mlist = local[:-len(ext)]
+        if l.endswith(ext):
+            mlist = l[:-len(ext)]
+            if d: mlist = '%s@%s' % (mlist,d)
             func  = ext[1:]
             break