On Apr 08, 2012, at 06:58 AM, Aamir Khan wrote: >I believe that after integrating HyperKitty with mailman, there will be >archiver['hyperkitty'] which can be used to archive the messages. Am i >correct?
Yes, but that's mostly an implementation detail you don't need to worry about. config.archivers is just for internal bookkeeping and use in the ArchiveRunner. >http://packages.python.org/mailman/src/mailman/archiving/docs/common.html#sending-the-message-to-the-archiver >I know that mailman3 offers pluggable architecture, but still after going >through some documentation it is not apparent to me how exactly HyperKitty >will be integrated with mailman3. Can somebody briefly explain and point out >to relevant files in source code ? It's relatively straightforward, once you understand how the configuration system works. The file src/mailman/config/schema.cfg is a kind of template for the mailman.cfg ini file. Search down for the [archive.master] section; this is a template for other [archiver.foo] sections. In here, you'll see all the default variables and their values for configuring an archiver. Look a little farther down and you'll see for example the [archiver.prototype] section which provides just the relevant overrides for the `prototype` archiver. So, to enable hyperkitty, you would have to add something like the following section in your mailman.cfg file: -----snip snip----- [archiver.hyperkitty] class: python.path.to.hyperkitty.HyperKitty -----snip snip----- Of course, you'd probably want to `enable` it too. One tricky thing here is that the `class` value names a Python dotted-module path, so the class must be importable. Ensuring that the hyperkitty module (and this is just a suggestion, YMMV) is importable by the core engine may not be fully baked. For now, just set $PYTHONPATH. The final bit of the puzzle is that the python.path.to.hyperkitty.HyperKitty class must implement the IArchiver interface, although if it's impossible to implement something like permalink(), it should just raise a NotImplementedError. Take a look at the Prototype class for an example. Note that all the magic of getting a message into the archiver happens through the archive_message() method of IArchiver. This can do anything you need to do to inject the message into the archiver. It can make direct Python calls, like the prototype archiver does, or it shell out to a command like the MHonArc archiver does, or it can send an email like the MailArchive one does. Hope that helps. -Barry _______________________________________________ Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9