diff options
| author | Barry Warsaw | 2009-03-10 00:06:16 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2009-03-10 00:06:16 -0400 |
| commit | d820ece5e8f78def60438857eec48514a4cd905d (patch) | |
| tree | 4315252eb32681a38cf19c30bf95ea4cb36eaf75 /src | |
| parent | dc18eb714de0f71535c259cc04226015813e8a0e (diff) | |
| download | mailman-d820ece5e8f78def60438857eec48514a4cd905d.tar.gz mailman-d820ece5e8f78def60438857eec48514a4cd905d.tar.zst mailman-d820ece5e8f78def60438857eec48514a4cd905d.zip | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman/config/schema.cfg | 4 | ||||
| -rw-r--r-- | src/mailman/pipeline/scrubber.py | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/mailman/config/schema.cfg b/src/mailman/config/schema.cfg index 415ad8693..cad604b3d 100644 --- a/src/mailman/config/schema.cfg +++ b/src/mailman/config/schema.cfg @@ -475,14 +475,14 @@ class: mailman.styles.default.DefaultStyle [scrubber] -# A filter module that converts from multipart messages to "flat" messages +# A filter that converts from multipart messages to "flat" messages # (i.e. containing a single payload). This is required for Pipermail, and you # may want to set it to 0 for external archivers. You can also replace it # with your own module as long as it contains a process() function that takes # a MailList object and a Message object. It should raise # Errors.DiscardMessage if it wants to throw the message away. Otherwise it # should modify the Message object as necessary. -archive_scrubber: mailman.pipeline.scrubber +archive_scrubber: mailman.archiving.pipermail.Pipermail # This variable defines what happens to text/html subparts. They can be # stripped completely, escaped, or filtered through an external program. The diff --git a/src/mailman/pipeline/scrubber.py b/src/mailman/pipeline/scrubber.py index 1148c6518..115bc77d1 100644 --- a/src/mailman/pipeline/scrubber.py +++ b/src/mailman/pipeline/scrubber.py @@ -27,6 +27,7 @@ __all__ = [ import os import re +import sys import time import errno import hashlib @@ -45,7 +46,6 @@ from zope.interface import implements from mailman.Utils import oneline, websafe from mailman.config import config from mailman.core.errors import DiscardMessage -from mailman.core.plugins import get_plugin from mailman.i18n import _ from mailman.interfaces.handler import IHandler from mailman.utilities.filesystem import makedirs @@ -486,7 +486,10 @@ def save_attachment(mlist, msg, dir, filter_html=True): fp.write(decodedpayload) fp.close() # Now calculate the url to the list's archive. - baseurl = get_plugin('mailman.scrubber').list_url(mlist) + scrubber_path = config.scrubber.archive_scrubber + package_name, module_name = scrubber_path.rsplit('.', 1) + __import__(package_name) + baseurl = getattr(sys.modules[package_name], module_name).list_url(mlist) if not baseurl.endswith('/'): baseurl += '/' # Trailing space will definitely be a problem with format=flowed. |
