summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mailman/docs/NEWS.rst1
-rw-r--r--src/mailman/runners/digest.py19
-rw-r--r--src/mailman/runners/docs/digester.rst8
3 files changed, 19 insertions, 9 deletions
diff --git a/src/mailman/docs/NEWS.rst b/src/mailman/docs/NEWS.rst
index 9b98742c8..5020b89e3 100644
--- a/src/mailman/docs/NEWS.rst
+++ b/src/mailman/docs/NEWS.rst
@@ -121,6 +121,7 @@ Documentation
Bug fixes
---------
+ * Fixed the RFC 1153 digest footer to be compliant. (LP: #887610)
* Fixed a UnicodeError with non-ascii message bodies in the `approved` rule,
given by Mark Sapiro. (LP: #949924)
* Fixed a typo when returning the configuration file's header match checks.
diff --git a/src/mailman/runners/digest.py b/src/mailman/runners/digest.py
index afc11f732..99710dff5 100644
--- a/src/mailman/runners/digest.py
+++ b/src/mailman/runners/digest.py
@@ -201,7 +201,7 @@ class MIMEDigester(Digester):
except URLError:
log.exception(
'Digest footer decorator URI not found ({0}): {1}'.format(
- self._mlist.fqdn_listname,
+ self._mlist.fqdn_listname,
self._mlist.digest_footer_uri))
footer_text = ''
footer = MIMEText(footer_text.encode(self._charset),
@@ -281,19 +281,20 @@ class RFC1153Digester(Digester):
except URLError:
log.exception(
'Digest footer decorator URI not found ({0}): {1}'.format(
- self._mlist.fqdn_listname,
+ self._mlist.fqdn_listname,
self._mlist.digest_footer_uri))
- footer_text = ''
- # This is not strictly conformant RFC 1153. The trailer is only
- # supposed to contain two lines, i.e. the "End of ... Digest" line
- # and the row of asterisks. If this screws up MUAs, the solution
- # is to add the footer as the last message in the RFC 1153 digest.
- # I just hate the way that VM does that and I think it's confusing
- # to users, so don't do it unless there's a clamor.
+ footer_text = ''
+ # MAS: There is no real place for the digest_footer in an RFC 1153
+ # compliant digest, so add it as an additional message with
+ # Subject: Digest Footer
print >> self._text, self._separator30
print >> self._text
+ print >> self._text, 'Subject: ' + _('Digest Footer')
+ print >> self._text
print >> self._text, footer_text
print >> self._text
+ print >> self._text, self._separator30
+ print >> self._text
# Add the sign-off.
sign_off = _('End of ') + self._digest_id
print >> self._text, sign_off
diff --git a/src/mailman/runners/docs/digester.rst b/src/mailman/runners/docs/digester.rst
index 1ca51bdae..d0231a895 100644
--- a/src/mailman/runners/docs/digester.rst
+++ b/src/mailman/runners/docs/digester.rst
@@ -265,12 +265,16 @@ The RFC 1153 contains the digest in a single plain text message.
<BLANKLINE>
------------------------------
<BLANKLINE>
+ Subject: Digest Footer
+ <BLANKLINE>
_______________________________________________
Test mailing list
test@example.com
http://lists.example.com/listinfo/test@example.com
<BLANKLINE>
<BLANKLINE>
+ ------------------------------
+ <BLANKLINE>
End of Test Digest, Vol 1, Issue 1
**********************************
<BLANKLINE>
@@ -459,12 +463,16 @@ The content can be decoded to see the actual digest text.
"''",
"'------------------------------'",
"''",
+ "'Subject: Pied de page des remises group\\xc3\\xa9es'",
+ "''",
"'_______________________________________________'",
"'Test mailing list'",
"'test@example.com'",
"'http://lists.example.com/listinfo/test@example.com'",
"''",
"''",
+ "'------------------------------'",
+ "''",
"'Fin de Groupe Test, Vol 1, Parution 2'",
"'*************************************'"]