Commit b3ce2a4f authored by Barry Warsaw's avatar Barry Warsaw

Archived-At header calculation must observe list archivers.

parent fc347a34
......@@ -32,6 +32,7 @@ from mailman.config import config
from mailman.core.i18n import _
from mailman.handlers.cook_headers import uheader
from mailman.interfaces.archiver import ArchivePolicy
from mailman.interfaces.mailinglist import IListArchiverSet
from mailman.interfaces.handler import IHandler
......@@ -84,10 +85,13 @@ def process(mlist, msg, msgdata):
headers['List-Post'] = list_post
# Add RFC 2369 and 5064 archiving headers, if archiving is enabled.
if mlist.archive_policy is not ArchivePolicy.never:
for archiver in config.archivers:
archiver_set = IListArchiverSet(mlist)
for archiver in archiver_set.archivers:
if not archiver.is_enabled:
headers['List-Archive'] = '<{0}>'.format(
permalink = archiver.permalink(mlist, msg)
permalink = archiver.system_archiver.permalink(mlist, msg)
if permalink is not None:
headers['Archived-At'] = permalink
# XXX RFC 2369 also defines a List-Owner header which we are not currently
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment