a3d59b
# -*- python -*-
a3d59b
a3d59b
# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
a3d59b
#
a3d59b
# This program is free software; you can redistribute it and/or
a3d59b
# modify it under the terms of the GNU General Public License
a3d59b
# as published by the Free Software Foundation; either version 2
a3d59b
# of the License, or (at your option) any later version.
a3d59b
# 
a3d59b
# This program is distributed in the hope that it will be useful,
a3d59b
# but WITHOUT ANY WARRANTY; without even the implied warranty of
a3d59b
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
a3d59b
# GNU General Public License for more details.
a3d59b
# 
a3d59b
# You should have received a copy of the GNU General Public License
a3d59b
# along with this program; if not, write to the Free Software 
a3d59b
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
a3d59b
a3d59b
"""This module contains your site-specific settings.
a3d59b
a3d59b
From a brand new distribution it should be copied to mm_cfg.py.  If you
a3d59b
already have an mm_cfg.py, be careful to add in only the new settings you
a3d59b
want.  Mailman's installation procedure will never overwrite your mm_cfg.py
a3d59b
file.
a3d59b
a3d59b
The complete set of distributed defaults, with documentation, are in the file
a3d59b
Defaults.py.  In mm_cfg.py, override only those you want to change, after the
a3d59b
a3d59b
  from Defaults import *
a3d59b
a3d59b
line (see below).
a3d59b
a3d59b
Note that these are just default settings; many can be overridden via the
a3d59b
administrator and user interfaces on a per-list or per-user basis.
a3d59b
a3d59b
"""
a3d59b
a3d59b
###############################################
a3d59b
# Here's where we get the distributed defaults.
a3d59b
a3d59b
from Defaults import *
a3d59b
import pwd, grp
a3d59b
a3d59b
##################################################
a3d59b
# Put YOUR site-specific settings below this line.
a3d59b
a3d59b
#ATTENTION: when you use SELinux, mailman might not
a3d59b
#be able to recompile the configuration file 
a3d59b
#due to policy settings. If this is the case,
a3d59b
#please run (as root) the supplied "mailman-update-cfg" script
a3d59b
a3d59b
##############################################################
a3d59b
#    Here's where we override shipped defaults with settings #
a3d59b
#    suitable for the RPM package.                           #
a3d59b
MAILMAN_UID = pwd.getpwnam('mailman')[2]
a3d59b
MAILMAN_GID = grp.getgrnam('mailman')[2]
a3d59b
a3d59b
##############################################################
a3d59b
#    Set URL and email domain names                          #
a3d59b
# 
a3d59b
# Mailman needs to know about (at least) two fully-qualified domain
a3d59b
# names (fqdn)
a3d59b
#
a3d59b
# 1) the hostname used in your urls (DEFAULT_URL_HOST)
a3d59b
# 2) the hostname used in email addresses for your domain (DEFAULT_EMAIL_HOST)
a3d59b
#
a3d59b
# For example, if people visit your Mailman system with
a3d59b
# "http://www.dom.ain/mailman" then your url fqdn is "www.dom.ain",
a3d59b
# and if people send mail to your system via "yourlist@dom.ain" then
a3d59b
# your email fqdn is "dom.ain".  DEFAULT_URL_HOST controls the former,
a3d59b
# and DEFAULT_EMAIL_HOST controls the latter.  Mailman also needs to
a3d59b
# know how to map from one to the other (this is especially important
a3d59b
# if you're running with virtual domains).  You use
a3d59b
# "add_virtualhost(urlfqdn, emailfqdn)" to add new mappings.
a3d59b
a3d59b
# Default to using the FQDN of machine mailman is running on.
a3d59b
# If this is not correct for your installation delete the following 5
a3d59b
# lines that acquire the FQDN and manually edit the hosts instead.
a3d59b
a3d59b
from socket import *
a3d59b
try:
a3d59b
    fqdn = getfqdn()
a3d59b
except:
a3d59b
    fqdn = 'mm_cfg_has_unknown_host_domains'
a3d59b
a3d59b
DEFAULT_URL_HOST   = fqdn
a3d59b
DEFAULT_EMAIL_HOST = fqdn
a3d59b
a3d59b
# Because we've overriden the virtual hosts above add_virtualhost
a3d59b
# MUST be called after they have been defined.
a3d59b
a3d59b
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
a3d59b
a3d59b
a3d59b
##############################################################
a3d59b
# Put YOUR site-specific configuration below, in mm_cfg.py . #
a3d59b
# See Defaults.py for explanations of the values.	     #
a3d59b
a3d59b
# Note - if you're looking for something that is imported from mm_cfg, but you
a3d59b
# didn't find it above, it's probably in Defaults.py.