🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
8 messages
8 total messages Started by Jakub Danecki Tue, 05 Dec 2006 01:10
Upload posts from mbox to inn2 - How?
#74553
Author: Jakub Danecki
Date: Tue, 05 Dec 2006 01:10
16 lines
1876 bytes
	Hello,

	I'm running a small server on INN, that main role is to keep archive
(around 200k posts). Some time ago I made an update and because of
misconfiguration of expire.ctl all the archive was deleted. I decided to
recreate the archive from backup, but still some posts are missing. I
found out, that some 2000 posts can be recovered from one of the nntp
clients archive (Xananews). I got the export file, that looks like a
correct mbox format - around 20MB, 19000 posts in one txt file.
	And now the problem: How can I feed my INN with this mbox? All I found
is mailpost, but it accepts only single posts.
	I thought about writing a perl script that will "cut out" each message,
but... I just cannot beleive that nobody did it before.

	rgrds,
	Jakub
Re: Upload posts from mbox to inn2 - How?
#74554
Author: Paul Tomblin
Date: Tue, 05 Dec 2006 02:10
11 lines
1542 bytes
In a previous article, "Jakub Danecki" <jak_wytnijto@danecki.net> said:
>	And now the problem: How can I feed my INN with this mbox? All I found
>is mailpost, but it accepts only single posts.

Look at the program "formail" which comes with procmail.  It has numerous
options for doing stuff to a mbox file.  Look especially at the -s option.


-- 
Paul Tomblin <ptomblin@xcski.com> http://blog.xcski.com/
"The first rule of Usenet Cabal is: you do not talk about Usenet Cabal."
Re: Upload posts from mbox to inn2 - How?
#74555
Author: Aioe
Date: Tue, 05 Dec 2006 08:24
11 lines
1431 bytes
On Tue, 05 Dec 2006 01:10:39 +0000, Jakub Danecki wrote:

> And now the problem: How can I feed my INN with this mbox? All I found
> is mailpost, but it accepts only single posts.

there're various options
you can convert your mbox in a rnews file (which is like the mbox format)
than use rnews to feed it to your server
you can also write a simple script which extracts each article from your
mbox than send it to innd (using rnews or directly through IHAVE)
Re: Upload posts from mbox to inn2 - How?
#74565
Author: Patrick Vande Walle
Date: Thu, 07 Dec 2006 10:51
23 lines
1982 bytes
Aioe wrote, On 05/12/2006 09:24:
> On Tue, 05 Dec 2006 01:10:39 +0000, Jakub Danecki wrote:
> 
>> And now the problem: How can I feed my INN with this mbox? All I found
>> is mailpost, but it accepts only single posts.

> you can also write a simple script which extracts each article from your
> mbox than send it to innd (using rnews or directly through IHAVE)

I have written a script that bridges mailing lists to local Usenet
groups on my news server.

http://patrick.vande-walle.eu/software/mail2news/
http://patrick.vande-walle.eu/upload/mail2news.pl

If the incoming file is in mbx format, all you need to do is issue a
command like :

formail -s mail2news.pl my.local.group < myfile.mbx

Works like a charm here.

Patrick Vande Walle
Re: Upload posts from mbox to inn2 - How?
#74575
Author: Jakub Danecki
Date: Sat, 09 Dec 2006 22:31
19 lines
2017 bytes
Patrick Vande Walle wrote:
> If the incoming file is in mbx format, all you need to do is issue a
> command like :
> 
> formail -s mail2news.pl my.local.group < myfile.mbx

	I found out, that the XanaNews exports to format that is in fact RFC
822: it's like tradspool messages put one after another with "\n.\n"
(newline, dot, newline) between messages. No tool i found seems to accept
it (formail treats it as one big message, because there is no mbox "From
" line for each post - here the first line of each message is
"message-id".
	I thought of writing a perl script, that would convert this into rnews
format, but as I recovered most of the archive from other feeds, I
postpone writing such script for next weekend.
	Or maybe you have know any tool can accept such format without
additional conversion?

	Jakub
Re: Upload posts from mbox to inn2 - How?
#74576
Author: Urs Janßen
Date: Mon, 11 Dec 2006 21:52
20 lines
1988 bytes
In <el2guf$qqb$1@inews.gazeta.pl>, Jakub Danecki wrote:
> recreate the archive from backup, but still some posts are missing. I
> found out, that some 2000 posts can be recovered from one of the nntp
> clients archive (Xananews). I got the export file, that looks like a
> correct mbox format - around 20MB, 19000 posts in one txt file.
>         And now the problem: How can I feed my INN with this mbox? All I found
> is mailpost, but it accepts only single posts.

tin could be abused to do that, mv the mbox to
${TIN_HOMEDIR-"$HOME"}/.tin/postponed.articles
and start tin with the -o option.

urs

p.s.: I owuldn't do that for 19.000 articles as tin has a built in
delay (IIRC 2 secs.) after each posted article ,-)
-- 
Jef Poskanzer:
"When people aren't stupid Usenet is even more useful. Too bad this happens
 so rarely."
Re: Upload posts from mbox to inn2 - How?
#74577
Author: Frank Slootweg
Date: Tue, 12 Dec 2006 14:49
20 lines
2316 bytes
Urs Janßen <urs@akk.org> wrote:
> In <el2guf$qqb$1@inews.gazeta.pl>, Jakub Danecki wrote:
> > recreate the archive from backup, but still some posts are missing.
> > I found out, that some 2000 posts can be recovered from one of the
> > nntp clients archive (Xananews). I got the export file, that looks
> > like a correct mbox format - around 20MB, 19000 posts in one txt
> > file.
> >         And now the problem: How can I feed my INN with this mbox?
> > All I found is mailpost, but it accepts only single posts.
> 
> tin could be abused to do that, mv the mbox to
> ${TIN_HOMEDIR-"$HOME"}/.tin/postponed.articles
> and start tin with the -o option.

  I don't think that will work. While it apparently is an archive from a
newsclient (newsreader) - Xananews -, I don't think it's an archive of
*one person*'s postings. I think they are postings by multiple authors.
If so, I think using tin this way will give problems with trying to
preserve headers like Path and NNTP-Posting-Host, etc. and probably also
headers like From, Message-ID, Date, Sender, etc..
Re: Upload posts from mbox to inn2 - How?
#74581
Author: Urs Janßen
Date: Tue, 12 Dec 2006 21:30
22 lines
2188 bytes
In <457ec196$0$29576$dbd43001@news.wanadoo.nl>, Frank Slootweg wrote:
>   I don't think that will work. While it apparently is an archive from a
> newsclient (newsreader) - Xananews -, I don't think it's an archive of
> *one person*'s postings. I think they are postings by multiple authors.

(without looking into the code) -DFORGERY could be used to allow
different Froms.

> If so, I think using tin this way will give problems with trying to
> preserve headers like Path and NNTP-Posting-Host, etc. and probably also
> headers like From, Message-ID, Date, Sender, etc..

(again without looking into the code) preserving From, Message-ID and Path
should work, Date may work (but it's very likely that the server
rejects the posting cause it's too old). preserving NNTP-Posting-Host and co.
via POST is very unlikely to work.

urs
-- 
Jef Poskanzer:
"When people aren't stupid Usenet is even more useful. Too bad this happens
 so rarely."
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads