areguera / rpms / mailman

Forked from rpms/mailman 4 years ago
Clone

Blame SOURCES/mm_cfg.py

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