Article View: news.software.nntp
Article #88732Re: mbox archive for a news server
From: Grant Taylor
Date: Mon, 23 Aug 2021 19:45
Date: Mon, 23 Aug 2021 19:45
47 lines
3561 bytes
3561 bytes
On 8/23/21 9:15 AM, Jason Evans wrote: > However I'm running my own INN news server using the tradpool storage > method. I want to be able to create an automated monthly archive > of every article on my server and dump that to mbox files for each > newsgroup. Doing it through slrn would be way too much of a headache. I think I would approach this a slightly different way. I'd think about configuring a peer with a news feed similar to news-to-email such that every (selected) incoming article is sent to the archiving system. I'd then rely on the archiving system to manage the monthly archives. Even if the archiving system is something as simple as a script that appends the message to an mbox formatted file with a file name derived from the newsgroup name and month (and likely year). That way the month to month rotation would be implicit. This would also avoid the complexity of interfacing with NNTP or the news spool thus eliminating the need to match formats. The biggest unknown for me at the moment is how to deal with all the newsgroups and different files. I'm sure that you could create different mbox archive files for each newsgroup, but you probably want something scalable that doesn't require manual configuration. I would initially wonder about just extracting the contents of the Newsgroups: header and append the message to the file for each of the listed newsgroups. But I've seen some questionable content in the Newsgroups: header. So you'll likely want to do something to sanitize the user provided content and not blindly accept it. Maybe do a string filter / case fold / comparison against the contents of the active (newsgroups) file. You will probably want something to find older archives and do some sort of maintenance on them, compression or removal of really old archives. I feel like a cron job working on files > 2 intervals (months) old (to avoid the possibility of a race condition) would suffice. You might want to store the archives in a directory per group in it's own directory structure. YMMV I suspect if you back up and look at the LEGO pieces from a different direction you can probably come up with a workable solution. -- Don't maintain state that must be synchronized / compared a la polling. Do this stateless and use push from the news server itself. }:-) -- Grant. . . . unix || die
Technical Details
Message-ID:
<sg0u1p$ut9$1@tncsrv09.home.tnetconsulting.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailReferences:
<sfvheu$o2u$1@theuse.news.theuse.net> <slrnsi7d4m.1ug.mnalis-news@leia.home.lan> <sg0e2u$o2u$2@theuse.news.theuse.net>Show Full Headers
Complete Article Headers
Message-ID: <sg0u1p$ut9$1@tncsrv09.home.tnetconsulting.net> Subject: Re: mbox archive for a news server Date: Mon, 23 Aug 2021 13:45:33 -0600 From: Grant Taylor <gtaylor@tnetconsulting.net> References: <sfvheu$o2u$1@theuse.news.theuse.net> <slrnsi7d4m.1ug.mnalis-news@leia.home.lan> <sg0e2u$o2u$2@theuse.news.theuse.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail Newsgroups: news.software.nntp Organization: TNet Consulting Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 23 Aug 2021 19:48:09 -0000 (UTC) Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="alpha.home.tnetconsulting.net:198.18.18.251"; logging-data="31657"; mail-complaints-to="newsmaster@tnetconsulting.net" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 In-Reply-To: <sg0e2u$o2u$2@theuse.news.theuse.net> Content-Language: en-US Lines: 46