[PREVIOUS CHAPTER] [NEXT CHAPTER]

5 Executing FML based on POP3

    We implement libexec/popfml.pl for the case that

    	* You read mails via POP3 only
    	* Your mail server's administration policy prohibits programs
    	  from run kicked by MTA.

    The fundamental logic is simple. FML (libexec/popfml.pl) retrieves a
    mail via POP and injects it to fml.pl. This technique is functional,
    so applicable to all cases/os's where you can only read mails (of
    course you need "perl" works well :-). This technique works well both
    on UNIX and Windows NT (beta test phase).

    A problem is you should store the POP3 password somewhere on your
    machine. In default popfml.pl read it from ~/.netrc.

    5.1	how to emulate elena ML based on POP3

    % makefml newml popfml

    	elena
    	elena-ctl

    % /usr/local/fml/libexec/popfml.pl /var/spool/ml/popfml /usr/local/fml \
    	-user elena -pwfile /var/spool/ml/etc/netrc \
    	-include_file /var/spool/ml/elena/include

    % /usr/local/fml/libexec/popfml.pl /var/spool/ml/popfml /usr/local/fml \
    	-user elena-ctl -pwfile /var/spool/ml/etc/netrc \
    	-include_file /var/spool/ml/elena/include-ctl

    login    elena

    login    elena-ctl

*/5 * * * * /var/spool/ml/etc/popfml/master.sh 5.4 Popfml.pl Reference

    SYNOPSIS:

        popfml.pl [-hd] [-user username] [-host host] [-f config-file]

        -user username
        -host host(pop server running)
        -f    config-file
        -h    this message
        -d    debug mode

    Example:
    Retrieve a user "fukachan" 's mails from POP server "hikari" and
    injects them to programs defined in ~/.popfmlrc.

    	popfml.pl -user fukachan -host hikari

    Configuration files is ~/.popfmlrc. popfml.pl runs $POP_EXEC variable
    in it as a filtering program.

    Example: inject mails retrieved from POP servers into fml.pl.

    	$POP_EXEC = "/usr/local/fml/fml.pl /var/spool/ml/Elena";
    	1;

    How to set up cron differs from OS to OS. An example crontab (4.4BSD)
    is

    * * * * * popfml.pl -user fukachan -host hikari

    FML via POP3 technique may enable FML to run on several plat homes out
    of UNIX and administration policy.

    	Variables

    	$POPFML_PROG
    	$POP_EXEC

    filtering program which we inject mail to. Example:

       $POP_EXEC = "/usr/local/fml/fml.pl /var/spool/ml/Elena";

    	$POP_SERVER

    POP Server

    	$POP_USER

    The pop user name (account) corresponds to the mailing list address

    	$POP_PASSWORD

    POP password with $POP_USER.

    	$POP_TIMEOUT

    timeout to close POP connection with POP server.

    	$POP_QUEUE_DIR

    temporary queue directory.

    	$DIR/var/pop.queue

    	$POP_LOGFILE

    session log of POP3.

    	$DIR/var/log/_poplog

    	$POPFML_MAX_CHILDREN

    the maximum number of programs running at the same time.
    If the value is large, OS is painful ;-)

    	$POP_PORT

    POP3 port number. The default is 110/tcp. Usually you need not to
    concern it.

    	$POPFML_QUEUE_EXPIRE_LIMIT

    expire limit of queue spool.

[PREVIOUS CHAPTER] [NEXT CHAPTER]