summaryrefslogtreecommitdiff
path: root/Mailman/Defaults.py.in
blob: 5a486a2135bd61c8a945812c24fabd188b9fc1cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
# -*- python -*-

# Copyright (C) 1998,1999,2000 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.

"""Distributed default settings for significant Mailman config variables.

You should NOT edit the values here unless you're changing settings for
distribution.  For site-specific settings, put your definitions in
mm_cfg.py after the point at which it includes (via 'from ... import *')
this file, to override the distributed defaults with site-specific ones.
"""

import os

# Should image logos be used?  Set this to false to disable image logos from
# "our sponsors" and just use textual links instead.  Otherwise, this should
# contain the URL base path to the logo images (and must contain the trailing
# slash)..  If you want to disable Mailman's logo footer altogther, hack
# Mailman/htmlformat.py:MailmanLogo(), which also contains the hardcoded links
# and image names.
IMAGE_LOGOS = '/icons/'

# Don't change MAILMAN_URL, unless you want to point it at the list.org
# mirror.
MAILMAN_URL = 'http://www.gnu.org/software/mailman/mailman.html'
#MAILMAN_URL = 'http://www.list.org/'

# Site-specific settings
DEFAULT_HOST_NAME   = '@FQDN@'
DEFAULT_URL         = 'http://@URL@/mailman/'
PUBLIC_ARCHIVE_URL  = '/pipermail'
PRIVATE_ARCHIVE_URL = '/mailman/private'

DEFAULT_ARCHIVE_PRIVATE    = 0		# 0=public, 1=private

# ARCHIVE_TO_MBOX
#-1 - do not do any archiving
# 0 - do not archive to mbox, use builtin mailman html archiving only
# 1 - archive to mbox to use an external archiving mechanism only
# 2 - archive to both mbox and builtin mailman html archiving -
#     use this to make both external archiving mechanism work and
#     mailman's builtin html archiving.  the flat mail file can be
#     useful for searching, external archivers, etc.
#
ARCHIVE_TO_MBOX = 2

# 0 - yearly
# 1 - monthly
# 2 - quarterly
# 3 - weekly
# 4 - daily
#
DEFAULT_ARCHIVE_VOLUME_FREQUENCY = 1

# These variables control the use of an external archiver.  Normally if
# archiving is turned on (see ARCHIVE_TO_MBOX above and the list's archive*
# attributes) the internal Pipermail archiver is used.  This is the default if
# both of these variables are set to false.  When either is set, the value
# should be a shell command string which will get passed to os.popen().  This
# string can contain %(listname)s for dictionary interpolation.  The name of
# the list being archived will be substituted for this.
#
# Note that if you set one of these variables, you should set both of them
# (they can be the same string).  This will mean your external archiver will
# be used regardless of whether public or private archives are selected.
PUBLIC_EXTERNAL_ARCHIVER = 0
PRIVATE_EXTERNAL_ARCHIVER = 0


# Set this to 1 to enable gzipping of the downloadable archive .txt file.
# Note that this is /extremely/ inefficient, so an alternative is to just
# collect the messages in the associated .txt file and run a cron job every
# night to generate the txt.gz file.  See cron/nightly_gzip for details.
GZIP_ARCHIVE_TXT_FILES = 0


HOME_PAGE         = 'index.html'
MAILMAN_OWNER     = 'mailman-owner@%s' % DEFAULT_HOST_NAME


# System ceiling on number of batches into which deliveries are divided:
MAX_SPAWNS        = 40

#
# Ceiling on the number of recipients that can be specified in a single
# smtp transaction.  Set to 0 to relay the entire recipient list in one
# transaction.
SMTP_MAX_RCPTS = 500

# Delivery module for the message pipeline.  See
# Mailman/Handlers/HandlerAPI.py for details.  Unless overridden specifically
# in that module, this handler is used for message delivery to the list, and
# to an individual user.  This value must be a string naming a module in the
# Mailman.Handlers package.
#DELIVERY_MODULE = 'Sendmail'
DELIVERY_MODULE = 'SMTPDirect'

# Command for direct command pipe delivery to sendmail compatible program,
# when DELIVERY_MODULE is 'Sendmail'.
SENDMAIL_CMD = '/usr/lib/sendmail'

# SMTP host and port, when DELIVERY_MODULE is 'SMTPDirect'
SMTPHOST	  = 'localhost'
SMTPPORT          = 0                             # default from smtplib

# 1 to use crypt for passwords instead of md5.
# Crypt may not work on all python installs.
# Don't change this value once you have lists running...
# In fact, you should just let configure set this one and leave it alone.
USE_CRYPT         = 1

			 # General Defaults #

# When allowing only members to post to a mailing list, how is the sender of
# the message determined?  If this variable is set to 1, then first the
# message's envelope sender is used, with a fallback to the sender if there is 
# no envelope sender.  Set this variable to 0 to always use the sender.
#
# The envelope sender is set by the SMTP delivery and is thus less easily
# spoofed than the sender, which is typically just taken from the From: header 
# and thus easily spoofed by the end-user.  However, sometimes the envelope
# sender isn't set correctly and this will manifest itself by postings being
# held for approval even if they appear to come from a list member.  If you
# are having this problem, set this variable to 0, but understand that some
# spoofed messages may get through.
USE_ENVELOPE_SENDER = 0

# When true, mailman will consider user@host.domain to be the same address
# as user@domain.  If set to 0, mailman will consider user@host.domain to 
# be the same address as user@Host.DoMain, but different than user@domain.
# Usernames will be case preserved, and host parts of addresses will all be
# lowercased.
SMART_ADDRESS_MATCH = 1
# When set, the listinfo web page overview of lists on the machine will be
# confined to only those lists whose web_page_url configuration option host
# is included within the URL by which the page is visited - only those "on
# the virtual host".  If unset, then all lists are included in the
# overview.  (The admin page overview always includes all the lists.)
VIRTUAL_HOST_OVERVIEW = 1
DEFAULT_FILTER_PROG = ''                # Currently not used!
# Default number of batches in which to divide large deliveries:
DEFAULT_NUM_SPAWNS = 5
DEFAULT_LIST_ADVERTISED = 1
DEFAULT_MAX_NUM_RECIPIENTS = 10
DEFAULT_MAX_MESSAGE_SIZE = 40		# KB

# These format strings will be expanded w.r.t. the dictionary for the
# mailing list instance.
DEFAULT_SUBJECT_PREFIX  = "[%(real_name)s] "
DEFAULT_MSG_HEADER = ""
DEFAULT_MSG_FOOTER = """_______________________________________________
%(real_name)s mailing list
%(real_name)s@%(host_name)s
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
"""

# Mail command processor will ignore mail command lines after designated max.
DEFAULT_MAIL_COMMANDS_MAX_LINES = 25

		     # List Accessibility Defaults #

# Is admin notified of admin requests immediately by mail, as well as by
# daily pending-request reminder?
DEFAULT_ADMIN_IMMED_NOTIFY = 1
#
# Is admin notified of subscribes/unsubscribes?
#
DEFAULT_ADMIN_NOTIFY_MCHANGES = 0

DEFAULT_MODERATED = 0

# Bounce if 'to' or 'cc' fields don't explicitly name list (anti-spam)?
DEFAULT_REQUIRE_EXPLICIT_DESTINATION = 1
# Alternate names acceptable as explicit destinations for this list.
DEFAULT_ACCEPTABLE_ALIASES ="""
"""
# For mailing lists that have only other mailing lists for members:
DEFAULT_UMBRELLA_LIST = 0
# For umbrella lists, the suffix for the account part of address for
# administrative notices (subscription confirmations, password reminders):
DEFAULT_UMBRELLA_MEMBER_ADMIN_SUFFIX = "-owner"
# This variable controlls whether monthly password reminders are sent.
DEFAULT_SEND_REMINDERS = 1
# Send welcome messages to new users?  Probably should keep this set to 1.
DEFAULT_SEND_WELCOME_MSG = 1
# Wipe sender information, and make it look like the list-admin
# address sends all messages
DEFAULT_ANONYMOUS_LIST = 0
# {header-name: regexp} spam filtering - we include some for example sake.
DEFAULT_BOUNCE_MATCHING_HEADERS = """
# Lines that *start* with a '#' are comments.
to: friend@public.com
message-id: relay.comanche.denmark.eu
from: list@listme.com
from: .*@uplinkpro.com
"""
# Replies to posts inherently directed to list or original sender?
DEFAULT_REPLY_GOES_TO_LIST = 0

# SUBSCRIBE POLICY
# 0 - open list (only when ALLOW_OPEN_SUBSCRIBE is set to 1) **
# 1 - confirmation required for subscribes
# 2 - admin approval required for subscribes
# 3 - both confirmation and admin approval required
#
# ** please do not choose option 0 if you are not allowing open
# subscribes (next variable)
DEFAULT_SUBSCRIBE_POLICY = 1
# does this site allow completely unchecked subscriptions?
ALLOW_OPEN_SUBSCRIBE = 0

# Private_roster == 0: anyone can see, 1: members only, 2: admin only.
DEFAULT_PRIVATE_ROSTER = 0
# When exposing members, make them unrecognizable as email addrs, so
# web-spiders can't pick up addrs for spam purposes.
DEFAULT_OBSCURE_ADDRESSES = 1
# Make it 1 when it works.
DEFAULT_MEMBER_POSTING_ONLY = 0

		     # Digestification Defaults #

# Will list be available in non-digested form?
DEFAULT_NONDIGESTABLE = 1
# Will list be available in digested form?
DEFAULT_DIGESTABLE = 1
DEFAULT_DIGEST_HEADER = ""
DEFAULT_DIGEST_FOOTER = DEFAULT_MSG_FOOTER

DEFAULT_DIGEST_IS_DEFAULT = 0
DEFAULT_MIME_IS_DEFAULT_DIGEST = 0
DEFAULT_DIGEST_SIZE_THRESHHOLD = 30	# KB
DEFAULT_DIGEST_SEND_PERIODIC = 1
DEFAULT_PLAIN_DIGEST_KEEP_HEADERS = ['message', 'date', 'from',
                                     'subject', 'to', 'cc',
                                     'reply-to', 'organization']

		    # Bounce Processing Defaults #

# Should we do any bounced mail response at all?
DEFAULT_BOUNCE_PROCESSING = 1
# Minimum number of days that address has been undeliverable before 
# we take the automatic bounce action.
DEFAULT_MINIMUM_REMOVAL_DATE = 5
# Minimum number of delivery failure notices for an account before we
# consider doing the automatic bounce action.
DEFAULT_MINIMUM_POST_COUNT_BEFORE_BOUNCE_ACTION = 3
# 0 means do nothing
# 1 means disable and send admin a report,
# 2 means nuke'em (remove) and send admin a report,
# 3 means nuke 'em and don't report (whee:)
DEFAULT_AUTOMATIC_BOUNCE_ACTION = 1
# Maximum number of posts that can go by w/o a bounce before we figure 
# delivery failures to a particular recipient have been resolved.  This
# needs to account for the big lag between delivery attempt and issuance of 
# the failure notice.  We recommend a value representing the maximum number
# of messages you'd reasonably expect an average list to get in 1 hour.
DEFAULT_MAX_POSTS_BETWEEN_BOUNCES = 5

DEFAULT_ADMINISTRIVIA = 1

# How long the cookie authorizing administrative changes via the admin cgi
# lasts before it needs to be reauthenticated (ie, password demanded).
ADMIN_COOKIE_LIFE = 60 * 60 * 3         # 3 hours

# How long subscriptions request should await confirmation before being
# dropped.
PENDING_REQUEST_LIFE = 60 * 60 * 24 * 3 # 3 days


# These variables control certain aspects of MailList lock acquisition and
# retention.  They should be tuned as appropriate for your environment.  All
# variables are specified in units of floating point seconds.
#
# LIST_LOCK_DEBUGGING specifies whether lock debug messages should be written
# to logs/locks.  If you think you're having lock problems, or just want to
# tune the locks for your system, turn on lock debugging.
#
# LIST_LOCK_LIFETIME specifies how long the lock will be retained for a
# specific operation on a mailing list.  Watch your logs/lock file and if you
# see a lot of lock breakages, you might need to bump this up.  However if you
# set this too high, a faulty script (or incorrect use of bin/withlist) can
# prevent the list from being used until the lifetime expires.
#
# LIST_LOCK_TIMEOUT specifies how long an attempt will be made to acquire a
# list lock.  If the lock acquisition times out, the operation will fail.
# Most entry-level scripts that handle messages will safely queue the message
# for another attempt later, but this is currently not as well tested as it
# should be.  If you're using an MTA, such as Postfix, that has its own
# command time out limit, make sure this lock timeout is set sufficiently
# below that value.  Postfix for example kills it's filter processes with
# SIGKILL, which can't be caught, and if triggered, can cause message loss.
LIST_LOCK_DEBUGGING = 0
LIST_LOCK_LIFETIME = 120
# Postfix's default command_time_limit is 1000 seconds.
LIST_LOCK_TIMEOUT = 500

# how many members to display at a time on the admin cgi to unsubscribe
# them or change their options.
DEFAULT_ADMIN_MEMBER_CHUNKSIZE = 30

# how many bytes of a held message post should be displayed in the admindb web
# page?  Use a negative number to indicate the entire message, regardless of
# size (though this will slow down rendering those pages).
ADMINDB_PAGE_TEXT_LIMIT = 4096


# These directories are used to find various important files in the Mailman
# installation.  PREFIX and EXEC_PREFIX are set by configure and should point
# to the installation directory of the Mailman package.
#
# Do not override these in mm_cfg.py!

PYTHON  	= '@PYTHON@'
PREFIX  	= '@prefix@'
EXEC_PREFIX	= '@exec_prefix@'

# Work around a bogus autoconf 2.12 bug
if EXEC_PREFIX == '${prefix}':
    EXEC_PREFIX = PREFIX

# CGI extension, change using configure script
CGIEXT = '@CGIEXT@'


# Don't change anything from here down unless you know what you're doing...


# Enumeration for types of configurable variables in Mailman.
Toggle    = 1
Radio     = 2
String    = 3
Text      = 4
Email     = 5
EmailList = 6
Host      = 7
Number    = 8
FileUpload =9

# Standard text field width
TEXTFIELDWIDTH = 40

# could add Directory and URL


# Bitfield for user options
Digests             = 0 # handled by other mechanism, doesn't need a flag.
DisableDelivery     = 1
DontReceiveOwnPosts = 2 # Non-digesters only
AcknowledgePosts    = 4
DisableMime         = 8 # Digesters only
ConcealSubscription = 16


LIST_DATA_DIR	= os.path.join(PREFIX, 'lists')
HTML_DIR	= os.path.join(PREFIX, 'public_html')
CGI_DIR 	= os.path.join(EXEC_PREFIX, 'cgi-bin')
LOG_DIR 	= os.path.join(PREFIX, 'logs')
LOCK_DIR	= os.path.join(PREFIX, 'locks')
DATA_DIR	= os.path.join(PREFIX, 'data')
QUEUE_DIR       = os.path.join(PREFIX, 'qfiles')
WRAPPER_DIR	= os.path.join(EXEC_PREFIX, 'mail')
SCRIPTS_DIR	= os.path.join(PREFIX, 'scripts')
TEMPLATE_DIR	= os.path.join(PREFIX, 'templates')
PUBLIC_ARCHIVE_FILE_DIR 	= os.path.join(PREFIX, 'archives/public')
PRIVATE_ARCHIVE_FILE_DIR	= os.path.join(PREFIX, 'archives/private')

# The Mailman version
from Version import *