[PREVIOUS CHAPTER] [NEXT CHAPTER]

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.0 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 ***

[PREVIOUS CHAPTER] [NEXT CHAPTER]