[PREVIOUS CHAPTER] [______TOC_______]

9 misc

    9.1	Not Deliver From: Field Address Of In-Coming Mail.

    If you do not deliver an article when you yourself post it, set

    $START_HOOK = q#
    	$SKIP{'fukachan@phys.titech.ac.jp'} = 1
    		if &AddressMatch($From_address, 'fukachan@phys.titech.ac.jp');
    #;

    9.2	off and skip

    fml-support: 07144

    These functions are same but different internally.

    9.3	disable all commands except for subscribe/unsubscribe

    fml-support: 07271

    disable all commands except for subscribe/unsubscribe

    @PermitProcedure = ('subscribe', 'confirm', 'bye');

    It is better to set up this to disable "fml status report" reply.

         &DEFINE_MODE('disablenotify');

    9.4	actionless subscribe

    This is tricky. If subscribe request comes to elena-ctl, the function
    is same as the default one.  But subscribe request comes to elena ML
    itself, the article is forwarded to elena ML.

        $AUTO_REGISTRATION_LINES_LIMIT = -1;
        $START_HOOK = q#
        	if ($Envelope{'mode:ctladdr'}) {
        		$AUTO_REGISTERED_UNDELIVER_P   = 1;
        	}
        	else {
        		$AUTO_REGISTERED_UNDELIVER_P   = 0;
        	}
        #;

    9.5	what file "skip" command operates?

    fml-support: 07656, 07716

    	push( @MEMBER_LIST, "$DIR/../list2/members" );

      loading config.ph
      ...

    When you use both "list1" and "list2" ML member lists for list1 ML,
    "skip" command operates the first matched target within these lists.
    To enforce the search order to list2/members, list1/members, try this
    hook (if you use old fml (< 4.0)).

    $START_HOOK = q#
       push( @MEMBER_LIST, "$DIR/../list2/members" );
    #;

    9.6	Restrict domains of user which joins a mailing list

    $REGISTRATION_ACCEPT_ADDR can restrict registration to e.g. we permit
    only persons in some domains can join this mailing list.
    Please see it (this section may be of no use after this).

    Several hooks are available to enable a lot of exceptional functions.
    To permit only users on permit_domain.co.jp can join this list, you
    can use $START_HOOK.

    $START_HOOK = q#
       if ($From_address !~ /permit_domain\.co\.jp$/i) {
    	&Mesg(*Envelope,
    	   "We permit user@*permit_domain.co.jp can join this list.");
    	$DO_NOTHING = 1;
       }
    #;

    	$DO_NOTHING = 1		do not run the main routine
    				* distribute
    				* automatic registration
    				and other almost all functions

       if ($From_address !~ /permit_domain\.co\.jp$/i) {

    is "addresses(From: address) which do not match permit_domain.co.jp".

       if ($Envelope{'h:sender:'} !~ /permit_domain\.co\.jp/i) {

    is "Sender: does not contains permit_domain.co.jp string".

    9.7	Example: "automatic registration" and "restrict members who can post"

    $REJECT_COMMAND_HANDLER can have a value 'auto_asymmetric_regist'. If
    defined, FML uses delivery list controlled by automatic registration
    and authentication list edited by hand (or makefml).

    make "elena" and "elena-regist" ML.

    	elena		only for post (by hand or makefml)
    	elena-regist	only for commands

    	elena-regist/members	distribution list (automatic registration)
    	elena/members		authentication list (by hand or makefml)

    We use "elena-regist" for automatic registration to add
    "elena-regist/members". "elena" ML uses plural distribution lists,
    "elena/actives", "elena-regist/members".

       [Example of flow]

    	% makefml newml elena
    	% makefml newml elena-regist
    	% cd /var/spool/ml/elena-regist
    	% cp include-ctl include

    	*** edit /etc/aliases

    	% cd /var/spool/ml/elena
    	% makefml edit elena cf

    	*** edit cf file to append "elena-regist/members" to @ACTIVE_LIST.

    	ACTIVE_LIST	/var/spool/ml/elena-regist/members

    	recreate config.ph

    	% make config.ph
    	% makefml add elena postable-member-address-1
    	% makefml add elena postable-member-address-2
    	.....

    [Discussion]

    [Discussion]
    FML cannot lock elena-regist ML in default but works well I believe:)

    9.8	%DOMAIN_ALIASES when authentication

    When FML authenticates From: address as a member or not, FML tries
    both who@ujauja.or.jp and who@ujauja.ne.jp.

    %DOMAIN_ALIASES = (
    	);

    An example of a patch for fml.pl 2.0.24.47

    --- fml.pl.org	Fri Nov 21 08:11:10 1997
    +++ fml.pl	Sat Nov 22 12:51:33 1997
    @@ -571,6 +571,19 @@
         &Log("Gecos [$e{'macro:x'}]") if $debug;
         $e{'Addr2Reply:'}    = &Conv2mailbox($e{'h:reply-to:'},*e)||$From_address;

    +    if (%DOMAIN_ALIASES) {
    +       local($addr);
    +	if (&MailListMemberP($From_address)) {
    +	    ; # not rewrite
    +	}
    +	else {
    +	    for (keys %DOMAIN_ALIASES) {
    +		if ($From_address =~ /$_$/i) {
    +                   $addr = $From_address;
    +		    $addr =~ s/$_$/$DOMAIN_ALIASES{$_}/i;
    +                   &MailListMemberP($addr) && ($From_address = $addr);
    +		}
    +	    }
    +	}
    +    }
    +
         # To: $MAIL_LIST for readability;
         # &RewriteField(*e, 'Cc') unless $NOT_REWRITE_CC;
         if ($REWRITE_TO < 0) {

    9.9	How severely FML checks the validity of the address

    * How severely fml.pl checks address syntax
    please see ../address_manipulate 2.1 for $ADDR_CHECK_MAX.

    9.10	$MAINTAINER

    Roughly speaking $MAINTAINER is an address which a user contacts ML
    maintainers with and error mails returns to. In default fml.pl sets up
    listname-admin and listname-request for listname ML. fml.pl uses
    listname-admin as a maintainer address and prepares listname-request
    as an alias. Historically it is good for you to prepare
    listname-request also.

    However some ISP services cannot provide listname-request or
    listname-admin. Please consult with your ISP around on this point.

@MEMBER_LIST = ( ); @ACTIVE_LIST = ( ); We accept opinions by mail from anyone and send back the reply "thank you for your opinion" to the sender. object: return guide if fml receives post from the member. config.ph configuration Example 1: 1. permit post from anyone 2. add $START_HOOK to send back "guide" ### sample configuration ### $PERMIT_POST_FROM = "anyone"; # YOU CAN EDIT MANUALLY AFTER HERE. $START_HOOK = q# if (! &MailListMemberP($From_address)) { &GuideRequest(*Envelope);} #; config.ph configuration Example 2: return another file not guilde with the header: From: $MAIL_LIST Subject: Thanks you for your mail ### sample configuration ### $PERMIT_POST_FROM = "anyone"; # YOU CAN EDIT MANUALLY AFTER HERE. $RECRUIT_ACK_STATEMENT = "Thanks you for your mail"; $RECRUIT_ACK_FILE = "$DIR/recruit_reply"; $START_HOOK = q# if (! &MailListMemberP($From_address)) { &DEFINE_FIELD_OF_REPORT_MAIL('From', $MAIL_LIST); &SendFile($From_address, $RECRUIT_ACK_STATEMENT, $RECRUIT_ACK_FILE); } #; 9.13 One recipient for plural addresses to post mails from

    When one recipient for plural addresses to post mails from, you can
    write

    	# address

    format in member or delivery lists. In this comment out style fml.pl
    uses it as an authentication candidate but not delivers articles to
    it. If the list follows

    	# addr1
    	# addr2
    	# addr3
    	addr4

    Fml delivers mail to addr4 not addr1,addr2,addr3 but accepts post
    from addr1,addr2,addr3,addr4.

    9.14	Set up listname-request as a command address

       1 set up listname-request to run fml.pl with command mode

    	elena-request: :include:/var/spool/ml/elena/include-ctl

       The content of file elena-request is such as

    	"|/usr/local/fml/fml.pl /var/spool/ml/elena --ctladdr"

    2	FML distribution article has information of commands in the header.
    	Please set

    	$CONTROL_ADDRESS       = "elena-request\@$DOMAINNAME";

    In config.ph. If $MAINTAINER is the same as $CONTROL_ADDRESS, please
    change it to different one. In default it is o.k. since $MAINTAINER is
    listname-admin.

    $Id: examples.wix,v 1.3 2000/12/10 04:14:40 fukachan Exp $