[Mailman-Users] importing an archive in such a way as to populatethe associated newsgroup.
Mark Sapiro
msapiro at value.net
Sun Sep 24 17:19:58 CEST 2006
Justin H Haynes wrote:
>
>Suppose I were to temporarily turn off delivery to all the subscribers,
>and then somehow run the entire archive through Mailman in such a way
>that it were to deliver all the messages to the list. Would such an
>approach possibly be successful in getting all the messages into the
>newsgroup?
I don't think it is necessary to do that. As an experiment, you could
try extracting a single message from your archive.mbx (into say
msg.txt) and then do
bin/inject --listname=<listname> --queue=news msg.txt
>Can mailman be invoked at the command line something like this?:
>
>cat archive.mbx | <some mailman executable>
The problem here is that AFAIK there's nothing in Mailman you can use
directly to 'parse' the mbx file. There's a Mailbox class which is
essentially the standard Python mailbox.PortableUnixMailbox class
which has a next() method to get the messages one by one, but no
direct command (other than bin/arch) that processes mailbox files.
Assuming the experiment above works, you could probably create a simple
script in Python (or perl or even a shell script) that would extract
the messages one by one from the mailbox and pipe them to
bin/inject --listname=<listname> --queue=news
(bin/inject reads stdin if no filename arg is given).
--
Mark Sapiro <msapiro at value.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users
mailing list