You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2016/06/01 12:41:07 UTC

[05/11] incubator-ponymail git commit: switch to a mailman section

switch to a mailman section


Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/6b42d4dd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/6b42d4dd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/6b42d4dd

Branch: refs/heads/master
Commit: 6b42d4dd5fa22fd85284205c98828c2348268df6
Parents: 2bf40b5
Author: Sam Ruby <ru...@intertwingly.net>
Authored: Wed May 4 08:38:57 2016 -0400
Committer: Sam Ruby <ru...@intertwingly.net>
Committed: Wed May 4 08:38:57 2016 -0400

----------------------------------------------------------------------
 tools/archiver.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/6b42d4dd/tools/archiver.py
----------------------------------------------------------------------
diff --git a/tools/archiver.py b/tools/archiver.py
index cdd52e1..31f790a 100644
--- a/tools/archiver.py
+++ b/tools/archiver.py
@@ -26,6 +26,11 @@ Enable the module by adding the following to your mailman.cfg file::
 class: mailman_ponymail_plugin.Archiver
 enable: yes
 
+and by adding the following to ponymail.cfg:
+
+[mailman]
+plugin: true
+
 OR, to use the STDIN version (non-MM3 mailing list managers),
 sub someone to the list(s) and add this to their .forward file:
 "|/usr/bin/env python3.4 /path/to/archiver.py"
@@ -56,7 +61,7 @@ config.read("%s/ponymail.cfg" % path)
 auth = None
 parseHTML = False
 
-if config.has_section('archiver.ponymail'):
+if config.has_section('mailman') and config.has_option('mailman', 'plugin'):
     from zope.interface import implementer
     from mailman.interfaces.archiver import IArchiver
     from mailman.interfaces.archiver import ArchivePolicy
@@ -103,7 +108,7 @@ def pm_charsets(msg):
 
 class Archiver(object):
     """ A mailman 3 archiver that forwards messages to pony mail. """
-    if config.has_section('archiver.ponymail'):
+    if config.has_section('mailman') and config.has_option('mailman', 'plugin'):
         implementer(IArchiver)
     name = "ponymail"