# WARNING! This configuration file is managed by Puppet.
# All changes will be discarded on the next Puppet run.

# -*- python -*-

# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

"""This module contains your site-specific settings.

From a brand new distribution it should be copied to mm_cfg.py.  If you
already have an mm_cfg.py, be careful to add in only the new settings you
want.  Mailman's installation procedure will never overwrite your mm_cfg.py
file.

The complete set of distributed defaults, with documentation, are in the file
Defaults.py.  In mm_cfg.py, override only those you want to change, after the

  from Defaults import *

line (see below).

Note that these are just default settings; many can be overridden via the
administrator and user interfaces on a per-list or per-user basis.

"""

###############################################
# Here's where we get the distributed defaults.

from Defaults import *
import pwd, grp

##################################################
# Put YOUR site-specific settings below this line.

#ATTENTION: when you use SELinux, mailman might not
#be able to recompile the configuration file
#due to policy settings. If this is the case,
#please run (as root) the supplied "mailman-update-cfg" script

##############################################################
#    Here's where we override shipped defaults with settings #
#    suitable for the RPM package.                           #
MAILMAN_UID = pwd.getpwnam('<%= @mm_username %>')[2]
MAILMAN_GID = grp.getgrnam('<%= @mm_groupname %>')[2]

##############################################################
#    Set URL and email domain names                          #
#
# Mailman needs to know about (at least) two fully-qualified domain
# names (fqdn)
#
# 1) the hostname used in your urls (DEFAULT_URL_HOST)
# 2) the hostname used in email addresses for your domain (DEFAULT_EMAIL_HOST)
#
# For example, if people visit your Mailman system with
# "http://www.dom.ain/mailman" then your url fqdn is "www.dom.ain",
# and if people send mail to your system via "yourlist@dom.ain" then
# your email fqdn is "dom.ain".  DEFAULT_URL_HOST controls the former,
# and DEFAULT_EMAIL_HOST controls the latter.  Mailman also needs to
# know how to map from one to the other (this is especially important
# if you're running with virtual domains).  You use
# "add_virtualhost(urlfqdn, emailfqdn)" to add new mappings.

# Default to using the FQDN of machine mailman is running on.

DEFAULT_URL_HOST   = '<%= @default_url_host %>'
DEFAULT_EMAIL_HOST = '<%= @default_email_host %>'
DEFAULT_URL_PATTERN = '<%= @default_url_pattern %>'
MAILMAN_SITE_LIST = '<%= @mailman_site_list %>'

# Because we've overriden the virtual hosts above add_virtualhost
# MUST be called after they have been defined.

add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)


##############################################################
# Put YOUR site-specific configuration below, in mm_cfg.py . #
# See Defaults.py for explanations of the values.        #

# Note - if you're looking for something that is imported from mm_cfg, but you
# didn't find it above, it's probably in Defaults.py.

# Puppet outputs booleans with lowercase, Python needs uppercase,
# so let's just make them equivalent.
false = False
true  = True

VAR_PREFIX    = '<%= @var_prefix %>'

LANGUAGE      = '<%= @language %>'
<% if @mta == 'None' -%>
MTA           = None
<% else -%>
MTA           = '<%= @mta %>'
<% end %>

LOG_DIR       = '<%= @log_dir %>'
LOCK_DIR      = '<%= @lock_dir %>'
PID_DIR       = '<%= @pid_dir %>'
PID_FILE      = '<%= @pid_file %>'
WRAPPER_DIR   = '<%= @wrapper_dir %>'
DATA_DIR      = '<%= @data_dir %>'
LIST_DATA_DIR = '<%= @list_data_dir %>'
BIN_DIR       = '<%= @bin_dir %>'
SCRIPTS_DIR   = '<%= @scripts_dir %>'
TEMPLATE_DIR  = '<%= @template_dir %>'
MESSAGES_DIR  = '<%= @messages_dir %>'

# config_dir isn't part of standard Mailman, it's only used by Red Hat
# Here we manually override SITE_PW_FILE and LISTCREATOR_PW_FILE
# But need to include config_dir so that aliasfile and virtfile are
# defined in the correct location in MTA/Postfix.py.
CONFIG_DIR    = '<%= @config_dir %>'

SITE_PW_FILE        = '<%= @site_pw_file %>'
LISTCREATOR_PW_FILE = '<%= @creator_pw_file %>'

PRIVATE_ARCHIVE_FILE_DIR = '<%= @private_archive_file_dir %>'
PUBLIC_ARCHIVE_FILE_DIR  = '<%= @public_archive_file_dir %>'

QUEUE_DIR       = '<%= @queue_dir %>'
INQUEUE_DIR     = '<%= @queue_dir %>/in'
OUTQUEUE_DIR    = '<%= @queue_dir %>/out'
CMDQUEUE_DIR    = '<%= @queue_dir %>/commands'
BOUNCEQUEUE_DIR = '<%= @queue_dir %>/bounces'
NEWSQUEUE_DIR   = '<%= @queue_dir %>/news'
ARCHQUEUE_DIR   = '<%= @queue_dir %>/archive'
SHUNTQUEUE_DIR  = '<%= @queue_dir %>/shunt'
VIRGINQUEUE_DIR = '<%= @queue_dir %>/virgin'
BADQUEUE_DIR    = '<%= @queue_dir %>/bad'
RETRYQUEUE_DIR  = '<%= @queue_dir %>/retry'
MAILDIR_DIR     = '<%= @queue_dir %>/maildir'

VIRTUAL_HOST_OVERVIEW = <%= @virtual_host_overview %>

SMTP_MAX_RCPTS = <%= @smtp_max_rcpts %>

<% @option_hash.keys.sort.each do |key| -%>
<%= key %> = <%= @option_hash[key] %>
<% end -%>
