[PREVIOUS CHAPTER] [NEXT CHAPTER]
3 how fml command works

3.1	Maximum Number Of Commands In On Mail


If $MAXNUM_COMMAND_INPUT is defined, the maximum number of commands in
on mail is $MAXNUM_COMMAND_INPUT. If not defined, the number is
infinite:). In default INFINITE!


3.2	Warning for Invalid Commands


In default, FML does not warn against invalid commands and ignore
them. If you want to warn it, set

	$USE_INVALID_COMMAND_WARNING = 1; (default 0)


3.3	If an empty effective command mail comes in ?


FML sends back help file.


3.4	End of Command Sets Against Signature


Please use one of them to show the end of commands sequence. 

	exit 
	end
	quit



II Internals



4.1	How to Add or Remove Available Commands


You can set up what commands you add or remove in config.ph.
FML interprets it as follows:


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


   2	%LocalProcedure overwrites %Procedure.


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

Example:


	permit only "guide" and "summary", but disables other commands.

	@PermitProcedure = ('guide', 'summary');


	add my "hack" command. You need to write subroutine "ProcHack".

	%LocalProcedure = ('hack', 'ProcHack');


	Disable "get" commands but others are available.

	@DenyProcedure = ('get', 'send', 'mget', 'msend');


	Disable commands to retrieve member lists

	@DenyProcedure = ('member', 'active', 'members', 'actives', 'status', 'stat');

4.2	Special keys available in %Procedure


%Procedure has a special format. Usually the key and value of the hash
is as follows:

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


	hash key	the corresponding value
	----------------------------------------
	command name	the corresponding Function name (e.g. ProcHoeHoe)


FML defines and uses the following special syntaxes.

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


	hash key	the corresponding value
	----------------------------------------

	key		Function Name (e.g. ProcHoeHoe)
	#key		file name
	r#key		1 or 0
	r2a#key		1 or 0
	l#key		the maximum request for key in one mail


'#key' is a file name to send back since the function to send back a
file is common and the file to send differs. You can use this to
define a new command to a special file.


Example: "help" command definition. 

		    # help for usage of commands
		    'help',	'ProcFileSendBack',
		    '#help',	$HELP_FILE,


Example: add your new command "news" to send back "$DIR/news" file.

%LocalProcedure = ('news',	'ProcFileSendBack',
		   '#news',	"$DIR/news");


* If "r#key" is defined, FML sends the trace log of the command to the
user who submits the command mail.


Example: "off" command definition

		    'off',    'ProcSetDeliveryMode',
		    'r#off', 1,

* If "r2a#key" is defined, FML sends the trace log of the command to
$MAINTAINER. 


Example: "bye" and "unsubscribe" to notify the log to maintainers.

		    'bye',             'ProcSetMemberList',
		    'r#bye',           1,
		    'r2a#bye',         1,
		    'unsubscribe',     'ProcSetMemberList',
		    'r#unsubscribe',   1,
		    'r2a#unsubscribe', 1,

Ex 2: "chaddr" case.
		    'chaddr',         'ProcSetMemberList',
		    'r#chaddr', 1,


Restrict 'command' requests in one mail up to $Procedure{"l#command"}
$MAXNUM_COMMAND_INPUT is another issue which restrict the
total number of commands in on email.


Example: "get" command requets is up to 10 in one mail.

	             'l#get',      10,

4.3	'# syntax' is required?

Usually, '# ' part is NOT needed. In default FML sets up
"listname@FQDN" for post and "listname-ctl@FQDN" for command.

If both posting and command addresses are the same, a keyword for the
switching between post function and command function is required. '#
syntax' is the key of switching.


To configure that "# command" is the same as "#command", set 

	$COMMAND_SYNTAX_EXTENSION = 1; (default 1)



III Several commands


[PREVIOUS CHAPTER]
 [NEXT CHAPTER]