]> git.pld-linux.org Git - packages/mailman.git/blame - mailman-x-imap-folder.patch
systemd and systemd-cronjobs support added
[packages/mailman.git] / mailman-x-imap-folder.patch
CommitLineData
8c662742
AM
1diff -ur mailman-2.1.20.org/Mailman/Gui/General.py mailman-2.1.20/Mailman/Gui/General.py
2--- mailman-2.1.20.org/Mailman/Gui/General.py 2015-03-31 19:21:49.000000000 +0200
00fad726 3+++ mailman-2.1.20/Mailman/Gui/General.py 2016-02-21 10:25:57.685943034 +0100
8c662742
AM
4@@ -505,6 +505,13 @@
5 here."""))
6 )
faa05263
ER
7
8+ # add X-IMAP-Folder header
9+ rtn.append(
10+ ('x_imap_folder', mm_cfg.String, WIDTH, 0,
11+ _('''If filled add to each outgroing email X-IMAP-Folder header
12+ with this value.'''))
13+ )
14+
15 # Discard held messages after this number of days
16 rtn.append(
17 ('max_days_to_hold', mm_cfg.Number, 7, 0,
8c662742
AM
18diff -ur mailman-2.1.20.org/Mailman/Handlers/CookHeaders.py mailman-2.1.20/Mailman/Handlers/CookHeaders.py
19--- mailman-2.1.20.org/Mailman/Handlers/CookHeaders.py 2015-03-31 19:21:49.000000000 +0200
00fad726 20+++ mailman-2.1.20/Mailman/Handlers/CookHeaders.py 2016-02-21 10:25:57.685943034 +0100
16950ab2 21@@ -107,6 +107,11 @@
faa05263 22 # X-BeenThere's intact.
16950ab2
ER
23 change_header('X-BeenThere', mlist.GetListEmail(),
24 mlist, msg, msgdata, delete=False)
faa05263
ER
25+
26+ # X-IMAP-Folder header, used commonly for server side filtering to folders.
27+ if mlist.x_imap_folder:
28+ msg['X-IMAP-Folder'] = mlist.x_imap_folder
29+
30 # Add Precedence: and other useful headers. None of these are standard
31 # and finding information on some of them are fairly difficult. Some are
32 # just common practice, and we'll add more here as they become necessary.
8c662742
AM
33diff -ur mailman-2.1.20.org/Mailman/MailList.py mailman-2.1.20/Mailman/MailList.py
34--- mailman-2.1.20.org/Mailman/MailList.py 2015-03-31 19:21:49.000000000 +0200
00fad726 35+++ mailman-2.1.20/Mailman/MailList.py 2016-02-21 10:25:57.685943034 +0100
8c662742 36@@ -367,6 +367,7 @@
faa05263
ER
37 self.available_languages = []
38 self.include_rfc2369_headers = 1
39 self.include_list_post_header = 1
40+ self.x_imap_folder = ''
5b934219 41 self.include_sender_header = 1
faa05263
ER
42 self.filter_mime_types = mm_cfg.DEFAULT_FILTER_MIME_TYPES
43 self.pass_mime_types = mm_cfg.DEFAULT_PASS_MIME_TYPES
8c662742
AM
44diff -ur mailman-2.1.20.org/Mailman/versions.py mailman-2.1.20/Mailman/versions.py
45--- mailman-2.1.20.org/Mailman/versions.py 2015-03-31 19:21:49.000000000 +0200
00fad726
AM
46+++ mailman-2.1.20/Mailman/versions.py 2016-02-21 10:26:55.443940355 +0100
47@@ -168,6 +168,10 @@
48 else:
49 return None
8c662742 50
00fad726
AM
51+ def add_only_if_missing(attr, initval, l=l):
52+ if not hasattr(l, attr):
53+ setattr(l, attr, initval)
54+
55 # Migrate to 2.1b3, baw 17-Aug-2001
56 if hasattr(l, 'dont_respond_to_post_requests'):
57 oldval = getattr(l, 'dont_respond_to_post_requests')
58@@ -414,6 +418,8 @@
8c662742
AM
59 PreferStored('author_is_list', 'from_is_list',
60 mm_cfg.DEFAULT_FROM_IS_LIST)
faa05263
ER
61
62+ add_only_if_missing('x_imap_folder', '')
63+
64
65 \f
8c662742 66 def NewVars(l):
This page took 0.07814 seconds and 4 git commands to generate.