
	MAILINGLISTS help text for  MAILSERVER @ NIC.FUNET.FI


	< This is a guide for understanding and creating
	  mailinglists under support of MAILSERVER.
	  This document is for local maintance use, and to
	  let people to know what to expect with these lists. >


	Mailinglists can be created and supported fairly easily
in our system.  They are not like those created with LISTSERVs on
BITNET, but rather like generally seen with  sendmail ':include:'.

	Mailserver handles (without much fuzz - this was `simple'
tool for internal user support) list joining and removal, BUT DOES
NOT TAKE PART ON MESSAGE TRANSPORTATION AT ALL.

	Mail articles themselves are processes by local mailer.
If somebody insists (and spends time writing some code), LSV style
message processing can be implemented with messages being piped to
that (yet unwritten) program.


	Depeding on your mailer, you can use either of following
approaches:


sendmail:
	/etc/aliases	listname: "sendmail -flistname-list listname-owner"
			listname-owner: user@node.domain
			listname-list: ":include:/path/to/listfile"

Zmailer 2.0:
	$MAILSHARE/lists/listname (symlink) -> /path/to/listfile

With Zmailer (which we use at NIC.FUNET.FI) owner of actual listfile
gets mails directed to  `listname-owner' and `listname-request', thus
in default case there is no need to create those aliases/`lists entries'.
(Protection of the file containing the recipients: `listfile'  MUST be
 644 or STRICTER!  Especially multiple WRITE bits is bad under Zmailer.
 It is considered as possible security leak, and therefrom follows quite
 many bad occurrances.  Also protection of the directory where these lists
 are ($MAILSHARE/lists/) must be 755 or stricter! )

If list-owner is wanted to be somebody else than a local user, then
/..../mailer/lists/listname-{owner,request}  files can be very same file
with contents "user@node.domain (Real Name)"

This mailserver is created with "lists" alias:
	mailserver	"|/usr/local/lib/trickle/lsvinput -"
Which means you can run ANY arbitary program with ANY arbitary priviledge
to process incoming mail.


	So, important thing is to estabilish a linkage from mailer subsystem
to a alias list with contents like:
	-----------------------
	mea			(Matti Aarnio) (1993003:000000000)
	ojala			(Petri Ojala) (1993007:000000000)
	-----------------------
This format is what MAILSERVER expects to see on the listfile.
This format is actually according to requirements of sendmail mailinglist
mechanisms which are widely supported among various mailers.
First parenthesis contain user real-name as a comment (all enclosing
parenthesis are comments per RFC-822), second contains MAILSERVER data
which may get more meanings over the time.  At the time of this writing
it is  (yyyyddd:00000000), that is, time when user did first subscription.
This is to facilitate possible automatic refreshing requests.


	Supporting MAILINGLIST:
Within mailserver there is ONE index file which needs an additional
entry to estabilish the list support, and then one needs to add
TWO files into same directory (or two symlinks to elsewere) for that
list:

	Directory: /usr/local/lib/trickle/maillists/
	Indexfile:	LISTINDEX
	Other files:	listname    (Assume: name of the list is `listname')
			listname.header

List names are in lowercase, but the `keyword' written into LISTINDEX
may be in uppercase.
`listname.header' is small entry file which contains some descriptive info
and provisions for extended keywords (in case somebody implements them):

	------ LISTNAME.header --------
	#
	#  Comments about what list this is, who owns it, etc info
	#  for human readers only.
	#+
	#+ Possible extended control keywords.  `#+ ' is blind comment,
	#+ but when 3rd character is NOT space, it MAY be considered as
	#+ control keyword... (if somebody extends this server)
	#
	-------------------------------

Initially  `listname'  file must exist, but can be zero length!
(However: Mailers might not like it if they try to find recipients!)

At least under Zmailer, mailerserver can be run under any uid (but only
one), and thus can be run under  root  if desired.  (Under sendmail you
might not have a `choise', but to use root...)
(Other functions of server may call for root powers..)

This control of mailserver uid affects on how those `listname' files are
protected. If protection is too tight, and server does not run as a root,
you loose...

Under Zmailer the owner of `listname' file becomes the recipient of
`listname-request' and `listname-owner' addresses. (If ordinary alias
mechanism isn't used to override them.)

Also under Zmailer if list files has GROUP WRITE or WORLD WRITE bits on,
ZM considers result to be of potential security violation, is unable
to figure out OWNER of listfile (returns `nobody'), and in general refuces
to write to files (if archives are desired) and/or run programs on pipes.


To summarize files/dirs necessary to touch in NIC.FUNET.FI for adding new list:

	/usr/local/lib/mail/lists/ -dir	Zmailer's place to search for
					mailing lists.

		ln -s /usr/local/lib/mailserver/maillists/listname listname

	/usr/local/lib/mailserver/maillists/ -dir
			LISTINDEX	Add list entry (one line)
			listname.header	Create these files/symlinks
			listname

Nothing else !


			/Matti Aarnio <mea@nic.funet.fi>  7-Apr-1991
							 20-May-1993
