Cyrus now also includes a
NNTP server. The
NNTP works alot like the IMAP server, it uses the same authentication and authorization. It also stores messages like IMAP. This means the messages are stored in one file pr. post.
To create newsgroups you can either use the tools/mknewsgroups script which is part of the source, but not the debian binary packages. You can also use cyradm and create a "mailbox" using the --partition news to make it a news group. If you, like me, only wanted the news service then you will also have to install imap to be able to use cyradm, and possible mknewsgroups.
Expirery of messages does not appear to exist, but since messages are individual files a find script that deletes the old messages should be easy.
--
TWikiGuest - 21 Oct 2005
Basic Setup
To set up the
NNTP component, you will need to do the following:
First, make sure that Cyrus is built with
NNTP support (this is a configuration parameter). In many pre-packaged versions of Cyrus, the
NNTP server is in its own package (Example: Debian has a cyrus-nntpd-2.2 package that must be installed in addition to the rest of Cyrus).
Second, you will need to edit /etc/imapd.conf and /etc/cyrus.conf.
Cyrus.Conf
You will need to add a new line in the
SERVICES section with something like this:
nntp: cmd="nntpd" listen="nntp" prefork="0"
This defines a new service that will run the nntpd command (
man nntpd for more info) on the nntp port (defined in
/etc/services). Since the prefork is listed as 0, Cyrus will not start a new process for this.
Imapd.Conf
There are many directives for news that can be placed in /etc/imapd.conf. You should
man imapd.conf to learn more.
At minimum, you will want something like this:
# News:
partition-news: /var/spool/cyrus/news
newsprefix: ournews
That tells Cyrus:
- Where the news partition should be stored (should be similar to the value in partition-default)
- What part of your Cyrus tree should be treated as the location for news groups.
Regarding this last item, the newsprefix will be a path in your IMAP directory hierarchy (that is, the hierarchy you are working with in cyradm). User accounts, for instance, are often in the 'users/' hierarchy. Here, we are telling it to put the news in the 'ournews/' hierarchy.
Restart your server once you have modified cyrus.conf and impad.conf.
Defining Newsgroups
You can define news groups in two ways:
- Use
mknewsgroups, which is a very simple wrapper for creating groups
- Use
cyradm, and create a new mailbox for news.
Some distributions do not include
mknewsgroups.
Using Cyradm: Create a new group just like you create a new mailbox:
$ cm ournews/mynewsgroup
Next, you will need to set some permissions. (See
man cyradm for more info on the
cm and
sam commands.):
$ sam ournews/mynewsgroup anyone lrsp
The above gives Lookup, Read, Seen, and Post permissions (basically read/write -- see the man page for more) to anyone logged into the server. Obviously, you may want more restrictive permissions.
(Note: This example assumes unixhierarchysep is being used in imapd.conf)
Finishing
At this point, you should be able to point your mailreader to the server.
Other Resources
The Cyrus documentation and man pages that comes bundled with Cyrus contains a handful of useful docs.
Installation is sorta covered here:
Cyrus and Netnews.
This discussion thread might also be helpful:
Cyrus and Usenet.
--
TechnoSophos - 08 Jan 2008