[Mailman-Users] running External Archiver on background/foreground
mark at msapiro.net
Tue Jan 15 14:29:28 CET 2008
Mohamed CHAARI wrote:
> As I really need to keep possibility to have both MM archiving and
> external one, I've made a small patch on Mailman, so that it accepts
> both internal archiving (pipermail) and external archiving (if enabled).
> In this way, there is no longer need to call 'arch' in
> 'external_arch.pl' script, and thus, this script doesn't need to be run
> in background.
> But I would like to have your opinion (Mark and others), about this patch:
> - is there any side effect ?
> - can there be problems (or conflicts) when receiving and archiving many
> mails ?
> here's the patch (on 'Archiver.py'):
> --- /home/mailman/Mailman/Archiver/Archiver.orig.py 2008-01-11
> 19:40:44.000000000 +0100
> +++ /home/mailman/Mailman/Archiver/Archiver.py 2008-01-11
> 19:44:54.000000000 +0100
> @@ -201,20 +201,22 @@
> # Archive to mbox only.
> txt = str(msg)
> - # should we use the internal or external archiver?
> + # keep using the internal archiver
> + f = StringIO(txt)
> + import HyperArch
> + h = HyperArch.HyperArchive(self)
> + h.processUnixMailbox(f)
> + h.close()
> + f.close()
> + # now, use the external archiver (if enabled)
> private_p = self.archive_private
> if mm_cfg.PUBLIC_EXTERNAL_ARCHIVER and not private_p:
> self.ExternalArchive(mm_cfg.PUBLIC_EXTERNAL_ARCHIVER, txt)
> elif mm_cfg.PRIVATE_EXTERNAL_ARCHIVER and private_p:
> self.ExternalArchive(mm_cfg.PRIVATE_EXTERNAL_ARCHIVER, txt)
> - else:
> - # use the internal archiver
> - f = StringIO(txt)
> - import HyperArch
> - h = HyperArch.HyperArchive(self)
> - h.processUnixMailbox(f)
> - h.close()
> - f.close()
> # called from MailList.MailList.Save()
The above patch looks fine to me for what you want to do.
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users