summaryrefslogtreecommitdiff
path: root/Mailman/Defaults.py.in
blob: a1b6b06be12ab7c32c872f3aaedda6733b1ef76d (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
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
# -*- python -*-

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

# NEVER make site configuration changes to this file.  ALWAYS make them in
# mm_cfg.py instead, in the designated area.  See the comments in that file
# for details.


import os

def seconds(s): return s
def minutes(m): return m * 60
def hours(h): return h * 60 * 60
def days(d): return d * 60 * 60 * 24



#####
# General system-wide defaults
#####

# 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 one of the mirrors.
MAILMAN_URL = 'http://www.gnu.org/software/mailman/index.html'
#MAILMAN_URL = 'http://www.list.org/'
#MAILMAN_URL = 'http://mailman.sf.net/'

# Site-specific settings
DEFAULT_EMAIL_HOST = '@FQDN@'
DEFAULT_URL_HOST = '@URL@'
DEFAULT_URL_PATTERN = 'http://%s/mailman/'

# For backwards compatibility.  Note: DEFAULT_URL_PATTERN must end in a slash!
DEFAULT_HOST_NAME = DEFAULT_EMAIL_HOST
DEFAULT_URL       = DEFAULT_URL_PATTERN % DEFAULT_URL_HOST

PUBLIC_ARCHIVE_URL  = '/pipermail'
HOME_PAGE         = 'index.html'
MAILMAN_SITE_LIST = 'mailman'



#####
# Virtual domains
#####

# Set up your virtual host mappings here.  This is primarily used for the
# thru-the-web list creation, so its effects are currently fairly limited.
# Use add_virtualhost() call to add new mappings.  The keys are strings as
# determined by Utils.get_domain(), the values are as appropriate for
# DEFAULT_HOST_NAME.
VIRTUAL_HOSTS = {}

# 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


# Helper function; use this in your mm_cfg.py files
def add_virtualhost(urlhost, emailhost):
    VIRTUAL_HOSTS[urlhost.lower()] = emailhost.lower()

# And set the default
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)



#####
# Spam avoidance defaults
#####

# This variable contains a list of 2-tuple of the format (header, regex) which
# the Mailman/Handlers/SpamDetect.py module uses to match against the current
# message.  If the regex matches the given header in the current message, then
# it is flagged as spam.  header is case-insensitive and should not include
# the trailing colon.  regex is always matched with re.IGNORECASE.
#
# Note that the more searching done, the slower the whole process gets.  Spam
# detection is run against all messages coming to either the list, or the
# -owners address, unless the message is explicitly approved.
KNOWN_SPAMMERS = []



#####
# Web UI defaults
#####

# Almost all the colors used in Mailman's web interface are parameterized via
# the following variables.  This lets you easily change the color schemes for
# your preferences without having to do major surgery on the source code.
# Note that in general, the template colors are not included here since it is
# easy enough to override the default template colors via site-wide,
# vdomain-wide, or list-wide specializations.

WEB_BG_COLOR = 'white'                            # Page background
WEB_HEADER_COLOR = '#99ccff'                      # Major section headers
WEB_SUBHEADER_COLOR = '#fff0d0'                   # Minor section headers
WEB_ADMINITEM_COLOR = '#dddddd'                   # Option field background
WEB_ADMINPW_COLOR = '#99cccc'                     # Password box color
WEB_ERROR_COLOR = 'red'                           # Error message foreground
WEB_LINK_COLOR = ''                               # If true, forces LINK=
WEB_ALINK_COLOR = ''                              # If true, forces ALINK=
WEB_VLINK_COLOR = ''                              # If true, forces VLINK=
WEB_HIGHLIGHT_COLOR = '#dddddd'                   # If true, alternating rows
                                                  # in listinfo & admin display


#####
# Archive defaults
#####

# Are archives on or off by default?
DEFAULT_ARCHIVE = 1                               # 0=Off, 1=On

# Are archives public or private by default?
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
DEFAULT_DIGEST_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

# This sets the default `clobber date' policy for the archiver.  When a
# message is to be archived either by Pipermail or an external archiver,
# Mailman can modify the Date: header to be the date the message was received
# instead of the Date: in the original message.  This is useful if you
# typically receive messages with outrageous dates.  Set this to 0 to retain
# the date of the original message, or to 1 to always clobber the date.  Set
# it to 2 to perform `smart overrides' on the date; when the date is outside
# ARCHIVER_ALLOWABLE_SANE_DATE_SKEW (either too early or too late), then the
# received date is substituted instead.
ARCHIVER_CLOBBER_DATE_POLICY = 2
ARCHIVER_ALLOWABLE_SANE_DATE_SKEW = days(15)

# Pipermail archives contain the raw email addresses of the posting authors.
# Some view this as a goldmine for spam harvesters.  Set this to false to
# moderately obscure email addresses, but note that this breaks mailto: URLs
# in the archives too.
ARCHIVER_OBSCURES_EMAILADDRS = 0

# Pipermail assumes that messages bodies contain US-ASCII text.
# Change this option to define a different character set to be used as
# the default character set for the archive.  The term "character set"
# is used in MIME to refer to a method of converting a sequence of
# octets into a sequence of characters.  If you change the default
# charset, you might need to add it to VERBATIM_ENCODING below.
DEFAULT_CHARSET = None

# Most character set encodings require special HTML entity characters to be
# quoted, otherwise they won't look right in the Pipermail archives.  However
# some character sets must not quote these characters so that they can be
# rendered properly in the browsers.  The primary issue is multi-byte
# encodings where the octet 0x26 does not always represent the & character.
# This variable contains a list of such characters sets which are not
# HTML-quoted in the archives.
VERBATIM_ENCODING = ['iso-2022-jp']



#####
# Delivery defaults
#####

# Final delivery module for outgoing mail.  This handler is used for message
# delivery to the list via the smtpd, and to an individual user.  This value
# must be a string naming a module in the Mailman.Handlers package.
#
# SECURITY WARNING: The Sendmail module is not secure!  Please read the
# comments in Mailman/Handlers/Sendmail.py for details.  Use at your own
# risk.  SMTPDirect is recommended.
#
#DELIVERY_MODULE = 'Sendmail'
DELIVERY_MODULE = 'SMTPDirect'

# Ceiling on the number of recipients that can be specified in a single SMTP
# transaction.  Set to 0 to submit the entire recipient list in one
# transaction.  Only used with the SMTPDirect DELIVERY_MODULE.
SMTP_MAX_RCPTS = 500

# Maximum number of simulatenous subthreads that will be used for SMTP
# delivery.  After the recipients list is chunked according to SMTP_MAX_RCPTS,
# each chunk is handed off to the smptd by a separate such thread.  If your
# Python interpreter was not built for threads, this feature is disabled.  You
# can explicitly disable it in all cases by setting MAX_DELIVERY_THREADS to
# 0.  This feature is only supported with the SMTPDirect DELIVERY_MODULE.
#
# NOTE: This is an experimental feature and limited testing shows that it may
# in fact degrade performance, possibly due to Python's global interpreter
# lock.  Use with caution.
MAX_DELIVERY_THREADS = 0

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

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

# MTA should name a module in Mailman/MTA which provides the MTA specific
# functionality for creating and removing lists.  Some MTAs like Exim can be
# configured to automatically recognize new lists, in which case the MTA
# variable should be set to None.  Currently only Postfix is supported, while
# the fallback Manual prints to standard out (or sends an email).
MTA = 'Manual'

# Set these variables if you need to authenticate to your NNTP server for
# Usenet posting or reading.  If no authentication is necessary, specify None
# for both variables.
NNTP_USERNAME = None
NNTP_PASSWORD = None

# Set this if you have an NNTP server you prefer gatewayed lists to use.
DEFAULT_NNTP_HOST = ''

# All `normal' messages which are delivered to the entire list membership go
# through this pipeline of handler modules.  Lists themselves can override the
# global pipeline by defining a `pipeline' attribute.
GLOBAL_PIPELINE = [
    'SpamDetect',
    'Approve',
    'Replybot',
    'Hold',
    'Tagger',
    'CalcRecips',
    'Cleanse',
    'CookHeaders',
    'ToDigest',
    'ToArchive',
    'Personalize',
    'Decorate',
    'AfterDelivery',
    'Acknowledge',
    'ToUsenet',
    'ToOutgoing',
    ]

# This defines syslog() format strings for the SMTPDirect delivery module (see
# DELIVERY_MODULE above).  Valid %()s string substitutions include:
#
#     time -- the time in float seconds that it took to complete the smtp
#     hand-off of the message from Mailman to your smtpd.
#
#     size -- the size of the entire message, in bytes
#
#     #recips -- the number of actual recipients for this message.
#
#     #refused -- the number of smtp refused recipients (use this only in
#     SMTP_LOG_REFUSED).
#
#     listname -- the `internal' name of the mailing list for this posting
#
#     msg_<header> -- the value of the delivered message's given header.  If
#     the message had no such header, then "n/a" will be used.  Note though
#     that if the message had multiple such headers, then it is undefined
#     which will be used.
#
#     allmsg_<header> - Same as msg_<header> above, but if there are multiple
#     such headers in the message, they will all be printed, separated by
#     comma-space.
#
#     sender -- the "sender" of the messages, which will be the From: or
#     envelope-sender as determeined by the USE_ENVELOPE_SENDER variable
#     below.
#
# The format of the entries is a 2-tuple with the first element naming the
# file in logs/ to print the message to, and the second being a format string
# appropriate for Python's %-style string interpolation.  The file name is
# arbitrary; qfiles/<name> will be created automatically if it does not
# exist.

# The format of the message printed for every delivered message, regardless of
# whether the delivery was successful or not.  Set to None to disable the
# printing of this log message.
SMTP_LOG_EVERY_MESSAGE = (
    'smtp',
    '%(msg_message-id)s smtp for %(#recips)d recips, completed in %(time).3f seconds')

# This will only be printed if there were no immediate smtp failures.
# Mutually exclusive with SMTP_LOG_REFUSED.
SMTP_LOG_SUCCESS = (
    'post',
    'post to %(listname)s from %(sender)s, size=%(size)d, success')

# This will only be printed if there were any addresses which encountered an
# immediate smtp failure.  Mutually exclusive with SMTP_LOG_SUCCESS.
SMTP_LOG_REFUSED = (
    'post',
    'post to %(listname)s from %(sender)s, size=%(size)d, %(#refused)d failures')

# This will be logged for each specific recipient failure.  Additional %()s
# keys are:
#
#     recipient -- the failing recipient address
#     failcode  -- the smtp failure code
#     failmsg   -- the actual smtp message, if available
SMTP_LOG_EACH_FAILURE = (
    'smtp-failure',
    'delivery to %(recipient)s failed with code %(failcode)d: %(failmsg)s')



#####
# Qrunner defaults
#####

# Which queues should the qrunner master watchdog spawn?  This is a list of
# 2-tuples containing the name of the qrunner class (which must live in a
# module of the same name within the Mailman.Queue package), and the number of
# parallel processes to fork for each qrunner.  If more than one process is
# used, each will take an equal subdivision of the hash space.

# BAW: eventually we may support weighted hash spaces.
#
# BAW: although not enforced, the # of slices must be a power of 2

QRUNNERS = [
    ('IncomingRunner', 1), # posts from the outside world
    ('OutgoingRunner', 1), # outgoing messages to the smtpd
    ('NewsRunner',     1), # outgoing messages to the nntpd
    ('ArchRunner',     1), # messages for the archiver
    ('CommandRunner',  1), # commands and bounces from the outside world
    ('VirginRunner',   1), # internally crafted (virgin birth) messages
    ]

# After processing every file in the qrunner's slice, how long should the
# runner sleep for before checking the queue directory again for new files?
# This can be a fraction of a second, or zero to check immediately
# (essentially busy-loop as fast as possible).
QRUNNER_SLEEP_TIME = seconds(1)



#####
# General defaults
#####

# The default language for this server.  Whenever we can't figure out the list
# context or user context, we'll fall back to using this language.  See
# LC_DESCRIPTIONS below for legal values.
DEFAULT_SERVER_LANGUAGE = 'en'

# 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 always be case preserved, and host parts of addresses will all be
# lowercased.
# FIXME: NOT ALWAYS THE RIGHT THING TO DO FOR COUNTRY CODE TLDS
SMART_ADDRESS_MATCH = 1

# 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

# Set this variable to 1 to allow list owners to delete their own mailing
# lists.  You may not want to give them this power, in which case, setting
# this variable to 0 instead requires list removal to be done by the site
# administrator, via the command line script bin/rmlist.
OWNERS_CAN_DELETE_THEIR_OWN_LISTS = 0

# Set this variable to 1 to allow list owners to set the "personalized" flags
# on their mailing lists.  Turning these on tells Mailman to send separate
# email messages to each user instead of batching them together for delivery
# to the MTA.  This gives each member a more personalized message, but can
# have a heavy impact on the performance of your system.
OWNERS_CAN_ENABLE_PERSONALIZATION = 0

# These define the available types of external message metadata formats, and
# the one to use by default.  MARSHAL format uses Python's built-in marshal
# module.  BSDDB_NATIVE uses the bsddb module compiled into Python, which
# links with whatever version of Berkeley db you've got on your system (in
# Python 2.0 this is included by default if configure can find it).  ASCII
# format is a dumb repr()-based format with "key = value" Python assignments.
# It is human readable and editable (as Python source code) and is appropriate
# for execfile() food.
METAFMT_MARSHAL      = 1
METAFMT_BSDDB_NATIVE = 2
METAFMT_ASCII        = 3

METADATA_FORMAT = METAFMT_MARSHAL

# This variable controls the order in which list-specific category options are
# presented in the admin cgi page.
ADMIN_CATEGORIES = ['general', 'language', 'members', 'privacy', 'nondigest',
                    'digest', 'bounce', 'archive', 'gateway',
                    'autoreply', 'topics',
                    ]



#####
# List defaults
#####

# Should a list, by default be advertised?  What is the default maximum number
# of explicit recipients allowed?  What is the default maximum message size
# allowed?
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

# Is the list owner notified of admin requests immediately by mail, as well as
# by daily pending-request reminder?
DEFAULT_ADMIN_IMMED_NOTIFY = 1

# Is the list owner notified of subscribes/unsubscribes?
DEFAULT_ADMIN_NOTIFY_MCHANGES = 0

# Are lists, by default, moderated?
DEFAULT_MODERATED = 0

# Bounce if 'To:', 'Cc:', or 'Resent-To:' fields don't explicitly name list?
# This is an anti-spam measure
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
"""

# Mailman can be configured to "munge" Reply-To: headers for any passing
# messages.  One the one hand, there are a lot of good reasons not to munge
# Reply-To: but on the other, people really seem to want this feature.  See
# the help for reply_goes_to_list in the web UI for links discussing the
# issue.
# 0 - Reply-To: not munged
# 1 - Reply-To: set back to the list
# 2 - Reply-To: set to an explicit value (reply_to_address)
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 notify the list admin
# 2 means disable and don't notify the list admin
# 3 means remove and notify
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

# Check for administrivia in messages sent to the main list?
DEFAULT_ADMINISTRIVIA = 1

# List of addresses (lhs of the @) that likely come only from MTAs bouncing
# messages.  This is used in the bounce detector and MailCommandHandler.py to
# stop processing or forwarding such messages.
#
# TBD: why orphanage?  why postoffice?
LIKELY_BOUNCE_SENDERS = ('daemon', 'mailer-daemon', 'postmaster',
                         'orphanage', 'postoffice')



#####
# General time limits
#####

# How long should subscriptions requests await confirmation before being
# dropped?
PENDING_REQUEST_LIFE = days(3)

# How long should messages which have delivery failures continue to be
# retried?  After this period of time, a message that has failed recipients
# will be dequeued and those recipients will never receive the message.
DELIVERY_RETRY_PERIOD = days(5)



#####
# Lock management defaults
#####

# These variables control certain aspects of lock acquisition and retention.
# They should be tuned as appropriate for your environment.  All variables are
# specified in units of floating point seconds.  YOU MAY NEED TO TUNE THESE
# VARIABLES DEPENDING ON THE SIZE OF YOUR LISTS, THE PERFORMANCE OF YOUR
# HARDWARE, NETWORK AND GENERAL MAIL HANDLING CAPABILITIES, ETC.

# Set this to true to turn on MailList object lock debugging messages, which
# will 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_DEBUGGING = 0

# This variable 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.  This is probably one of
# the most crucial tuning variables in the system.
LIST_LOCK_LIFETIME = hours(5)

# This variable specifies how long an attempt will be made to acquire a list
# lock by the incoming qrunner process.  If the lock acquisition times out,
# the message will be re-queued for later delivery.
LIST_LOCK_TIMEOUT = seconds(10)



#####
# Nothing below here is user configurable.  Most of these values are in this
# file for convenience.  Don't change any of them or override any of them in
# your mm_cfg.py file!
#####

# 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.
PYTHON          = '@PYTHON@'
PREFIX          = '@prefix@'
EXEC_PREFIX     = '@exec_prefix@'
VAR_PREFIX      = '@VAR_PREFIX@'

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

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

# Group id that group-owns the Mailman installation
MAILMAN_UID = @MAILMAN_UID@
MAILMAN_GID = @MAILMAN_GID@

# Enumeration for Mailman cgi widget types
Toggle     = 1
Radio      = 2
String     = 3
Text       = 4
Email      = 5
EmailList  = 6
Host       = 7
Number     = 8
FileUpload = 9
Select     = 10
Topics     = 11
Checkbox   = 12

# Held message disposition actions, for use between admindb.py and
# ListAdmin.py.
DEFER = 0
APPROVE = 1
REJECT = 2
DISCARD = 3
SUBSCRIBE = 4

# Standard text field width
TEXTFIELDWIDTH = 40

# 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
SuppressPasswordReminder = 32
ReceiveNonmatchingTopics = 64

# Authentication contexts.
#
# Mailman defines the following roles:

# - User, a normal user who has no permissions except to change their personal
#   option settings
# - List creator, someone who can create and delete lists, but cannot
#   (necessarily) configure the list.
# - List moderator, someone who can tend to pending requests such as
#   subscription requests, or held messages
# - List administrator, someone who has total control over a list, can
#   configure it, modify user options for members of the list, subscribe and
#   unsubscribe members, etc.
# - Site administrator, someone who has total control over the entire site and
#   can do any of the tasks mentioned above.  This person usually also has
#   command line access.

UnAuthorized = 0
AuthUser = 1          # Joe Shmoe User
AuthCreator = 2       # List Creator / Destroyer
AuthListAdmin = 3     # List Administrator (total control over list)
AuthListModerator = 4 # List Moderator (can only handle held requests)
AuthSiteAdmin = 5     # Site Administrator (total control over everything)

# Useful directories
LIST_DATA_DIR   = os.path.join(VAR_PREFIX, 'lists')
LOG_DIR         = os.path.join(VAR_PREFIX, 'logs')
LOCK_DIR        = os.path.join(VAR_PREFIX, 'locks')
DATA_DIR        = os.path.join(VAR_PREFIX, 'data')
SPAM_DIR        = os.path.join(VAR_PREFIX, 'spam')
WRAPPER_DIR     = os.path.join(EXEC_PREFIX, 'mail')
SCRIPTS_DIR     = os.path.join(PREFIX, 'scripts')
TEMPLATE_DIR    = os.path.join(PREFIX, 'templates')
MESSAGES_DIR    = os.path.join(PREFIX, 'messages')
PUBLIC_ARCHIVE_FILE_DIR  = os.path.join(VAR_PREFIX, 'archives', 'public')
PRIVATE_ARCHIVE_FILE_DIR = os.path.join(VAR_PREFIX, 'archives', 'private')

# Directories used by the qrunner subsystem
QUEUE_DIR       = os.path.join(VAR_PREFIX, 'qfiles')
INQUEUE_DIR     = os.path.join(QUEUE_DIR, 'in')
OUTQUEUE_DIR    = os.path.join(QUEUE_DIR, 'out')
CMDQUEUE_DIR    = os.path.join(QUEUE_DIR, 'commands')
BOUNCEQUEUE_DIR = os.path.join(QUEUE_DIR, 'bounces')
NEWSQUEUE_DIR   = os.path.join(QUEUE_DIR, 'news')
ARCHQUEUE_DIR   = os.path.join(QUEUE_DIR, 'archive')
SHUNTQUEUE_DIR  = os.path.join(QUEUE_DIR, 'shunt')
VIRGINQUEUE_DIR = os.path.join(QUEUE_DIR, 'virgin')

# Other useful files
PIDFILE = os.path.join(DATA_DIR, 'qrunner.pid')
SITE_PW_FILE = os.path.join(DATA_DIR, 'adm.pw')
LISTCREATOR_PW_FILE = os.path.join(DATA_DIR, 'creator.pw')

# Import a bunch of version numbers
from Version import *

# Vgg: Language descriptions and charsets dictionary, any new supported
# language must have a corresponding entry here. Key is the name of the
# directories that hold the localized texts. Data are tuples with first
# element being the description, as described in the catalogs, and second
# element is the language charset.  I have chosen code from /usr/share/locale
# in my GNU/Linux. :-)
def _(s):
    return s

LC_DESCRIPTIONS = {}

def add_language(code, description, charset):
    LC_DESCRIPTIONS[code] = (description, charset)

add_language('big5', _('Traditional Chinese'), 'big5')
add_language('en',   _('English (USA)'),       'us-ascii')
add_language('es',   _('Spanish (Spain)'),     'iso-8859-1')
add_language('fr',   _('French'),              'iso-8859-1')
add_language('gb',   _('Simplified Chinese'),  'gb2312')
add_language('hu',   _('Hungarian'),           'iso-8859-1')
add_language('it',   _('Italian'),             'iso-8859-1')
add_language('ja',   _('Japanese'),            'euc-jp')
add_language('no',   _('Norwegian'),           'iso-8859-1')
add_language('ru',   _('Russian'),             'koi8-r')

del _