Blame SOURCES/mailman.INSTALL.REDHAT.in

ccdd61
This file contains instructions for how to complete the installation
ccdd61
of mailman after you have installed the Red Hat mailman RPM. There are
ccdd61
certain items you will need to manually configure as the RPM is not
ccdd61
capable of doing every installation and confirguration task.
ccdd61
ccdd61
First, you should note that the RPM has installed mailman in the
ccdd61
following directory:
ccdd61
@prefix@
ccdd61
You may want to examine this directory to find additional mailman
ccdd61
documentation, or other mailman files.
ccdd61
ccdd61
IMPORTANT NOTE FOR USERS UPGRADING FROM A PREVIOUS RED HAT MAILMAN
ccdd61
INSTALLATION OR THOSE FAMILAR WITH "STANDARD MAILMAN INSTALLATIONS"
ccdd61
ccdd61
    Earlier Red Hat mailman rpms installed all of the mailman files under
ccdd61
    /var/mailman. This did not conform to the Filesystem Hierarchy
ccdd61
    Standard (FHS) and created security violations when SELinux is
ccdd61
    enabled. As of mailman-2.1.5-21 the following directory and file
ccdd61
    changes occurred:
ccdd61
ccdd61
    variable data (e.g. lists) is in @VAR_PREFIX@, library code,
ccdd61
    executables, and scripts are located in @prefix@, lock files are in
ccdd61
    @LOCK_DIR@, the pid file is in @PID_DIR@, qfiles are in @QUEUE_DIR@,
ccdd61
    and configuration files have been moved to the new @CONFIG_DIR@.
ccdd61
ccdd61
    If you previously had mailman installed and have edited files in
ccdd61
    /var/mailman (e.g. configuration) you will need to move those changes
ccdd61
    to their new locations.
ccdd61
ccdd61
    A script has been provided to aid in the task of migrating your
ccdd61
    mailman datafiles, it is contrib/migrate-fhs, run with -h for help
ccdd61
    information.
ccdd61
ccdd61
    The mapping of old locations to new locations is as follows:
ccdd61
ccdd61
    Directory Mapping:
ccdd61
    /var/mailman				--> /var/lib/mailman
ccdd61
    /var/mailman/Mailman			--> /usr/lib/mailman/Mailman
ccdd61
    /var/mailman/archives			--> /var/lib/mailman/archives
ccdd61
    /var/mailman/bin				--> /usr/lib/mailman/bin
ccdd61
    /var/mailman/cgi-bin			--> /usr/lib/mailman/cgi-bin
ccdd61
    /var/mailman/cron				--> /usr/lib/mailman/cron
ccdd61
    /var/mailman/data				--> /var/lib/mailman/data
ccdd61
    /var/mailman/lists				--> /var/lib/mailman/lists
ccdd61
    /var/mailman/locks				--> /var/lock/mailman
ccdd61
    /var/mailman/logs				--> /var/log/mailman
ccdd61
    /var/mailman/mail				--> /usr/lib/mailman/mail
ccdd61
    /var/mailman/messages			--> /usr/lib/mailman/messages
ccdd61
    /var/mailman/pythonlib			--> /usr/lib/mailman/pythonlib
ccdd61
    /var/mailman/qfiles				--> /var/spool/mailman
ccdd61
    /var/spool/mailman/qfiles			--> /var/spool/mailman
ccdd61
    /var/mailman/scripts			--> /usr/lib/mailman/scripts
ccdd61
    /var/mailman/spam				--> /var/lib/mailman/spam
ccdd61
    /var/mailman/templates			--> /usr/lib/mailman/templates
ccdd61
    /var/mailman/tests				--> /usr/lib/mailman/tests
ccdd61
ccdd61
    File Mapping:
ccdd61
    /var/mailman/data/adm.pw			--> /etc/mailman/adm.pw
ccdd61
    /var/mailman/data/creator.pw		--> /etc/mailman/creator.pw
ccdd61
    /var/mailman/data/aliases			--> /etc/mailman/aliases
ccdd61
    /var/mailman/data/virtual-mailman		--> /etc/mailman/virtual-mailman
ccdd61
    /var/mailman/data/sitelist.cfg		--> /etc/mailman/sitelist.cfg
ccdd61
    /var/mailman/data/master-qrunner.pid	--> /var/run/mailman/master-qrunner.pid
ccdd61
ccdd61
    Discussion of directory and file relocation:
ccdd61
ccdd61
    Two new directories were created and three existing directories which
ccdd61
    were hardcoded are now configurable.
ccdd61
ccdd61
    PID_DIR is used to hold the process id and is new because FHS wants
ccdd61
    pid files to be located in /var/run. The FHS says when there is only a
ccdd61
    single pid file it should be located in /var/run/<name>.pid, and when
ccdd61
    there are multiple pid's files they should be located together in a
ccdd61
    subdirectory, /var/run/<name>/. Currently mailman only has a single
ccdd61
    pid file, but it does have multiple processes (qrunners). Also SELinux
ccdd61
    security policy is easier to write if processes are segregated into
ccdd61
    individual subdirectories. Therefore we elected to place the mailman
ccdd61
    pid file in its own subdirectory, there is some debate if this is 100%
ccdd61
    FHS compliant because there is only currently a single pid file, but
ccdd61
    this gives us greater future flexibility and is in the spirit of FHS.
ccdd61
ccdd61
    CONFIG_DIR is used to hold the site configuration files. FHS wants
ccdd61
    configuration files stored in /etc/mailman. Previously configuration
ccdd61
    files were mixed in with data files in DATA_DIR and with the run-time
ccdd61
    code (e.g. Mailman/mm_cfg.py). CONFIG_DIR continues to exist but is
ccdd61
    now restricted to data files (e.g. python pickle files). The password
ccdd61
    files, alias files, and .cfg (e.g. sitelist.cfg) files have been moved
ccdd61
    to CONFIG_DIR. mm_cfg.py which is the primary mailman configuration
ccdd61
    file was presented a bit of a dilemma. In theory it should be located
ccdd61
    in /etc/mailman, however it is executable code which argues it should
ccdd61
    be located with the other executable files, it has traditionally lived
ccdd61
    in $PREFIX/Mailman and experienced mailman admins will expect to find
ccdd61
    it there. Modifying all the mm_cfg import statements and paths.py was
ccdd61
    believed to be too invasive a change, and technically its part of the
ccdd61
    "Mailman" package and moving it would take it out of the package
ccdd61
    (although currently I don't think that presents any known
ccdd61
    issues). Instead a compromise approach was adopted, mm_cfg.py is
ccdd61
    symbolically linked into the /etc/mailman directory pointing to
ccdd61
    $PREFIX/Mailman/mm_cfg.py. Thus mm_cfg.py "appears" in the
ccdd61
    configuration directory but retains its traditional location, this was
ccdd61
    deemed a reasonable compromise for the mailman 2.1.x timeframe.
ccdd61
ccdd61
    sitelist.cfg has a symbolic link in its old location in the DATA_DIR
ccdd61
    pointing to its new location in the CONFIG_DIR.
ccdd61
ccdd61
    New Directories (can be specified as parameter to configure):
ccdd61
ccdd61
    CONFIG_DIR:	default=$VAR_PREFIX/data		FHS=/etc/mailman
ccdd61
    PID_DIR		default=$VAR_PREFIX/data	FHS=/var/run/mailman
ccdd61
ccdd61
    Existing directories that can now be specified as parameter to configure:
ccdd61
ccdd61
    LOCK_DIR:	default=$VAR_PREFIX/locks	FHS=/var/lock/mailman
ccdd61
    LOG_DIR:	default=$VAR_PREFIX/logs	FHS=/var/log/mailman
ccdd61
    QUEUE_DIR	default=$VAR_PREFIX/qfiles	FHS=/var/spool/mailman
ccdd61
ccdd61
You can find addition documentation in the
ccdd61
@DOC_DIR@/README.* files and/or
ccdd61
@prefix@/README.* files.
ccdd61
ccdd61
Mailman is an open source project and full documentation, current
ccdd61
sources, patches, etc. can be found at the following official mailman
ccdd61
web sites:
ccdd61
ccdd61
http://www.gnu.org/software/mailman/mailman.html
ccdd61
http://www.list.org
ccdd61
ccdd61
1. Final installation instructions:
ccdd61
ccdd61
    Congratulations!  You've installed the Mailman software.  To get
ccdd61
    everything running you need to hook Mailman up to both your web
ccdd61
    server and your mail system.
ccdd61
ccdd61
    - If you plan on running your MTA and web server on different
ccdd61
      machines, sharing Mailman installations via NFS, be sure that
ccdd61
      the clocks on those two machines are synchronized closely.  You
ccdd61
      might take a look at the file Mailman/LockFile.py; the constant
ccdd61
      CLOCK_SLOP helps the locking mechanism compensate for clock skew
ccdd61
      in this type of environment.
ccdd61
ccdd61
    - Configure your web server. The RPM has made the assumption you
ccdd61
      are running the apache web server (httpd). The RPM has installed
ccdd61
      a mailman config file (@HTTPD_CONF_FILE@) in @HTTPD_CONF_DIR@.
ccdd61
      You should edit the file to set your domain, see the
ccdd61
      instructions in the config file.
ccdd61
ccdd61
      Now restart your web server so the new settings take effect:
ccdd61
ccdd61
      % /sbin/service httpd restart
ccdd61
ccdd61
    - Create the site password using:
ccdd61
ccdd61
      % @prefix@/bin/mmsitepass <your-site-password>
ccdd61
ccdd61
      This password can be used anywhere that individual user or
ccdd61
      mailing list administrator passwords are required, giving the
ccdd61
      mailman site administrator the ability to adjust these things
ccdd61
      when necessary.
ccdd61
ccdd61
      You may also want to create a password for the site-wide "list
ccdd61
      creator" role (someone other than the site administrator who as
ccdd61
      privileges to create and remove lists through the web).  Use the
ccdd61
      -c option to mmsitepass to set this.
ccdd61
ccdd61
    - Set the values for DEFAULT_EMAIL_HOST and DEFAULT_URL_HOST in
ccdd61
      @prefix@/Mailman/mm_cfg.py file if the fqdn of the host you are
ccdd61
      running mailman on is not the email and url host you need to use.
ccdd61
ccdd61
    - Update Mailman list files to new verson by running:
ccdd61
      @prefix@/bin/update
ccdd61
ccdd61
      Users upgrading from previous releases of this package may need
ccdd61
      to move their data or adjust the configuration files to point to
ccdd61
      the locations where their data is.
ccdd61
ccdd61
    - Create a "site-wide" mailing list (Note: this must be done
ccdd61
      before starting the mailman daemon). This is the one that
ccdd61
      password reminders will appear to come from.  Usually this
ccdd61
      should be the "mailman" mailing list, but if you need to change
ccdd61
      this, be sure to change the MAILMAN_SITE_LIST variable in
ccdd61
      mm_cfg.py (see below).
ccdd61
ccdd61
      % @prefix@/bin/newlist mailman
ccdd61
ccdd61
      Follow the prompts, and see the README file for more
ccdd61
      information.
ccdd61
ccdd61
    - Start the Mailman qrunner daemon
ccdd61
ccdd61
      As of mailman version 2.1 mailman requires a service (daemon) to be
ccdd61
      run for mailman to operate. RedHat does not ship RPM's that enable
ccdd61
      services as part of package installation. You will need to enable
ccdd61
      the mailman service if you want mailman to run.
ccdd61
ccdd61
      To enable the mailman service after package installation you may run
ccdd61
      the "serviceconf" GUI tool, or you may do the following on the
ccdd61
      command line as root.
ccdd61
ccdd61
      /sbin/service mailman start
ccdd61
ccdd61
      To have the mailman service automatically start at certain run
ccdd61
      levels (replace the runlevel below with your desired run levels, for
ccdd61
      example to start mailman at run levels 3 and 5 runlevel would be 35:
ccdd61
ccdd61
      /sbin/chkconfig --level runlevel mailman on
ccdd61
ccdd61
    - You should then subscribe yourself to the mailman list.
ccdd61
ccdd61
ccdd61
2. Customize Mailman
ccdd61
ccdd61
    You should do these steps using the account you installed Mailman
ccdd61
    under in section 2 above.
ccdd61
ccdd61
    - The file @prefix@/Mailman/Defaults.py contains a number of
ccdd61
      defaults for your installation.  If any of these are incorrect,
ccdd61
      override them in @prefix@/Mailman/mm_cfg.py.
ccdd61
ccdd61
      DO NOT EDIT Defaults.py!
ccdd61
ccdd61
      Note: If you have upgraded your mailman installation RPM will
ccdd61
      save a copy of your previous version of mm_cfg.py in
ccdd61
      mm_cfg.py.rpmsave.
ccdd61
ccdd61
      See the comments in Defaults.py for details.  Once a list is
ccdd61
      created, editing many of these variables will have no effect.
ccdd61
      At that point, you'll need to configure your lists through the
ccdd61
      web admin interface or through the command line script
ccdd61
      @prefix@/bin/withlist or @prefix@/bin/config_list.
ccdd61
ccdd61
      Note: Do *not* change HOME_DIR or MAILMAN_DIR.  These are set
ccdd61
      automatically by the configure script when the RPM was created.
ccdd61
ccdd61
    - Create the site password using:
ccdd61
ccdd61
      % @prefix@/bin/mmsitepass <your-site-password>
ccdd61
ccdd61
      This password can be used anywhere that individual user or
ccdd61
      mailing list administrator passwords are required, giving the
ccdd61
      mailman site administrator the ability to adjust these things
ccdd61
      when necessary.
ccdd61
ccdd61
      You may also want to create a password for the site-wide "list
ccdd61
      creator" role (someone other than the site administrator who as
ccdd61
      privileges to create and remove lists through the web).  Use the
ccdd61
      -c option to mmsitepass to set this.
ccdd61
ccdd61
ccdd61
3. Troubleshooting
ccdd61
ccdd61
    If you encounter problems with running Mailman, first check the
ccdd61
    "Common Problems" section, below.  If your problem is not covered
ccdd61
    there, check both the FAQ file and the online FAQ Wizard.
ccdd61
    Check for errors in the mailman log files which can be found in
ccdd61
ccdd61
    @LOG_DIR@
ccdd61
ccdd61
    Mailman logs errors to this file:
ccdd61
ccdd61
    @LOG_DIR@/error
ccdd61
ccdd61
    If you encounter an error, send an error report to
ccdd61
    mailman-users@python.org.  Include a description of what you're
ccdd61
    doing to cause the problem, and the relevant lines from your
ccdd61
    syslog.  Also include information on your operating system, which
ccdd61
    version of Python you're using, and which version of Mailman
ccdd61
    you're installing.
ccdd61
ccdd61
ccdd61
4. Common Problems
ccdd61
ccdd61
    Problem:  All Mailman web pages give a 404 File not found error.
ccdd61
ccdd61
    Solution: Your web server has not been set up properly for handling
ccdd61
              Mailman's cgi commands.  Make sure you've:
ccdd61
ccdd61
              1) Configured the web server to give permissions to
ccdd61
                 @prefix@/cgi-bin
ccdd61
              2) Restarted the web server properly.
ccdd61
ccdd61
              Consult your web server's documentation for instructions
ccdd61
              on how to do these things.
ccdd61
ccdd61
ccdd61
    Problem:  All Mailman web pages give an "Internal Server Error".
ccdd61
ccdd61
    Solution: The likely problem is that you are using the wrong GID or
ccdd61
              UID for CGI scripts.  Check your syslog.  If you see, for
ccdd61
              example, a line like:
ccdd61
ccdd61
                  Attempt to exec script with invalid gid 51, expected 99
ccdd61
ccdd61
              You need to reinstall Mailman, and specify $CGI_GID to be 51,
ccdd61
              as described in the installation instructions.
ccdd61
ccdd61
ccdd61
    Problem:  I send mail to the list, and get back mail saying the
ccdd61
              list is not found!
ccdd61
ccdd61
    Solution: You probably didn't add the necessary aliases to the system
ccdd61
              alias database, given to you when you ran the newlist
ccdd61
              command.  If you did add them, you likely did not update
ccdd61
              the alias database, or your system requires you to run
ccdd61
              newaliases explicitly.  Refer to section 5 above for
ccdd61
              more information.
ccdd61
ccdd61
ccdd61
    Problem:  I send mail to the list, and get back mail saying,
ccdd61
              "unknown mailer error".
ccdd61
ccdd61
    Solution: The likely problem is that you are using the wrong GID or
ccdd61
              UID for mail.  Check your syslog.  If you see, for
ccdd61
              example, a line like:
ccdd61
ccdd61
                  Attempt to exec script with invalid gid 51, expected 99
ccdd61
ccdd61
              You need to reinstall Mailman, and specify $MAIL_GID to
ccdd61
              be 51, as described in the installation
ccdd61
              instructions. see notes on Postfix below, as by default
ccdd61
              it will create these problems on installation.
ccdd61
ccdd61
ccdd61
    Problem:  I use Postfix for my MTA and the mail wrapper programs
ccdd61
              are logging complaints about the wrong GID.
ccdd61
ccdd61
    Solution: Create a separate aliases file for Postfix in its
ccdd61
              main.cf config file under the variable "alias_maps". Put
ccdd61
              the file somewhere in Mailman's home directory, or
ccdd61
              somewhere else where the user mailman has write access
ccdd61
              to it; *as user mailman* call Postfix's "postalias" on the
ccdd61
              alias file.
ccdd61
ccdd61
              % postalias <the alias file>
ccdd61
ccdd61
              Also as user mailman, run
ccdd61
ccdd61
              % python -c'import os; print os.getgid()'
ccdd61
ccdd61
              This should print out the group id that Mailman should
ccdd61
              be configured to expect when the mail wrapper programs
ccdd61
              are run.  Call it "thegid".  Rebuild Mailman with
ccdd61
ccdd61
              % ./configure --with-mail-gid=thegid
ccdd61
ccdd61
              See also the "Using the Postfix mail server" section of
ccdd61
              the mailman installation manual for more information on
ccdd61
              connecting Postfix and Mailman.  The manual is available
ccdd61
              in several formats at /usr/share/doc/mailman-*/admin/www.
ccdd61
ccdd61
ccdd61
    Problem:  I send mail to the list, and get back mail saying,
ccdd61
              "sh: mailman not available for sendmail programs"
ccdd61
ccdd61
    Solution: Your system uses sendmail restricted shell (smrsh).  You
ccdd61
              need to configure smrsh by creating a symbolic link from
ccdd61
              the mail wrapper (@prefix@/mail/mailman) to the directory
ccdd61
              identifying executables allowed to run under smrsh.
ccdd61
ccdd61
              Some common names for this directory are
ccdd61
              /var/admin/sm.bin, /usr/admin/sm.bin or /etc/smrsh.
ccdd61
ccdd61
              Note that on Debian Linux, the system makes
ccdd61
              /usr/lib/sm.bin, which is wrong, you will need to create
ccdd61
              the directory /usr/admin/sm.bin and add the link there.
ccdd61
              Note further any aliases newaliases spits out will need
ccdd61
              to be adjusted to point to the secure link to the
ccdd61
              wrapper.
ccdd61
ccdd61
ccdd61
    Problem:  I messed up when I called configure.  How do I clean
ccdd61
              things up and re-install?
ccdd61
ccdd61
    Solution: % make clean
ccdd61
              % ./configure --with-the-right-options
ccdd61
              % make install
ccdd61
ccdd61
ccdd61
-------------------- Other Useful Information -----------------
ccdd61
ccdd61
RPM Preserves User Modified Files
ccdd61
---------------------------------
ccdd61
ccdd61
The rpm during installation will preserve changes you have made to
ccdd61
configuration files and templates from a previous installation. This
ccdd61
is almost always what is desired. However you may want to check for
ccdd61
the existence of files with either the .rpmsave or the .rpmnew
ccdd61
extension and verify if any of these backup files created during the
ccdd61
RPM install exist and if you are indeed using the version of the file
ccdd61
you desire.
ccdd61
ccdd61
Note: The installation directory for non-data files changed from
ccdd61
@VAR_PREFIX@ to @prefix@ in mailman-2.1.5-20. Configuration files and
ccdd61
templates that were user modified in a previous installation will need
ccdd61
to manually move those changes from the earlier @VAR_PREFIX@ to the
ccdd61
new @prefix@ installation directory.
ccdd61
ccdd61
Here are a few commands that will aid you in this process:
ccdd61
ccdd61
List any rpm backup files in the mailman installation directory:
ccdd61
ccdd61
% find @prefix@ @VAR_PREFIX@ -name '*.rpm*'
ccdd61
ccdd61
List any configuration files NOT in the mailman installation directory
ccdd61
you might miss with the above command which also have the potental for
ccdd61
backup copies. Given this short list you'll have to look for a
ccdd61
matching backup file.
ccdd61
ccdd61
% rpm -qc mailman | egrep -v '@prefix@|@VAR_PREFIX@'
ccdd61
ccdd61
When rpm preserves a user modified file it installs the newest version
ccdd61
of the file by appending the .rpmnew extension to the file name thus
ccdd61
preserving the file but making the latest version avialable. If rpm
ccdd61
replaces a user modified file the file being replaced is renamed to
ccdd61
have the .rpmsave extension. RPM only performs these backup operations
ccdd61
if the file is marked as being a configuration file in the rpm spec
ccdd61
file, it is not performed in general on all files in the package.
ccdd61
ccdd61
ccdd61
Mailman Cron Jobs:
ccdd61
------------------
ccdd61
ccdd61
Mailman relies on the cron daemon to schedule periodic actions. These
ccdd61
are contained in a crontab file. Previous versions of the mailman RPM
ccdd61
from Red Hat created the cron jobs by running the crontab(1) command
ccdd61
during the RPM installation phase. The cron jobs are now handled
ccdd61
slightly differently. Rather than invoking crontab which loaded the
ccdd61
cron jobs into a private cron file a mailman crontab file is installed
ccdd61
into /etc/cron.d. The crontab file and the commands it runs were
ccdd61
modified from the upstream distribution so these commands would run
ccdd61
under the correct SELinux security profile.
ccdd61
ccdd61
Previously the cron jobs were installed when the RPM was
ccdd61
installed. This was less than optimal because the act of having the
ccdd61
mailman RPM installed on a system should not cause the cron jobs to
ccdd61
run. A better solution is to only run the mailman cron jobs if the
ccdd61
mailman service is enabled. This is accomplished by installing the
ccdd61
mailman crontab file in /etc/cron.d when the mailman service is
ccdd61
started by mailman init.d script (e.g. either at boot time or via
ccdd61
/sbin/service). When the mailman service is stopped the crontab file
ccdd61
is removed from /etc/cron.d. The crontab file is copied from
ccdd61
@prefix@/cron/crontab.in to /etc/cron.d/mailman. Thus if you edit the
ccdd61
cron jobs you will need to edit the master copy in @prefix@/cron
ccdd61
otherwise your edits will be lost the next time the mailman service is
ccdd61
started or restarted. To pick up any changes made to the crontab file
ccdd61
edit the master copy in @prefix@/cron and then use /sbin/service to
ccdd61
restart mailman (e.g. /sbin/service mailman restart). Some may wonder
ccdd61
why the crontab file in /etc/cron.d is not symbolically linked to the
ccdd61
master copy when the service starts and unlinked when it stops. The
ccdd61
reason is because newer versions of cron will refuse for security
ccdd61
reasons to run any crontabs which are links to other files or
ccdd61
writeable by anybody else except root.
ccdd61
ccdd61
Choosing your MTA (sendmail or postfix) on Red Hat Systems:
ccdd61
-----------------------------------------------------------
ccdd61
ccdd61
Red Hat ships two different MTA's, sendmail and postfix. Because the
ccdd61
sendmail and postfix rpms's share file names when installed the
ccdd61
conflict is accomodated by utilizing the "alternatives" mechanism
ccdd61
which manages a set of links. When one of the MTA's is selected via
ccdd61
/usr/sbin/alternatives links are established which point to the
ccdd61
correct files for that MTA. There are two ways to select your MTA:
ccdd61
The system-switch-mail package contains a GUI front end to the
ccdd61
alternatives mechanism and /usr/bin/system-switch-mail is an easy way
ccdd61
to select your MTA, or you can invoke alternatives directly like this:
ccdd61
ccdd61
% /usr/sbin/alternatives --config mta
ccdd61
ccdd61
Note: Selecting your preferred MTA is distinct from configuring the
ccdd61
MTA, you will need to consult the documentation for the MTA you
ccdd61
selected for information on how to configure it.
ccdd61
ccdd61

ccdd61
Local Variables:
ccdd61
mode: indented-text
ccdd61
indent-tabs-mode: nil
ccdd61
End: