Managing Your List Configuration File

    First steps: Changing Your List's Configuration

  1. Send a config command to majordomo@lists.uoregon.edu to get the current configuration file

    config samplelist list-password

  2. Get the majordomo message(s) in your email account (email.uoregon.edu).
    You can edit the short version of your config file within email or using your favorite editor.
    If you use a wordprocessor, remember to save the file as text only with line breaks.

  3. send a 'newconfig' command to majordomo@lists, followed by the new file and EOF:

    newconfig samplelist list-password
    # The configuration file for a majordomo mailing list.
          [complete list of config options here]
    EOF

    NOTE: Be sure you include the entire configuration, NOT just the values
    you want to change or you will lose most of your list settings.

    What might you want to change? A few examples:

  1. administrivia

    # administrivia [bool] (yes)
    # Look for administrative requests (e.g. subscribe/unsubscribe) and
    # forward them to the list maintainer instead of the list.

    This option is set to yes by default, if you are confident that your users will not send random command messages to the list directly, you can set this to no which will eliminate the problem of messages with a command like word (help, subscribe, etc.) in the first 20 lines getting bounced to you for approval.

  2. advertise/noadvertise

    # advertise [regexp_array] (undef)
    # If the requestor email address matches one of these regexps, then
    # the list will be listed in the output of a lists command. Failure to
    # match any regexp excludes the list from the output. The regexps
    # under noadvertise overide these regexps.

    # noadvertise [regexp_array] (undef)
    # If the requestor name matches one of these regexps, then the list
    # will not be listed in the output of a lists command. Noadvertise
    # overrides advertise.

    These two options can be used to limit the scope of reporting in response to the user issued lists command. For example:

    advertise           << END
    /uoregon\.edu/
    END

    Would limit reporting to users whose email addresses end in uoregon.edu

    noadvertise           << END
    /.*/
    END

    while this expression would mean your list is not advertised to anyone. Note that both this options include some odd characters (/\* etc.). Majordomo supports what are called "perl style regular expressions" or regex. Basics of regex syntax can be found in the perlre man page

  3. maxlength = 40000

    # maxlength [integer] (40000)
    # The maximum size of an unapproved message in characters. When used
    # with digest, a new digest will be automatically generated if the
    # size of the digest exceeds this number of characters.

    If you wish to allow large messages (attachments) to be sent to the list without owner approval you can increase this number. Please remember that many users have a limited disk quota and a few large messages can cause mail problems!

  4. message_footer

    # message_footer [string_array] (undef)
    # Text to be appended at the end of all messages posted to the list.
    # The text is expanded before being used. The following expansion
    # tokens are defined: $LIST - the name of the current list, $SENDER -
    # the sender as taken from the from line, $VERSION, the version of
    # majordomo. If used in a digest, only the expansion token _SUBJECTS_
    # is available, and it expands to the list of message subjects in the
    # digest

    Use this option to insert a standard footer for all list messages like so:

    message_footer           << END
    _________________________________________________________________________
    Members page: http://lists.uoregon.edu/~majordom/wks/testlist.html
    END

    You might want to include a pointer to a web page, a Mhonarc archive, or instructions for basic user commands.

  5. restrict_post

    # restrict_post [restrict_post] (undef)
    # If defined only address listed in one of the files (colon or space
    # separated) can post to the mailing list. This is less useful than it
    # seems it should be since there is no way to create these files if
    # you do not have access to the machine running resend. This mechanism
    # will be replaced in a future version of majordomo/resend.

    This opton is set to your listname if you've created a closed list. You may choose to add additional existing list files here (a digest version of your list, related lists which may contribute announcements to the larger discussion, etc.). If you are a darkwing user, you can also point at a file in your home directory:

     
    restrict_post   = testlist:testlist-digest:/home3/llynch/test-list.post
    
    
    this file might contain addresses of users who want to post announcements to the list without belonging to the list, but it can also be used to allow a user to post from several addresses while recieving list mail at only one.

  6. strip = no

    # strip [bool] (yes)
    # When adding address to the list, strip off all comments etc, and put
    # just the raw address in the list file. In addition to the keyword,
    # if the file .strip exists, it is the same as specifying a
    # yes value. That yes value is overridden by the value of this
    # keyword.

    This option is set to no for UO lists, which means that addresses may include user names or mailer information ("Lucy Lynch" ). Changing this option to yes creates a very tidy list, but may eliminate identifing information for obscure address.

  7. taboo_body/taboo_headers

    # taboo_body [regexp_array] (undef)
    # If any line of the body matches one of these regexps, then the
    # message will be bounced for review.

    # taboo_headers [regexp_array] (undef)
    # If any of the headers matches one of these regexps, then the
    # message will be bounced for review.

    These options can be used to create a useful set of filters for your list. They require the use of regex expressions but they provide a set of powerful tools. For example:

    To reject messages with attached wordprocessor documents and all binaries, place some text between the markers as shown:

    taboo_body           << END
    /^Content-Type: application\/(msword|wordperfect|octet-stream)/i
    END

    or

    taboo_body           << END
    /^Content-type:.*application/i
    /^Content-type: image\//i
    /^Content-type: text\/html/i
    /^Content-type:.*(exe|zip|gif|jpg|html)/i
    /^Content-transfer-encoding:.*base64/i
    END

    a regex filter for VBS attachments :

    taboo_body           << END
    /^[ ]*[file]*name=\".*\.[vV][bB][sS]\"/
    END

    Banish an unwanted user using taboo_headers:

    taboo_headers           << END
    /username\@domainname\.com/
    /username\@/
    END

    If you're interested in playing with taboo_body recipes, this information will help you get started:

    
     /^Content-Type: application\/(msword|wordperfect|pdf|octet-stream)/i 
     |||     |     |  |        | |                                    |||
     |||     |     |  |        | |                                    ||ignore case
     |||     |     |  |        | |                                    |end expression
     ||+-----|-----+  +--------+ +------------------------------------+
     ||      |        |          |
     ||      |        |          pattern subtypes 
     ||      |        |
     ||      |        pattern type
     ||      |
     ||      Header field
     ||
     |begin at the head of a line (following newline char)
     start expression
    
    The following metacharacters have meanings similar to grep -E: 
    
          \       Quote the next metacharacter
          ^       Match the beginning of the line
          .       Match any character (except newline)
          $       Match the end of the line (or before newline at the end)
          |       Alternation
          ()      Grouping
          []      Character class
          
    The following standard quantifiers are recognized: 
    
          *       Match 0 or more times
          +       Match 1 or more times
          ?       Match 1 or 0 times
          {n}     Match exactly n times
          {n,}    Match at least n times
          {n,m}   Match at least n but not more than m times
          
    If you want it to match the minimum number of times possible, follow the
    quantifier with a ?.  Note that the meanings don't change, just the
    "greediness":
    
          *?      Match 0 or more times
          +?      Match 1 or more times
          ??      Match 0 or 1 time
          {n}?    Match exactly n times
          {n,}?   Match at least n times
          {n,m}?  Match at least n but not more than m times
    
    Because patterns are processed as double quoted strings, the following also
    work:
    
          \t      tab                   (HT, TAB)
          \n      newline               (LF, NL)
          \r      return                (CR)
          \f      form feed             (FF)
          \a      alarm (bell)          (BEL)
          \e      escape (think troff)  (ESC)
          \033    octal char (think of a PDP-11)
          \x1B    hex char
          \c[     control char
          \l      lowercase next char (think vi)
          \u      uppercase next char (think vi)
          \L      lowercase till \E (think vi)
          \U      uppercase till \E (think vi)
          \E      end case modification (think vi)
          \Q      quote (disable) regexp metacharacters till \E
    
    In addition, perl defines the following: 
    
          \w      Match a "word" character (alphanumeric plus _)
          \W      Match a non-word character
          \s      Match a whitespace character
          \S      Match a non-whitespace character
          \d      Match a digit character
          \D      Match a non-digit character
    
    Note that \w matches a single alphanumeric character, not a whole word.  To
    match a word you'd need to say \w+.  You may use \w, \W, \s, \S, \d and \D
    within character classes (though not as either end of a range).
    
    

    Lucy Elizabeth Lynch
    The URL for this page is:
    http://lists.uoregon.edu/~majordom/wks/get-config.html
    Last modified: Fri Sep 26 14:03:17 PDT 2003