packages icon
File         : readme
Purpose      : Introduction to mailing lists and MReply.
Created on   : Jan 18, 1994 by Tor Slettnes <tor@netcom.com>
Modified on  : Jul 06, 1995 by Tor Slettnes <tor@netcom.com>
Version      : 1.75

MReply is copyrighted (C) 1993-1995 by Tor Slettnes.
Program can be distributed freely, but comes without ANY warranty.
Modifications permitted; I'd be happy to hear from you.
------------------------------------------------------------------------


====================
General introduction
====================

    MReply is a UNIX-based mail processing program, specifically aimed
    at maintaining mailing lists or file servers.  It is invoked via
    the mail .forwarding mechanism, or indirectly with other programs
    like 'procmail' or ELM's 'filter'.  Built-in features include:

      * List maintenance via JOIN/SUBSCRIBE, LEAVE/UNSUBSCRIBE,
        CHANGE, WHICH, REVIEW;  optional auto-subscription to
        lists;  open vs. concealed lists.

      * File server: SEND or receive plaintext or encoded files;
        built-in file type detection, uuencode, uudecode, shar,
        splitmail; optional ACCESS codes to prevent unauthorized
        submissions.

      * Define your own commands in the configuration file, aided by
        a number of internal functions, and ability to redirect to or
        from external shell commands.

      * Automatically separates request mails from regular text
        (avoid command mails in mailing list or personal mailbox).

      * Filtering/forwarding of mails to mailbox, other addresses,
        external pipes, internal commands...

      * Multiple site configurations; forward requests for specific
        files or mailing lists to other sites, shell commands etc.

      * Mail loop detection prevents ringing.

      * 'Local mode' lets you give commands interactively on the
        command line.

      * Highly customizable, yet straightforward configuration syntax;
        no root privileges needed.

      * Comes with on-line manual, sample configuration file, and
        mass-mailer script.

    

    Updates since MReply version 1.60:
      * 1.61: Corrected parsing of header fields occupying several lines
      * 1.62: Changed parsing of mail where the first word in the first
              line of the body ends with ':'.
      * 1.63: Added functions $downcase(), $space()
      * 1.64: Added functions $trim(), $listfile(), $packetfile()
              Changed default variable substitution; is no longer trimmed.
              Added statements ".INPUT [filename]" and ".READ [variable]"
              A number of minor bug fixes.
      * 1.65: Corrected bug; '.message NotInAnyLists' was not listed in
              sample config. files and the manual; and MReply did not
              give any error response for 'WHICH' commands if not present.
      * 1.66: Corrected bug; when attempting to send a file that is
              really a directory, it attempted to send multiple files
              of zero size, and became a runaway process.
      * 1.67: Any listfile associated with ".list" will now preserve its
              old permissions, instead of getting a 0644 mode.
      * 1.68: Corrected spelling in 'serverinfo' response; removed two
              bugs in sample1.mreply.rc; removed 'segmentation fault'
              in case of file submissions ("text" or "begin") with no
              filename given.
      * 1.69: Added variable $MAILTYPE - "PLAIN", "COMMAND" or "FILE".
              Corrected ".endif"/".end" bug in sample1.mreply.rc.
              Added $HOME/.mailbox/inbox as default mailbox, to accomodate
              future Netcom structure.
      * 1.70: New options for forwarding: -noheader, -nobody, -nosig, -sig;
              Forwarding to -file, -addr, -pipe, -exec, -goto;
              New option "-u username" overrides owner of MReply process;
              Two new specifications: ".globalInit" and ".commandInit";
              The ".input" specification will now also affect ".exec";
              Numerical comparison via =, <, >, <=, >=;
              Auto-detection of file type (whether to encode or not);
              Better X-loop: detection/preservation;
              More documentation in sampe1.mreply.rc
      * 1.71: Corrected bugs:
                ".listdir /path/" worked, ".listdir /path" did not.
                Now uses 'fcntl()' rather than 'lockf()' or 'flock()', due
                to limited availability of the latter on some systems.
              Changes:
                Increased minSplitSize to 50000 (from 10000); makes abuse
                (mailbombing a third party) more difficult.
                Updated 'serverinfo' response to reflect new
                MReply-Request service.
                A backslash in the end of a config. line no longer inserts
                a newline character, use "\n\" to do so.
                "$header(Field:)" now includes the trailing newline char.
      * 1.72: Corrected bugs:
                File locking was attempted on error log file, sometimes
                causing a new error, and looping until maximum number of
                system locks were reached.  Removed; also removed locking
                on filenames starting with "/dev/".
              Changes:
                Added ".alias" (Usage: ".alias alias-name command")
                Added ".process" (Usage: ".process command args")
                Added option "-t to-address"
                Removed ".site", ".server", "$SITEID",
                ".message IllegalSite", etc.
      * 1.73: Memory leak in "setEnv()" removed.
      * 1.74: Bug in ".if" parsing fixed.  Complicated; details available
              upon request.
      * 1.75: Bug fixes:
                Finally gave up on trying to manipulate **environ manually;
                using putenv() instead.  (Needs support from library).
                A ".forwardAll" could cause "Invalid argument" errors to
                malloc() -- Corrected.
                RC files had ".message NotInAnyLists".  Correct spelling
                is "NotInAnyList".



    MReply is built under SunOS 4.1.3, but is also known to compile under
    most other Unix versions.  If you encounter problems during compilation
    on your OS, please let me know what they were; and if you managed
    to get around them, how.



    The files included are:
        mreply.c         
            Source code, to be compiled with 'gcc':
            gcc -O2 mreply.c -o ~/bin/mreply

        mreply.n
            The manual page for MReply.  If you have root privileges,
            store this file as /usr/man/mann/mreply.n;  otherwise,
            store it as e.g. $HOME/man/mann/mreply.n, and set the
            environment variable MANPATH to "/usr/man:$HOME/man".

        sample1.mreply.rc
            A sample configuration file for MReply.  Fairly basic,
            but contains extensive documentation.  Good starting point.

        sample2.mreply.rc
            The configuration file I use now.  A bit more complicated.
            Includes:
              - Service for 'ftp-request', 'notgnu-request', 
                'notgnu-list', 'mreply-request', 'mreply-list',
                and personal mails to me.
              - Various extra commands: INDEX, DIR and LS

        msend
            A shell script that can be used to mail to multiple persons
            in a list. Can e.g. be used to redistribute mails that have
            been intercepted by MReply, or to send mail to a moderated
            type of list.


=================
Setting up MReply
=================

    To be able to give MReply the first quick test, first create the
    following .forward file in your HOME directory:

        File: $HOME/.forward
        --------------------------------------------------------------
        "|exec /path/mreply #your_login_name"
        --------------------------------------------------------------

    The double quotes are important.  The part about #your_login_name
    _can_ be omitted;  however a bug in 'sendmail' causes mail sent to
    several people with the same .forward file to be forwarded to only
    one of these.

    Now, if you send mail to yourself, this mail will be piped to
    MReply.  MReply will in turn look for its configuration file;
    since this one does not exist yet, it will forward the mail to
    /usr/spool/mail/your_login_name or /usr/mail/your_login_name,
    whichever is available. (If neither, it will store the mail in
    /your/home/dir/mbox).  You should then be able to read it via your
    regular mail reader. 

    Now, copy the sample.mreply.rc file to $HOME/.mreply.rc.  All file
    declarations inside it are (most likely! :-) illegal, so any kind
    of command mail will produce a "Server error" mail; but regular
    non-command mail should still be forwarded as if nothing had
    happened.

    Once you have this working, you can start editing .mreply.rc to
    suit your personal needs and preferences. Try, fail, try more,
    and so on.  Be sure to read the included manual page; it does
    contain more detailed description of MReply's features.


=======================
Setting up mail aliases
=======================

    Any decent mailing service has its own email address. Well, almost
    any; some good exceptions exist. :-)

    To obtain an address for your service, you should have your system
    administrator set up mailing aliases for you in the global
    'aliases' file. (Netcom users: "system administrator" means 
    netmail@netcom.com).  If you are maintaining a mailing list, a
    common set of aliases would be similar to:

        your-list: :include:/path/your-subscriber-list
        your-list-request: your_login_name
        owner-your-list: your_login_name

    The first alias causes ALL mail sent to your-list to be
    redistributed to every person on the list, without any kind of 
    moderation; the other two causes mail sent to these aliases to be
    forwarded to your personal mailbox.

    If you want to auto-moderate the list, for instance by filtering
    out request mail (i.e. mail containing commands such as SEND or
    SUBSCRIBE) or mail sent by someone not in the mailing list, 
    you may want the following ones instead:

        your-list: your_login_name
        your-list-request: your_login_name
        owner-your-list: your_login_name

    The difference being that the `your-list' alias forwards mail to
    you (i.e. MReply) rather than to the entire list directly. If you
    already have the :include: type alias mentioned before, no 
    worries. You can still have the mail forwarded to your mailbox
    first: Include only your own name in the list file associated
    with the alias, then use another file (e.g. in your home
    directory) as the REAL subscriber list file.

    If you plan to perform such auto-moderation, you should eventually
    have a .mreply.rc similar to sample1.mreply.rc; this one contains
    some examples of mail filtering.  One important line from this file
    is the following one:

        File: $HOME/.mreply.rc (extract):
        --------------------------------------------------------------
        .forward | $HOME/bin/msend -q $HOME/lists/your-subscriber-list
        --------------------------------------------------------------

    This will forward any "regular" (non-command) mail msend,
    which in turn will mail it out to every address in the list file
    $HOME/lists/your-subscriber-list.  When the mail comes back to
    MReply the second time (if your own address is in the list),
    it will be forwarded to your regular inbox in /usr/spool/mail/$USER
    unless a .loopedforward domain is specified.



=======
Testing
=======

    While you are configuring your system, be sure to test it with
    only very few addresses in your list, and notify these people in
    advance. (If you have an alternative e-mail address available, the
    better). Also be sure to test with both a "regular" mail and a
    "request" mail for each mailing alias or condition, where
    appropriate. 

    You can also use MReply to manually perform list maintenance or
    send files; use the following syntax:

        mreply "Real Name <user@host.domain>"
        mreply "user@host.domain (Real Name)"
        mreply user@host.domain

    You will then be given an interactive prompt, and can give SEND,
    JOIN/SUBSCRIBE etc. commands, as if they were sent via e-mail.

    I'm sure there are lots of things I forgot here. Feel free to
    contact me with any kind of questions, comments etc. you may have.



============
Miscellanous
============

    To automatically receive information on new updates in the future,
    please send a mail to <mreply-request@netcom.com> containing the
    following message body:

        SUBSCRIBE MREPLY-UPDATES

    To participate in the newly started MReply-List, give the command:

        SUBSCRIBE MREPLY-LIST

    For more information, demo's & such, send a HELP request to
    <ftp-request@netcom.com>, <notgnu-request@netcom.com>,
    <mreply-request@netcom.com> or <tor@netcom.com>.


Good luck!
Tor Slettnes
<tor@connectus.com>
July 06, 1995