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