[Mailman-Users] running External Archiver on background/foreground
Mohamed CHAARI
mohamed.chaari at st.com
Thu Jan 17 11:20:27 CET 2008
Mark Sapiro wrote:
> 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.
>> return
>> 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.
>
what about the Archiver.pyc file ? do you think it is necessary to
re-compile and re-install the whole soft ? or simply apply the patch on
Archiver.py to make it working ?
thank you
--
---
--Mohamed CHAARI (mailto:mohamed.chaari at st.com)
More information about the Mailman-Users
mailing list