
		Cistron mail2news gateway

		 README 1.10 31-Oct-1998


0. INTRODUCTION

   This is a bidirectional mail2news gateway. Mail from lists is
   converted to news format and injected to the news system using
   inews. The gatewayed groups have to be setup as moderated, so
   that news posted in a gatewayed group is sent to the moderators
   address. That address is aliased to the mail2news script which
   sends the posting back to the list server.

   The mail2news program tries to convert between mail and news
   headers as good as it can - for example, In-Reply-To is changed to
   References when going from mail2news and the other way around
   when going from news2mail.

   Also the program tries to see if an incoming email from a list
   was sent to 2 lists it knows about and then crossposts the article
   to the corresponding newsgroups. Likewise, when you crosspost
   to 2 newsgroups and the posting is converted to mail it will be
   sent to both lists.

   It also has the possibility to change the From: address to the
   general address used to subscribe to the list so everyone on the
   local system can post to closed mailing lists (that accept only
   postings from subscribed addresses).


1. INSTALLATION

   On my system the mail2news program is installed in /usr/local/sbin.
   The config file is in /usr/local/etc/mail2news.conf. If you want to
   change the location of the config file, you need to edit the
   mail2news program (it's just a perl script). Oh, perhaps you need
   to change first line of the mail2news script to point to the
   location of your perl5 interpreter.


2. CREATE THE GROUPS

   Create all groups you want to gateway mailing lists into locally.
   AND CREATE THEM AS MODERATED. For example, to create the groups
   to gateway the cistron-radius mailing list and the debian-user
   mailing list you might decide to do (example for INN):

   ctlinnd newgroup lists.cistron.radius m
   ctlinnd newgroup lists.debian.user m


3. MAIL2NEWS

   It is recommended that you subscribe to all lists you want to
   gateway as list-xxxx@news.yourserver.com. Then for each of those
   addresses, create an entry in your mail aliases file as follows:

   list-LISTNAME:"|/usr/local/sbin/mail2news LISTNAME"

   Then in the mail2news config file, create a configuration for
   LISTNAME.


4. NEWS2MAIL

   All gatewayed groups need to be setup as moderated. Create a
   moderators address in /etc/aliases like:

   news2mail:"|/usr/local/sbin/mail2news --news2mail"

   Then setup your news "moderated" file to send all postings made
   in the gatewayed group to the moderators address:

   lists.*:news2mail@news.yourdomain.com


5. MAIL2NEWS CONFIG FILE

   The mail2news.conf file is straigth perl. So if you make a
   slight syntax error in it, the whole mail2news program will not
   run!

   Global configuration values:

   $msgid_prefix	Prefix to be added to all message IDs when
			going from mail2news. It will be stripped again
			when going from news2mail. This should be
			unique for your site!

   $gwmaster		This address is put in the Approved: header
			of all news posting and is also used to mail
			serious errors to.

   $logfile		Localtion of error logfile.

   $distribution	Value of Distribution: header

   $x-loop		Value of X-Loop header, used to prevent loops.
			This should be something unique for your site!

   $inews		Location of inews program

   $sendmail		Location of sendmail program


   Configuration per list:

   Read the sample mail2news config file, it's all there.


6. MESSAGE ID MUNGING

   By default, the mail2news program converts message IDs to something
   else (a prefix is added) whne mail is gatewayed to news. This is done
   because there are a lot of mail2news gateways on the net that leak
   out gatewayed mail, so the message ID of a new posting might already
   be present on your news server in some hierarchy you never heard of,
   and the posting would be rejected.

   When news is gatewayed back to mail, the mail2news program tries
   to strip the prefix and recreate the original message-IDs as good
   as it can.


7. PREVENT LEAKING

   Make ABSOLUTELY SURE that you do NOT send the newsgroups of
   the gatewayed lists to neighbour sites. This only pollutes the
   global USENET and the other site would not be able to post in
   those groups anyway - unless they setup the moderators addresses
   to point back at the right address on your server. The worst effect
   could be if those leaking groups get created on another server as
   not moderated. Users would post in those new groups, but wouldn't
   see much replies because their postings never make it back to
   the mailing list.

   Also, a lot of people on mailing lists use mailing lists instead of
   newsgroups because they don't want to expose their email address
   to usenet to prevent being spammed - they might NOT like it if your
   site relays their postings to usenet anyway.


8. SUPPORT

   Sorry, there isn't any. This is a local hack I mode for Cistron,
   I wrote it in one or two days and I didn't even plan to package
   it and put it up for FTP in the first place. If you know enough perl
   you should be able to figure out how this perl script works yourself,
   and modify it as needed.

