Blame SOURCES/mailman.INSTALL.REDHAT.in

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