
	REMOTE_ADMINISTRATION: control fml by mails

------------------------------------------------------------
1	how to control fml by mails (remotely)
1.1	What is remote administration ?
1.2	how to enable remote administration
1.3	how to configure config.ph by mail remotely 

3	Q and A
3.1	remove all members by admin commands

4	Remote Maintenance/Administration
4.1	Introduction
4.2	For More security
4.3	Enable Remote Administration Mode
4.4	Admin Command
4.5	Approve Password Command Syntax
4.6	Remote Administration Configurations
4.7	Add or remove remote maintainers (except for PGP)
4.8	Remove a remote maintainer
4.9	Administraion commands list 
4.10	Add or remove remote commands
4.11	Initialize a password
4.12	Change a password remotely
4.13	Send Welcome Message Automatically When 'Admin Add' Runs.
4.14	Restriction on addresses to register
4.15	Remote Administration Mode And Address Multiple Matchings
4.16	Which files you can replace in remote?
4.17	On Logfile
4.18	version up  from very old FML

5	misc
5.1	members-admin is not needed in pgp authentication ?
------------------------------------------------------------


1	how to control fml by mails (remotely)

1.1	What is remote administration ?

1.2	how to enable remote administration

1.3	how to configure config.ph by mail remotely 

cannot.

    % makefml config elena

    % makefml addadmin elena fukachan@sapporo.iij.ad.jp 

    % makefml passwd elena fukachan@sapporo.iij.ad.jp 

------------------------------------------------------
------------------------------------------------------

    Submit Reset

	/var/spool/ml/elena/members-admin

    Submit Reset

------------------------------------------------------
------------------------------------------------------

	To: elena-ctl@test.fml.org 
	subject: overwrite guide

$Id: howto.wix,v 1.2 2000/12/06 09:48:12 fukachan Exp $

3	Q and A

3.1	remove all members by admin commands

use "admin remove" command. For example

	admin remove members
	admin remove actives
	admin add aaa@bbb.co.jp

	admin pass PASSWORD
	admin remove members
	admin remove actives
	admin add aaa@bbb.co.jp

1.

2.

4	Remote Maintenance/Administration

See the file "help-admin" for more details on commands used in remote.

4.1	Introduction

FML provides remote maintenance/administration, which implies remote
control of member lists, files. In default FML accepts the control
command mail from an address listed in $ADMIN_MEMBER_LIST and desires
password (password authentication). You can use PGP authentication and
use this without authentication (only From: address check is applied).

It is useful to use "makefml" to initialize a maintainer password and
add a member to maintainers. For PGP authentication you need to use
"makefml" to prepare PGP configurations since FML assumes each mailing
list has each PGP pubrings. For it makefml uses each PGPPATH for each
ML.

SMTP (Simple Mail Transfer Protocol) cannot certify who are you. We
cannot trust password authentications since the password is plain
text and the mail is not encrypted, so some people read error mails or
files in mqueue spool. Using the "Approval: password" field in a
header is out of discussion.

In that sense I do not recommend remote maintenance. But actually such
needs exist. So FML provides them.

PGP authentication is better than others.

FYI: draft-myers-smtp-auth-11.txt ?

4.2	For More security

Firstly, remote maintenance should not be used :-). Secondly in lower
layer, you must use more secure tools. For example, It may be better
to use "ssh" to log in a remote host or to execute "makefml" remotely.

$DIR/etc/password for each ML's password file is crypted for a little
little more security. In default the encryption is traditional "crypt"

	$REMOTE_ADMINISTRATION_AUTH_TYPE = "crypt"; (default)

The encryption of this file uses "md5" If you set

	$REMOTE_ADMINISTRATION_AUTH_TYPE = "md5";

To edit $DIR/etc/password it is better to use "makefml passwd ML".

4.3	Enable Remote Administration Mode

You can use "makefml". To enable remote administration, configure in
config.ph

	$REMOTE_ADMINISTRATION = 1;

You can control these variables with "makefml".

In default, remote administration requests both address and password
authentication. It is defined as

	$REMOTE_ADMINISTRATION_AUTH_TYPE = "crypt";

If only address authentication is enough (NOT RECOMMENDED), set

	$REMOTE_ADMINISTRATION_AUTH_TYPE = "address";

$REMOTE_ADMINISTRATION_AUTH_TYPE is one of them

		address		From: address authentication.
		crypt		From: address + password authentication.
				etc/passwd is crypted.
		md5		From: address + password authentication.
				etc/passwd is md5-crypted.

4.4	Admin Command

To do remote maintenance, commands for it has the following syntax

	admin command command-options
or
	approve password command command-options

If $REMOTE_ADMINISTRATION_AUTH_TYPE is "crypt" or "md5", commands
begin with the authentication line.

	admin pass password

If $REMOTE_ADMINISTRATION_AUTH_TYPE is "pgp", the command mailbody is
clear-signed.

"approve" syntax is explained in the next section.

Example:
	admin pass password
	admin addadmin fukachan@sapporo.iij.ad.jp
	admin add      fukachan@sapporo.iij.ad.jp

4.5	Approve Password Command Syntax

"admin" format is once authenticated, FML requests no more password.
e.g.

	admin pass password
	admin addadmin fukachan@sapporo.iij.ad.jp	

The following "approve password" format corresponds to the line
above

	approve password addadmin fukachan@sapporo.iij.ad.jp	

This is added for listserv style compatibility.

4.6	Remote Administration Configurations

The list of remote maintainers is

	$ADMIN_MEMBER_LIST	= "$DIR/members-admin";

The help file for remote administration is

	$ADMIN_HELP_FILE	= "$DIR/help-admin";

The authentication type is 

	$REMOTE_ADMINISTRATION_AUTH_TYPE = "crypt";
or
	$REMOTE_ADMINISTRATION_AUTH_TYPE = "md5"; (perl 5 only)

The password file of authentication (crypt or md5 case) is

	$PASSWD_FILE = "$DIR/etc/passwd";

4.7	Add or remove remote maintainers (except for PGP)

See Chapter encryption 4 for the PGP case. When add
fukachan@sapporo.iij.ad.jp as a remote maintainer

In the case of "only address authentication", (not need password)

   admin addadmin fukachan@sapporo.iij.ad.jp

If both address and password authentication, an administrator needs to
initialize password for fukachan@sapporo.iij.ad.jp.

   admin addadmin fukachan@sapporo.iij.ad.jp
   admin initpass fukachan@sapporo.iij.ad.jp password

It is better to set up password using makefml. 

	% makefml passwd ML fukachan@sapporo.iij.ad.jp

4.8	Remove a remote maintainer

	admin byeadmin fukachan@sapporo.iij.ad.jp

4.9	Administraion commands list 

Please see help-admin.
   admin pass password
   admin password password
   admin passwd new-password
   admin initpass address password
   admin help
   admin log
   admin add address
   admin off address
   admin on address
   admin bye address
   admin chaddr old-addr new-addr
   admin change old-addr new-addr
   admin change-address old-addr new-addr
   admin skip address
   admin addadmin address
   admin addpriv  address
   admin byeadmin address
   admin byepriv  address
   admin dir
   admin ls options
   admin remove filename
   admin get filename
   admin resend filename address
   admin put filename
   admin rename filename1 filename2
   admin newinfo
   admin newguide
   admin unlink-article ID
   admin remove-article ID
   admin pgp options

4.10	Add or remove remote commands

The definitions is very similar to usual %Procedure.

   1 	If @PermitAdminProcedure, FML disables all commands and permits
	commands defined in it. If not defined, %AdminProcedure (default)
	is used which is automatically set in the first phase of FML
	command routine

   2	%LocalAdminProcedure overwrites %AdminProcedure.

   3 	If @DenyAdminProcedure is defined, remove commands defined in
	@DenyAdminProcedure from %Procedure.

   4	Evaluate $ADMIN_COMMAND_HOOK

	* permit only "admin help" and "admin addadmin". 

	@PermitAdminProcedure = ('admin:help', 'admin:addadmin');

	* add my "admin hack" command. You need to define
	  ProcAdminHack somewhere (e.g. in config.ph).

	%LocalAdminProcedure = ('admin:hack', 'ProcAdminHack');

	* Disable "admin addadmin".

	@DenyAdminProcedure = ('admin:addadmin');

4.11	Initialize a password

To initialize the "address"'s password, 
	makefml passwd <ML> address options

Of course this method requires you can log in the ML server host.

4.12	Change a password remotely

	admin pass	password
	admin passwd	new-password

If "approve" command style, 
	approve password present-password new-password

4.13	Send Welcome Message Automatically When 'Admin Add' Runs.

	$ADMIN_ADD_SEND_WELCOME_FILE = 1; (default 0)

4.14	Restriction on addresses to register

$REGISTRATION_ACCEPT_ADDR restricts acceptable addresses to
register both in automatic registration and remote administration.

Example 1;
	$REGISTRATION_ACCEPT_ADDR = 'domain.co.jp';

Example 2;
	$REGISTRATION_ACCEPT_ADDR = 'domain1.co.jp|domain2.co.jp';

4.15	Remote Administration Mode And Address Multiple Matchings

For user commands, FML requests the exact matching of multiple
matching addresses. For example consider the following two addresses

	fukachan@aoi.chan.panic
	fukachan@uja.aoi.chan.panic

FML cannot distinct that fukachan@aoi.chan.panic is the same as or
another person of fukachan@uja.aoi.chan.panic? (the address has only
an additional hostname?)

If non-remote administration mode, FML recursively tries to select one
address of them with recursive severe checks of domain levels (reverse
domain levels from root "."). So FML tries the address identification
like

	fukachan@panic				1 level
	fukachan@chan.panic			2 level
	fukachan@aoi.chan.panic			3 level
	fukachan@uja.aoi.chan.panic		4 level
	...

If check level is 3, FML thinks that fukachan@aoi.chan.panic and
fukachan@uja.aoi.chan.panic is the same address.
If FML do 4 level check, they differs. 

Let you are fukachan@aoi.chan.panic and send a command "unsubscribe"
with the mail header "From: fukachan@aoi.chan.panic".
If two addresses

	fukachan@aoi.chan.panic
	fukachan@uja.aoi.chan.panic

is in a member list, FML cannot remove fukachan@aoi.chan.panic since
both matches fukachan@aoi.chan.panic in 3 levels. In this case the
command fails. So removing it by (maintainer's) hand is required.

In remote administration mode, it is not useful. So one command 

	admin bye fukachan@aoi.chan.panic

can remove both addresses since FML permits multiple matchings in this
case.

4.16	Which files you can replace in remote?

For security arbitrary files should not be replaced remotely. The
flies listed in @REMOTE_RECONFIGURABLE_FILES can be replaced under
remote commands.

In default @REMOTE_RECONFIGURABLE_FILES has

	$INDEX_FILE		$WHOIS_DB
	$ADMIN_MEMBER_LIST	$ADMIN_HELP_FILE
	$PASSWD_FILE		$LOG_MESSAGE_ID
	$MEMBER_LIST		$ACTIVE_LIST
	$OBJECTIVE_FILE		$GUIDE_FILE
	$HELP_FILE		$DENY_FILE
	$WELCOME_FILE		$CONFIRMATION_FILE
	$LOGFILE		$MGET_LOGFILE
	$SMTPLOG		$SUMMARY_FILE
	$SEQUENCE_FILE		$MSEND_RC
	$LOCK_FILE

	$FILE_TO_REGIST
	$FTP_HELP_FILE		$WHOIS_HELP_FILE

	@ACTIVE_LIST		@MEMBER_LIST

To add files, 

	push(@REMOTE_RECONFIGURABLE_FILES, "$DIR/file-to-add");

When you use commands, please use the relative full path of file name
under $DIR!

4.17	On Logfile

FML uses $LOGFILE for 'admin' commands log. You need to rewrite the
code directly.

4.18	version up  from very old FML

*** not translated ***

5	misc

5.1	members-admin is not needed in pgp authentication ?

No, not needed. But exceptional rule is worse than duplicated checks.


		INDEX

$ADMIN_ADD_SEND_WELCOME_FILE               ...   4.13 
$ADMIN_COMMAND_HOOK                        ...   4.10 
$ADMIN_HELP_FILE                           ...   4.6 
$ADMIN_MEMBER_LIST                         ...   4.6 
admin add                                  ...   4.4 
admin addadmin                             ...   4.4 4.7 
admin addpriv                              ...   4.7 
admin initpass                             ...   4.7 
admin pass                                 ...   4.4 
approve command                            ...   4.5 
bin/passwd.pl                              ...   4.11 
byeadmin                                   ...   4.8 
byepriv                                    ...   4.8 
&DEFINE_MODE('remote')                     ...   4.3 
$DIR/etc/passwd                            ...   4.6 
etc/passwd                                 ...   4.11 
help-admin                                 ...   4.9 
MD5                                        ...   4.2 
$PASSWD_FILE                               ...   4.6 
$REGISTRATION_ACCEPT_ADDR                  ...   4.14 
$REMOTE_ADMINISTRATION                     ...   4 4.3 
$REMOTE_ADMINISTRATION_AUTH_TYPE           ...   4.3 
$REMOTE_ADMINISTRATION_REQUIRE_PASSWORD    ...   4.3 4.6 
@REMOTE_RECONFIGURABLE_FILES               ...   4.16 
