PageRenderTime 46ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/Release_2_1a4/mailman/Mailman/Defaults.py.in

#
Autoconf | 1050 lines | 299 code | 157 blank | 594 comment | 4 complexity | 7752b0f336c22746513384f0d0b3cf98 MD5 | raw file
Possible License(s): GPL-2.0
  1. # -*- python -*-
  2. # Copyright (C) 1998,1999,2000,2001 by the Free Software Foundation, Inc.
  3. #
  4. # This program is free software; you can redistribute it and/or
  5. # modify it under the terms of the GNU General Public License
  6. # as published by the Free Software Foundation; either version 2
  7. # of the License, or (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. """Distributed default settings for significant Mailman config variables.
  18. """
  19. # NEVER make site configuration changes to this file. ALWAYS make them in
  20. # mm_cfg.py instead, in the designated area. See the comments in that file
  21. # for details.
  22. import os
  23. def seconds(s): return s
  24. def minutes(m): return m * 60
  25. def hours(h): return h * 60 * 60
  26. def days(d): return d * 60 * 60 * 24
  27. #####
  28. # General system-wide defaults
  29. #####
  30. # Should image logos be used? Set this to false to disable image logos from
  31. # "our sponsors" and just use textual links instead. Otherwise, this should
  32. # contain the URL base path to the logo images (and must contain the trailing
  33. # slash).. If you want to disable Mailman's logo footer altogther, hack
  34. # Mailman/htmlformat.py:MailmanLogo(), which also contains the hardcoded links
  35. # and image names.
  36. IMAGE_LOGOS = '/icons/'
  37. # Don't change MAILMAN_URL, unless you want to point it at one of the mirrors.
  38. MAILMAN_URL = 'http://www.gnu.org/software/mailman/index.html'
  39. #MAILMAN_URL = 'http://www.list.org/'
  40. #MAILMAN_URL = 'http://mailman.sf.net/'
  41. # Site-specific settings
  42. DEFAULT_EMAIL_HOST = '@FQDN@'
  43. DEFAULT_URL_HOST = '@URL@'
  44. DEFAULT_URL_PATTERN = 'http://%s/mailman/'
  45. # For backwards compatibility. Note: DEFAULT_URL_PATTERN must end in a slash!
  46. DEFAULT_HOST_NAME = DEFAULT_EMAIL_HOST
  47. DEFAULT_URL = DEFAULT_URL_PATTERN % DEFAULT_URL_HOST
  48. HOME_PAGE = 'index.html'
  49. MAILMAN_SITE_LIST = 'mailman'
  50. #####
  51. # Virtual domains
  52. #####
  53. # Set up your virtual host mappings here. This is primarily used for the
  54. # thru-the-web list creation, so its effects are currently fairly limited.
  55. # Use add_virtualhost() call to add new mappings. The keys are strings as
  56. # determined by Utils.get_domain(), the values are as appropriate for
  57. # DEFAULT_HOST_NAME.
  58. VIRTUAL_HOSTS = {}
  59. # When set, the listinfo web page overview of lists on the machine will be
  60. # confined to only those lists whose web_page_url configuration option host is
  61. # included within the URL by which the page is visited - only those "on the
  62. # virtual host". If unset, then all lists are included in the overview. The
  63. # admin page overview always includes all the lists.
  64. VIRTUAL_HOST_OVERVIEW = 1
  65. # Helper function; use this in your mm_cfg.py files
  66. def add_virtualhost(urlhost, emailhost):
  67. VIRTUAL_HOSTS[urlhost.lower()] = emailhost.lower()
  68. # And set the default
  69. add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
  70. #####
  71. # Spam avoidance defaults
  72. #####
  73. # This variable contains a list of 2-tuple of the format (header, regex) which
  74. # the Mailman/Handlers/SpamDetect.py module uses to match against the current
  75. # message. If the regex matches the given header in the current message, then
  76. # it is flagged as spam. header is case-insensitive and should not include
  77. # the trailing colon. regex is always matched with re.IGNORECASE.
  78. #
  79. # Note that the more searching done, the slower the whole process gets. Spam
  80. # detection is run against all messages coming to either the list, or the
  81. # -owners address, unless the message is explicitly approved.
  82. KNOWN_SPAMMERS = []
  83. #####
  84. # Web UI defaults
  85. #####
  86. # Almost all the colors used in Mailman's web interface are parameterized via
  87. # the following variables. This lets you easily change the color schemes for
  88. # your preferences without having to do major surgery on the source code.
  89. # Note that in general, the template colors are not included here since it is
  90. # easy enough to override the default template colors via site-wide,
  91. # vdomain-wide, or list-wide specializations.
  92. WEB_BG_COLOR = 'white' # Page background
  93. WEB_HEADER_COLOR = '#99ccff' # Major section headers
  94. WEB_SUBHEADER_COLOR = '#fff0d0' # Minor section headers
  95. WEB_ADMINITEM_COLOR = '#dddddd' # Option field background
  96. WEB_ADMINPW_COLOR = '#99cccc' # Password box color
  97. WEB_ERROR_COLOR = 'red' # Error message foreground
  98. WEB_LINK_COLOR = '' # If true, forces LINK=
  99. WEB_ALINK_COLOR = '' # If true, forces ALINK=
  100. WEB_VLINK_COLOR = '' # If true, forces VLINK=
  101. WEB_HIGHLIGHT_COLOR = '#dddddd' # If true, alternating rows
  102. # in listinfo & admin display
  103. #####
  104. # Archive defaults
  105. #####
  106. # The url template for the public archives. This will be used in several
  107. # places, including the List-Archive: header, links to the archive on the
  108. # list's listinfo page, and on the list's admin page.
  109. #
  110. # This should be a string with "%(listname)s" somewhere in it. Mailman will
  111. # interpolate the name of the list into this. You can also include a
  112. # "%(hostname)s" in the string, into which Mailman will interpolate
  113. # the host name (usually DEFAULT_URL_HOST).
  114. PUBLIC_ARCHIVE_URL = 'http://%(hostname)s/pipermail/%(listname)s'
  115. # Are archives on or off by default?
  116. DEFAULT_ARCHIVE = 1 # 0=Off, 1=On
  117. # Are archives public or private by default?
  118. DEFAULT_ARCHIVE_PRIVATE = 0 # 0=public, 1=private
  119. # ARCHIVE_TO_MBOX
  120. #-1 - do not do any archiving
  121. # 0 - do not archive to mbox, use builtin mailman html archiving only
  122. # 1 - archive to mbox to use an external archiving mechanism only
  123. # 2 - archive to both mbox and builtin mailman html archiving -
  124. # use this to make both external archiving mechanism work and
  125. # mailman's builtin html archiving. the flat mail file can be
  126. # useful for searching, external archivers, etc.
  127. #
  128. ARCHIVE_TO_MBOX = 2
  129. # 0 - yearly
  130. # 1 - monthly
  131. # 2 - quarterly
  132. # 3 - weekly
  133. # 4 - daily
  134. DEFAULT_ARCHIVE_VOLUME_FREQUENCY = 1
  135. DEFAULT_DIGEST_VOLUME_FREQUENCY = 1
  136. # These variables control the use of an external archiver. Normally if
  137. # archiving is turned on (see ARCHIVE_TO_MBOX above and the list's archive*
  138. # attributes) the internal Pipermail archiver is used. This is the default if
  139. # both of these variables are set to false. When either is set, the value
  140. # should be a shell command string which will get passed to os.popen(). This
  141. # string can contain %(listname)s for dictionary interpolation. The name of
  142. # the list being archived will be substituted for this.
  143. #
  144. # Note that if you set one of these variables, you should set both of them
  145. # (they can be the same string). This will mean your external archiver will
  146. # be used regardless of whether public or private archives are selected.
  147. PUBLIC_EXTERNAL_ARCHIVER = 0
  148. PRIVATE_EXTERNAL_ARCHIVER = 0
  149. # A filter module that converts from multipart messages to "flat" messages
  150. # (i.e. containing a single payload). This is required for Pipermail, and you
  151. # may want to set it to 0 for external archivers. You can also replace it
  152. # with your own module as long as it's importable, and contains a process()
  153. # function that takes a MailList object and a Message object. It should raise
  154. # Errors.DiscardMessage if it wants to throw the message away. Otherwise it
  155. # should modify the Message object as necessary.
  156. ARCHIVE_SCRUBBER = 'Mailman.Handlers.Scrubber'
  157. # This variable defines what happens to text/html subparts. They can be
  158. # stripped completely, escaped, or filtered through an external program. The
  159. # legal values are:
  160. # 0 - Strip out text/html parts completely, leaving a notice of the removal in
  161. # the message. If the outer part is text/html, the entire message is
  162. # discarded.
  163. # 1 - Remove any embedded text/html parts, leaving them as HTML-escaped
  164. # attachments which can be separately viewed. Outer text/html parts are
  165. # simply HTML-escaped.
  166. # 2 - Leave it inline, but HTML-escape it
  167. # 3 - Remove text/html as attachments but don't HTML-escape them. Note: this
  168. # is very dangerous because it essentially means anybody can send an HTML
  169. # email to your site containing evil JavaScript or web bugs, or other
  170. # nasty things, and folks viewing your archives will be susceptible. You
  171. # should only consider this option if you do heavy moderation of your list
  172. # postings.
  173. #
  174. # Note: given the current archiving code, it is not possible to leave
  175. # text/html parts inline and un-escaped. I wouldn't think it'd be a good idea
  176. # to do anyway.
  177. #
  178. # The value can also be a string, in which case it is the name of a command to
  179. # filter the HTML page through. The resulting output is left in an attachment
  180. # or as the entirety of the message when the outer part is text/html. The
  181. # format of the string must include a "%(filename)s" which will contain the
  182. # name of the temporary file that the program should operate on. It should
  183. # write the processed message to stdout.
  184. #ARCHIVE_HTML_SANITIZER = '/usr/bin/lynx -dump %(filename)s'
  185. ARCHIVE_HTML_SANITIZER = 1
  186. # Set this to 1 to enable gzipping of the downloadable archive .txt file.
  187. # Note that this is /extremely/ inefficient, so an alternative is to just
  188. # collect the messages in the associated .txt file and run a cron job every
  189. # night to generate the txt.gz file. See cron/nightly_gzip for details.
  190. GZIP_ARCHIVE_TXT_FILES = 0
  191. # This sets the default `clobber date' policy for the archiver. When a
  192. # message is to be archived either by Pipermail or an external archiver,
  193. # Mailman can modify the Date: header to be the date the message was received
  194. # instead of the Date: in the original message. This is useful if you
  195. # typically receive messages with outrageous dates. Set this to 0 to retain
  196. # the date of the original message, or to 1 to always clobber the date. Set
  197. # it to 2 to perform `smart overrides' on the date; when the date is outside
  198. # ARCHIVER_ALLOWABLE_SANE_DATE_SKEW (either too early or too late), then the
  199. # received date is substituted instead.
  200. ARCHIVER_CLOBBER_DATE_POLICY = 2
  201. ARCHIVER_ALLOWABLE_SANE_DATE_SKEW = days(15)
  202. # Pipermail archives contain the raw email addresses of the posting authors.
  203. # Some view this as a goldmine for spam harvesters. Set this to false to
  204. # moderately obscure email addresses, but note that this breaks mailto: URLs
  205. # in the archives too.
  206. ARCHIVER_OBSCURES_EMAILADDRS = 0
  207. # Pipermail assumes that messages bodies contain US-ASCII text.
  208. # Change this option to define a different character set to be used as
  209. # the default character set for the archive. The term "character set"
  210. # is used in MIME to refer to a method of converting a sequence of
  211. # octets into a sequence of characters. If you change the default
  212. # charset, you might need to add it to VERBATIM_ENCODING below.
  213. DEFAULT_CHARSET = None
  214. # Most character set encodings require special HTML entity characters to be
  215. # quoted, otherwise they won't look right in the Pipermail archives. However
  216. # some character sets must not quote these characters so that they can be
  217. # rendered properly in the browsers. The primary issue is multi-byte
  218. # encodings where the octet 0x26 does not always represent the & character.
  219. # This variable contains a list of such characters sets which are not
  220. # HTML-quoted in the archives.
  221. VERBATIM_ENCODING = ['iso-2022-jp']
  222. #####
  223. # Delivery defaults
  224. #####
  225. # Final delivery module for outgoing mail. This handler is used for message
  226. # delivery to the list via the smtpd, and to an individual user. This value
  227. # must be a string naming a module in the Mailman.Handlers package.
  228. #
  229. # SECURITY WARNING: The Sendmail module is not secure! Please read the
  230. # comments in Mailman/Handlers/Sendmail.py for details. Use at your own
  231. # risk. SMTPDirect is recommended.
  232. #
  233. #DELIVERY_MODULE = 'Sendmail'
  234. DELIVERY_MODULE = 'SMTPDirect'
  235. # MTA should name a module in Mailman/MTA which provides the MTA specific
  236. # functionality for creating and removing lists. Some MTAs like Exim can be
  237. # configured to automatically recognize new lists, in which case the MTA
  238. # variable should be set to None. Use 'Manual' to print new aliases to
  239. # standard out (or send an email to the site list owner) for manual twiddling
  240. # of an /etc/aliases style file. Use 'Postfix' if you are using the Postfix
  241. # MTA -- but then also see POSTFIX_STYLE_VIRTUAL_DOMAINS.
  242. MTA = 'Manual'
  243. # If you set MTA='Postfix', then you also want to set the following variable,
  244. # depending on whether you're using virtual domains in Postfix, and which
  245. # style of virtual domain you're using. Set this flag to false if you're not
  246. # using virtual domains in Postfix, or if you're using Sendmail-style virtual
  247. # domains (where all addresses are visible in all domains). If you're using
  248. # Postfix-style virtual domains, where aliases should only show up in the
  249. # virtual domain, set this variable to the list of host_name values to write
  250. # separate virtual entries for. I.e. if you run dom1.ain, dom2.ain, and
  251. # dom3.ain, but only dom2 and dom3 are virtual, set this variable to the list
  252. # ['dom2.ain', 'dom3.ain']. Matches are done against the host_name attribute
  253. # of the mailing lists. See README.POSTFIX for details.
  254. POSTFIX_STYLE_VIRTUAL_DOMAINS = []
  255. # Ceiling on the number of recipients that can be specified in a single SMTP
  256. # transaction. Set to 0 to submit the entire recipient list in one
  257. # transaction. Only used with the SMTPDirect DELIVERY_MODULE.
  258. SMTP_MAX_RCPTS = 500
  259. # Maximum number of simulatenous subthreads that will be used for SMTP
  260. # delivery. After the recipients list is chunked according to SMTP_MAX_RCPTS,
  261. # each chunk is handed off to the smptd by a separate such thread. If your
  262. # Python interpreter was not built for threads, this feature is disabled. You
  263. # can explicitly disable it in all cases by setting MAX_DELIVERY_THREADS to
  264. # 0. This feature is only supported with the SMTPDirect DELIVERY_MODULE.
  265. #
  266. # NOTE: This is an experimental feature and limited testing shows that it may
  267. # in fact degrade performance, possibly due to Python's global interpreter
  268. # lock. Use with caution.
  269. MAX_DELIVERY_THREADS = 0
  270. # SMTP host and port, when DELIVERY_MODULE is 'SMTPDirect'
  271. SMTPHOST = 'localhost'
  272. SMTPPORT = 0 # default from smtplib
  273. # Command for direct command pipe delivery to sendmail compatible program,
  274. # when DELIVERY_MODULE is 'Sendmail'.
  275. SENDMAIL_CMD = '/usr/lib/sendmail'
  276. # Set these variables if you need to authenticate to your NNTP server for
  277. # Usenet posting or reading. If no authentication is necessary, specify None
  278. # for both variables.
  279. NNTP_USERNAME = None
  280. NNTP_PASSWORD = None
  281. # Set this if you have an NNTP server you prefer gatewayed lists to use.
  282. DEFAULT_NNTP_HOST = ''
  283. # These variables controls how headers must be cleansed in order to be
  284. # accepted by your NNTP server. Some servers like INN reject messages
  285. # containing prohibited headers, or duplicate headers. The NNTP server may
  286. # reject the message for other reasons, but there's little that can be
  287. # programmatically done about that. See Mailman/Queue/NewsRunner.py
  288. #
  289. # First, these headers (case ignored) are removed from the original message.
  290. NNTP_REMOVE_HEADERS = ['nntp-posting-host', 'nntp-posting-date', 'x-trace',
  291. 'x-complaints-to', 'xref', 'date-received', 'posted',
  292. 'posting-version', 'relay-version', 'received']
  293. # Next, these headers are left alone, unless there are duplicates in the
  294. # original message. Any second and subsequent headers are rewritten to the
  295. # second named header (case preserved).
  296. NNTP_REWRITE_DUPLICATE_HEADERS = [
  297. ('to', 'X-Original-To'),
  298. ('cc', 'X-Original-Cc'),
  299. ('content-transfer-encoding', 'X-Original-Content-Transfer-Encoding'),
  300. ('mime-version', 'X-MIME-Version'),
  301. ]
  302. # All `normal' messages which are delivered to the entire list membership go
  303. # through this pipeline of handler modules. Lists themselves can override the
  304. # global pipeline by defining a `pipeline' attribute.
  305. GLOBAL_PIPELINE = [
  306. # These are the modules that do tasks common to all delivery paths.
  307. 'SpamDetect',
  308. 'Approve',
  309. 'Replybot',
  310. 'Moderate',
  311. 'Hold',
  312. 'Tagger',
  313. 'CalcRecips',
  314. 'Cleanse',
  315. 'CookHeaders',
  316. # And now we send the message to the digest mbox file, and to the arch and
  317. # news queues. Runners will provide further processing of the message,
  318. # specific to those delivery paths.
  319. 'ToDigest',
  320. 'ToArchive',
  321. 'ToUsenet',
  322. # Now we'll do a few extra things specific to the member delivery
  323. # (outgoing) path, finally leaving the message in the out queue.
  324. 'Personalize',
  325. 'Decorate',
  326. 'AfterDelivery',
  327. 'Acknowledge',
  328. 'ToOutgoing',
  329. ]
  330. # This defines syslog() format strings for the SMTPDirect delivery module (see
  331. # DELIVERY_MODULE above). Valid %()s string substitutions include:
  332. #
  333. # time -- the time in float seconds that it took to complete the smtp
  334. # hand-off of the message from Mailman to your smtpd.
  335. #
  336. # size -- the size of the entire message, in bytes
  337. #
  338. # #recips -- the number of actual recipients for this message.
  339. #
  340. # #refused -- the number of smtp refused recipients (use this only in
  341. # SMTP_LOG_REFUSED).
  342. #
  343. # listname -- the `internal' name of the mailing list for this posting
  344. #
  345. # msg_<header> -- the value of the delivered message's given header. If
  346. # the message had no such header, then "n/a" will be used. Note though
  347. # that if the message had multiple such headers, then it is undefined
  348. # which will be used.
  349. #
  350. # allmsg_<header> - Same as msg_<header> above, but if there are multiple
  351. # such headers in the message, they will all be printed, separated by
  352. # comma-space.
  353. #
  354. # sender -- the "sender" of the messages, which will be the From: or
  355. # envelope-sender as determeined by the USE_ENVELOPE_SENDER variable
  356. # below.
  357. #
  358. # The format of the entries is a 2-tuple with the first element naming the
  359. # file in logs/ to print the message to, and the second being a format string
  360. # appropriate for Python's %-style string interpolation. The file name is
  361. # arbitrary; qfiles/<name> will be created automatically if it does not
  362. # exist.
  363. # The format of the message printed for every delivered message, regardless of
  364. # whether the delivery was successful or not. Set to None to disable the
  365. # printing of this log message.
  366. SMTP_LOG_EVERY_MESSAGE = (
  367. 'smtp',
  368. '%(msg_message-id)s smtp for %(#recips)d recips, completed in %(time).3f seconds')
  369. # This will only be printed if there were no immediate smtp failures.
  370. # Mutually exclusive with SMTP_LOG_REFUSED.
  371. SMTP_LOG_SUCCESS = (
  372. 'post',
  373. 'post to %(listname)s from %(sender)s, size=%(size)d, success')
  374. # This will only be printed if there were any addresses which encountered an
  375. # immediate smtp failure. Mutually exclusive with SMTP_LOG_SUCCESS.
  376. SMTP_LOG_REFUSED = (
  377. 'post',
  378. 'post to %(listname)s from %(sender)s, size=%(size)d, %(#refused)d failures')
  379. # This will be logged for each specific recipient failure. Additional %()s
  380. # keys are:
  381. #
  382. # recipient -- the failing recipient address
  383. # failcode -- the smtp failure code
  384. # failmsg -- the actual smtp message, if available
  385. SMTP_LOG_EACH_FAILURE = (
  386. 'smtp-failure',
  387. 'delivery to %(recipient)s failed with code %(failcode)d: %(failmsg)s')
  388. # These variables control the format and frequency of VERP-like delivery for
  389. # better bounce detection. VERP is Variable Envelope Return Path, defined
  390. # here:
  391. #
  392. # http://cr.yp.to/proto/verp.txt
  393. #
  394. # This involves encoding the address of the recipient as we (Mailman) know it
  395. # into the envelope sender address (i.e. the SMTP `MAIL FROM:' address).
  396. # Thus, no matter what kind of forwarding the recipient has in place, should
  397. # it eventually bounce, we will receive an unambiguous notice of the bouncing
  398. # address.
  399. #
  400. # However, we're technically only "VERP-like" because we're doing the envelope
  401. # sender encoding in Mailman, not in the MTA. We do require cooperation from
  402. # the MTA, so you must be sure your MTA can be configured for extended address
  403. # semantics.
  404. #
  405. # The first variable describes how to encode VERP envelopes. It must contain
  406. # these three string interpolations:
  407. #
  408. # %(bounces)s -- the list-bounces mailbox will be set here
  409. # %(mailbox)s -- the recipient's mailbox will be set here
  410. # %(host)s -- the recipient's host name will be set here
  411. #
  412. # This example uses the default below.
  413. #
  414. # FQDN list address is: mylist@dom.ain
  415. # Recipient is: aperson@a.nother.dom
  416. #
  417. # The envelope sender will be mylist-bounces+aperson=a.nother.dom@dom.ain
  418. #
  419. # Note that your MTA /must/ be configured to deliver such an addressed message
  420. # to mylist-bounces!
  421. VERP_FORMAT = '%(bounces)s+%(mailbox)s=%(host)s'
  422. # The second describes a regular expression to unambiguously decode such an
  423. # address, which will be placed in the To: header of the bounce message by the
  424. # bouncing MTA. Getting this right is critical -- and tricky. Learn your
  425. # Python regular expressions. It must define exactly two named groups,
  426. # mailbox and host, with the same definition as above. It will be compiled
  427. # case-insensitively.
  428. VERP_REGEXP = r'^[^+]+?\+(?P<mailbox>[^=]+)=(?P<host>[^@]+)@.*$'
  429. # A perfect opportunity for doing VERP is the password reminders, which are
  430. # already addressed individually to each recipient. This flag, if true,
  431. # enables VERPs on all password reminders.
  432. VERP_PASSWORD_REMINDERS = 0
  433. # Another good opportunity is when regular delivery is personalized. Here
  434. # again, we're already incurring the performance hit for addressing each
  435. # individual recipient. Set this to true to enable VERPs on all personalized
  436. # regular deliveries (personalized digests aren't supported yet).
  437. VERP_PERSONALIZED_DELIVERIES = 0
  438. # And finally, we can VERP normal, non-personalized deliveries. However,
  439. # because it can be a significant performance hit, we allow you to decide how
  440. # often to VERP regular deliveries. This is the interval, in number of
  441. # messages, to do a VERP recipient address. The same variable controls both
  442. # regular and digest deliveries. Set to 0 to disable occasional VERPs, set to
  443. # 1 to VERP every delivery, or to some number > 1 for only occasional VERPs.
  444. VERP_DELIVERY_INTERVAL = 0
  445. #####
  446. # Qrunner defaults
  447. #####
  448. # Which queues should the qrunner master watchdog spawn? This is a list of
  449. # 2-tuples containing the name of the qrunner class (which must live in a
  450. # module of the same name within the Mailman.Queue package), and the number of
  451. # parallel processes to fork for each qrunner. If more than one process is
  452. # used, each will take an equal subdivision of the hash space.
  453. # BAW: eventually we may support weighted hash spaces.
  454. #
  455. # BAW: although not enforced, the # of slices must be a power of 2
  456. QRUNNERS = [
  457. ('ArchRunner', 1), # messages for the archiver
  458. ('BounceRunner', 1), # for processing the qfile/bounces directory
  459. ('CommandRunner', 1), # commands and bounces from the outside world
  460. ('IncomingRunner', 1), # posts from the outside world
  461. ('NewsRunner', 1), # outgoing messages to the nntpd
  462. ('OutgoingRunner', 1), # outgoing messages to the smtpd
  463. ('VirginRunner', 1), # internally crafted (virgin birth) messages
  464. ]
  465. # After processing every file in the qrunner's slice, how long should the
  466. # runner sleep for before checking the queue directory again for new files?
  467. # This can be a fraction of a second, or zero to check immediately
  468. # (essentially busy-loop as fast as possible).
  469. QRUNNER_SLEEP_TIME = seconds(1)
  470. #####
  471. # General defaults
  472. #####
  473. # The default language for this server. Whenever we can't figure out the list
  474. # context or user context, we'll fall back to using this language. See
  475. # LC_DESCRIPTIONS below for legal values.
  476. DEFAULT_SERVER_LANGUAGE = 'en'
  477. # When allowing only members to post to a mailing list, how is the sender of
  478. # the message determined? If this variable is set to 1, then first the
  479. # message's envelope sender is used, with a fallback to the sender if there is
  480. # no envelope sender. Set this variable to 0 to always use the sender.
  481. #
  482. # The envelope sender is set by the SMTP delivery and is thus less easily
  483. # spoofed than the sender, which is typically just taken from the From: header
  484. # and thus easily spoofed by the end-user. However, sometimes the envelope
  485. # sender isn't set correctly and this will manifest itself by postings being
  486. # held for approval even if they appear to come from a list member. If you
  487. # are having this problem, set this variable to 0, but understand that some
  488. # spoofed messages may get through.
  489. USE_ENVELOPE_SENDER = 0
  490. # When true, Mailman will consider user@host.domain to be the same address as
  491. # user@domain. If set to 0, Mailman will consider user@host.domain to be the
  492. # same address as user@Host.DoMain, but different than user@domain. Usernames
  493. # will always be case preserved, and host parts of addresses will all be
  494. # lowercased.
  495. # FIXME: NOT ALWAYS THE RIGHT THING TO DO FOR COUNTRY CODE TLDS
  496. SMART_ADDRESS_MATCH = 1
  497. # How many members to display at a time on the admin cgi to unsubscribe them
  498. # or change their options?
  499. DEFAULT_ADMIN_MEMBER_CHUNKSIZE = 30
  500. # how many bytes of a held message post should be displayed in the admindb web
  501. # page? Use a negative number to indicate the entire message, regardless of
  502. # size (though this will slow down rendering those pages).
  503. ADMINDB_PAGE_TEXT_LIMIT = 4096
  504. # Set this variable to 1 to allow list owners to delete their own mailing
  505. # lists. You may not want to give them this power, in which case, setting
  506. # this variable to 0 instead requires list removal to be done by the site
  507. # administrator, via the command line script bin/rmlist.
  508. OWNERS_CAN_DELETE_THEIR_OWN_LISTS = 0
  509. # Set this variable to 1 to allow list owners to set the "personalized" flags
  510. # on their mailing lists. Turning these on tells Mailman to send separate
  511. # email messages to each user instead of batching them together for delivery
  512. # to the MTA. This gives each member a more personalized message, but can
  513. # have a heavy impact on the performance of your system.
  514. OWNERS_CAN_ENABLE_PERSONALIZATION = 0
  515. # These define the available types of external message metadata formats, and
  516. # the one to use by default. MARSHAL format uses Python's built-in marshal
  517. # module. BSDDB_NATIVE uses the bsddb module compiled into Python, which
  518. # links with whatever version of Berkeley db you've got on your system (in
  519. # Python 2.0 this is included by default if configure can find it). ASCII
  520. # format is a dumb repr()-based format with "key = value" Python assignments.
  521. # It is human readable and editable (as Python source code) and is appropriate
  522. # for execfile() food.
  523. METAFMT_MARSHAL = 1
  524. METAFMT_BSDDB_NATIVE = 2
  525. METAFMT_ASCII = 3
  526. METADATA_FORMAT = METAFMT_MARSHAL
  527. # This variable controls the order in which list-specific category options are
  528. # presented in the admin cgi page.
  529. ADMIN_CATEGORIES = [
  530. # First column
  531. 'general', 'passwords', 'language', 'members', 'nondigest', 'digest',
  532. # Second column
  533. 'privacy', 'bounce', 'archive', 'gateway', 'autoreply', 'topics',
  534. ]
  535. #####
  536. # List defaults
  537. #####
  538. # Should a list, by default be advertised? What is the default maximum number
  539. # of explicit recipients allowed? What is the default maximum message size
  540. # allowed?
  541. DEFAULT_LIST_ADVERTISED = 1
  542. DEFAULT_MAX_NUM_RECIPIENTS = 10
  543. DEFAULT_MAX_MESSAGE_SIZE = 40 # KB
  544. # These format strings will be expanded w.r.t. the dictionary for the
  545. # mailing list instance.
  546. DEFAULT_SUBJECT_PREFIX = "[%(real_name)s] "
  547. DEFAULT_MSG_HEADER = ""
  548. DEFAULT_MSG_FOOTER = """_______________________________________________
  549. %(real_name)s mailing list
  550. %(real_name)s@%(host_name)s
  551. %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
  552. """
  553. # Mail command processor will ignore mail command lines after designated max.
  554. DEFAULT_MAIL_COMMANDS_MAX_LINES = 25
  555. # Is the list owner notified of admin requests immediately by mail, as well as
  556. # by daily pending-request reminder?
  557. DEFAULT_ADMIN_IMMED_NOTIFY = 1
  558. # Is the list owner notified of subscribes/unsubscribes?
  559. DEFAULT_ADMIN_NOTIFY_MCHANGES = 0
  560. # Should list members, by default, have their posts be moderated?
  561. DEFAULT_DEFAULT_MEMBER_MODERATION = 0
  562. # Should non-member posts which are auto-discarded also be forwarded to the
  563. # moderators?
  564. DEFAULT_FORWARD_AUTO_DISCARDS = 1
  565. # What shold happen to non-member posts which are do not match explicit
  566. # non-member actions?
  567. # 0 = Accept
  568. # 1 = Hold
  569. # 2 = Reject
  570. # 3 = Discard
  571. DEFAULT_GENERIC_NONMEMBER_ACTION = 1
  572. # Bounce if 'To:', 'Cc:', or 'Resent-To:' fields don't explicitly name list?
  573. # This is an anti-spam measure
  574. DEFAULT_REQUIRE_EXPLICIT_DESTINATION = 1
  575. # Alternate names acceptable as explicit destinations for this list.
  576. DEFAULT_ACCEPTABLE_ALIASES ="""
  577. """
  578. # For mailing lists that have only other mailing lists for members:
  579. DEFAULT_UMBRELLA_LIST = 0
  580. # For umbrella lists, the suffix for the account part of address for
  581. # administrative notices (subscription confirmations, password reminders):
  582. DEFAULT_UMBRELLA_MEMBER_ADMIN_SUFFIX = "-owner"
  583. # This variable controls whether monthly password reminders are sent.
  584. DEFAULT_SEND_REMINDERS = 1
  585. # Send welcome messages to new users? Probably should keep this set to 1.
  586. DEFAULT_SEND_WELCOME_MSG = 1
  587. # Send goodbye messages to unsubscribed members? Probably should keep this
  588. # set to 1.
  589. DEFAULT_SEND_GOODBYE_MSG = 1
  590. # Wipe sender information, and make it look like the list-admin
  591. # address sends all messages
  592. DEFAULT_ANONYMOUS_LIST = 0
  593. # {header-name: regexp} spam filtering - we include some for example sake.
  594. DEFAULT_BOUNCE_MATCHING_HEADERS = """
  595. # Lines that *start* with a '#' are comments.
  596. to: friend@public.com
  597. message-id: relay.comanche.denmark.eu
  598. from: list@listme.com
  599. from: .*@uplinkpro.com
  600. """
  601. # Mailman can be configured to "munge" Reply-To: headers for any passing
  602. # messages. One the one hand, there are a lot of good reasons not to munge
  603. # Reply-To: but on the other, people really seem to want this feature. See
  604. # the help for reply_goes_to_list in the web UI for links discussing the
  605. # issue.
  606. # 0 - Reply-To: not munged
  607. # 1 - Reply-To: set back to the list
  608. # 2 - Reply-To: set to an explicit value (reply_to_address)
  609. DEFAULT_REPLY_GOES_TO_LIST = 0
  610. # Before munging Reply-To: Mailman can be configured to strip any existing
  611. # Reply-To: header first, or simply extend any existing Reply-To: with one
  612. # based on the above setting. This is a boolean variable.
  613. DEFAULT_FIRST_STRIP_REPLY_TO = 1
  614. # SUBSCRIBE POLICY
  615. # 0 - open list (only when ALLOW_OPEN_SUBSCRIBE is set to 1) **
  616. # 1 - confirmation required for subscribes
  617. # 2 - admin approval required for subscribes
  618. # 3 - both confirmation and admin approval required
  619. #
  620. # ** please do not choose option 0 if you are not allowing open
  621. # subscribes (next variable)
  622. DEFAULT_SUBSCRIBE_POLICY = 1
  623. # does this site allow completely unchecked subscriptions?
  624. ALLOW_OPEN_SUBSCRIBE = 0
  625. # The default policy for unsubscriptions. 0 (unmoderated unsubscribes) is
  626. # highly recommended!
  627. # 0 - unmoderated unsubscribes
  628. # 1 - unsubscribes require approval
  629. DEFAULT_UNSUBSCRIBE_POLICY = 0
  630. # Private_roster == 0: anyone can see, 1: members only, 2: admin only.
  631. DEFAULT_PRIVATE_ROSTER = 0
  632. # When exposing members, make them unrecognizable as email addrs, so
  633. # web-spiders can't pick up addrs for spam purposes.
  634. DEFAULT_OBSCURE_ADDRESSES = 1
  635. # RFC 2369 defines List-* headers which are added to every message sent
  636. # through to the mailing list membership. These are a very useful aid to end
  637. # users and should always be added. However, not all MUAs are compliant and
  638. # if a list's membership has many such users, they may clamor for these
  639. # headers to be suppressed. Because standards compliance is of high
  640. # importance, by default list owners cannot suppress these headers. By
  641. # setting this variable to 1, list owners will be given the option to suppress
  642. # these headers.
  643. ALLOW_RFC2369_OVERRIDES = 0
  644. # Check for administrivia in messages sent to the main list?
  645. DEFAULT_ADMINISTRIVIA = 1
  646. #####
  647. # Digestification defaults
  648. #####
  649. # Will list be available in non-digested form?
  650. DEFAULT_NONDIGESTABLE = 1
  651. # Will list be available in digested form?
  652. DEFAULT_DIGESTABLE = 1
  653. DEFAULT_DIGEST_HEADER = ""
  654. DEFAULT_DIGEST_FOOTER = DEFAULT_MSG_FOOTER
  655. DEFAULT_DIGEST_IS_DEFAULT = 0
  656. DEFAULT_MIME_IS_DEFAULT_DIGEST = 0
  657. DEFAULT_DIGEST_SIZE_THRESHHOLD = 30 # KB
  658. DEFAULT_DIGEST_SEND_PERIODIC = 1
  659. DEFAULT_PLAIN_DIGEST_KEEP_HEADERS = ['message', 'date', 'from',
  660. 'subject', 'to', 'cc',
  661. 'reply-to', 'organization']
  662. #####
  663. # Bounce processing defaults
  664. #####
  665. # Should we do any bounced mail response at all?
  666. DEFAULT_BOUNCE_PROCESSING = 1
  667. # Bounce processing works like this: when a bounce from a member is received,
  668. # we look up the `bounce info' for this member. If there is no bounce info,
  669. # this is the first bounce we've received from this member. In that case, we
  670. # record today's date, and initialize the bounce score (see below for initial
  671. # value).
  672. #
  673. # If there is existing bounce info for this member, we look at the last bounce
  674. # receive date. If this date is farther away from today than the `bounce
  675. # expiration interval', we throw away all the old data and initialize the
  676. # bounce score as if this were the first bounce from the member.
  677. #
  678. # Otherwise, we increment the bounce score. If we can determine whether the
  679. # bounce was soft or hard (i.e. transient or fatal), then we use a score value
  680. # of 0.5 for soft bounces and 1.0 for hard bounces. Note that we only score
  681. # one bounce per day. If the bounce score is then greater than the `bounce
  682. # threshold' we disable the member's address.
  683. #
  684. # After disabling the address, we can send warning messages to the member,
  685. # providing a confirmation cookie/url for them to use to re-enable their
  686. # delivery. After a configurable period of time, we'll delete the address.
  687. # When we delete the address due to bouncing, we'll send one last message to
  688. # the member.
  689. # Bounce scores greater than this value get disabled.
  690. DEFAULT_BOUNCE_SCORE_THRESHOLD = 5.0
  691. # Bounce information older than this interval is considered stale, and is
  692. # discarded.
  693. DEFAULT_BOUNCE_INFO_STALE_AFTER = days(7)
  694. # The number of notifications to send to the disabled/removed member before we
  695. # remove them from the list. A value of 0 means we remove the address
  696. # immediately (with one last notification). Note that the first one is sent
  697. # upon change of status to disabled.
  698. DEFAULT_BOUNCE_YOU_ARE_DISABLED_WARNINGS = 3
  699. # The interval of time between disabled warnings.
  700. DEFAULT_BOUNCE_YOU_ARE_DISABLED_WARNINGS_INTERVAL = days(7)
  701. # List of addresses (lhs of the @) that likely come only from MTAs bouncing
  702. # messages. This is used in the bounce detector and MailCommandHandler.py to
  703. # stop processing or forwarding such messages.
  704. #
  705. # TBD: why orphanage? why postoffice?
  706. LIKELY_BOUNCE_SENDERS = ('daemon', 'mailer-daemon', 'postmaster',
  707. 'orphanage', 'postoffice')
  708. #####
  709. # General time limits
  710. #####
  711. # How long should subscriptions requests await confirmation before being
  712. # dropped?
  713. PENDING_REQUEST_LIFE = days(3)
  714. # How long should messages which have delivery failures continue to be
  715. # retried? After this period of time, a message that has failed recipients
  716. # will be dequeued and those recipients will never receive the message.
  717. DELIVERY_RETRY_PERIOD = days(5)
  718. #####
  719. # Lock management defaults
  720. #####
  721. # These variables control certain aspects of lock acquisition and retention.
  722. # They should be tuned as appropriate for your environment. All variables are
  723. # specified in units of floating point seconds. YOU MAY NEED TO TUNE THESE
  724. # VARIABLES DEPENDING ON THE SIZE OF YOUR LISTS, THE PERFORMANCE OF YOUR
  725. # HARDWARE, NETWORK AND GENERAL MAIL HANDLING CAPABILITIES, ETC.
  726. # Set this to true to turn on MailList object lock debugging messages, which
  727. # will be written to logs/locks. If you think you're having lock problems, or
  728. # just want to tune the locks for your system, turn on lock debugging.
  729. LIST_LOCK_DEBUGGING = 0
  730. # This variable specifies how long the lock will be retained for a specific
  731. # operation on a mailing list. Watch your logs/lock file and if you see a lot
  732. # of lock breakages, you might need to bump this up. However if you set this
  733. # too high, a faulty script (or incorrect use of bin/withlist) can prevent the
  734. # list from being used until the lifetime expires. This is probably one of
  735. # the most crucial tuning variables in the system.
  736. LIST_LOCK_LIFETIME = hours(5)
  737. # This variable specifies how long an attempt will be made to acquire a list
  738. # lock by the incoming qrunner process. If the lock acquisition times out,
  739. # the message will be re-queued for later delivery.
  740. LIST_LOCK_TIMEOUT = seconds(10)
  741. #####
  742. # Nothing below here is user configurable. Most of these values are in this
  743. # file for convenience. Don't change any of them or override any of them in
  744. # your mm_cfg.py file!
  745. #####
  746. # These directories are used to find various important files in the Mailman
  747. # installation. PREFIX and EXEC_PREFIX are set by configure and should point
  748. # to the installation directory of the Mailman package.
  749. PYTHON = '@PYTHON@'
  750. PREFIX = '@prefix@'
  751. EXEC_PREFIX = '@exec_prefix@'
  752. VAR_PREFIX = '@VAR_PREFIX@'
  753. # Work around a bogus autoconf 2.12 bug
  754. if EXEC_PREFIX == '${prefix}':
  755. EXEC_PREFIX = PREFIX
  756. # CGI extension, change using configure script
  757. CGIEXT = '@CGIEXT@'
  758. # Group id that group-owns the Mailman installation
  759. MAILMAN_UID = @MAILMAN_UID@
  760. MAILMAN_GID = @MAILMAN_GID@
  761. # Enumeration for Mailman cgi widget types
  762. Toggle = 1
  763. Radio = 2
  764. String = 3
  765. Text = 4
  766. Email = 5
  767. EmailList = 6
  768. Host = 7
  769. Number = 8
  770. FileUpload = 9
  771. Select = 10
  772. Topics = 11
  773. Checkbox = 12
  774. # An "extended email list". Contents must be an email address or a ^-prefixed
  775. # regular expression. Used in the sender moderation text boxes.
  776. EmailListEx = 13
  777. # Held message disposition actions, for use between admindb.py and
  778. # ListAdmin.py.
  779. DEFER = 0
  780. APPROVE = 1
  781. REJECT = 2
  782. DISCARD = 3
  783. SUBSCRIBE = 4
  784. UNSUBSCRIBE = 5
  785. ACCEPT = 6
  786. HOLD = 7
  787. # Standard text field width
  788. TEXTFIELDWIDTH = 40
  789. # Bitfield for user options
  790. Digests = 0 # handled by other mechanism, doesn't need a flag.
  791. DisableDelivery = 1 # Obsolete; use set/getDeliveryStatus()
  792. DontReceiveOwnPosts = 2 # Non-digesters only
  793. AcknowledgePosts = 4
  794. DisableMime = 8 # Digesters only
  795. ConcealSubscription = 16
  796. SuppressPasswordReminder = 32
  797. ReceiveNonmatchingTopics = 64
  798. Moderate = 128
  799. # Authentication contexts.
  800. #
  801. # Mailman defines the following roles:
  802. # - User, a normal user who has no permissions except to change their personal
  803. # option settings
  804. # - List creator, someone who can create and delete lists, but cannot
  805. # (necessarily) configure the list.
  806. # - List moderator, someone who can tend to pending requests such as
  807. # subscription requests, or held messages
  808. # - List administrator, someone who has total control over a list, can
  809. # configure it, modify user options for members of the list, subscribe and
  810. # unsubscribe members, etc.
  811. # - Site administrator, someone who has total control over the entire site and
  812. # can do any of the tasks mentioned above. This person usually also has
  813. # command line access.
  814. UnAuthorized = 0
  815. AuthUser = 1 # Joe Shmoe User
  816. AuthCreator = 2 # List Creator / Destroyer
  817. AuthListAdmin = 3 # List Administrator (total control over list)
  818. AuthListModerator = 4 # List Moderator (can only handle held requests)
  819. AuthSiteAdmin = 5 # Site Administrator (total control over everything)
  820. # Useful directories
  821. LIST_DATA_DIR = os.path.join(VAR_PREFIX, 'lists')
  822. LOG_DIR = os.path.join(VAR_PREFIX, 'logs')
  823. LOCK_DIR = os.path.join(VAR_PREFIX, 'locks')
  824. DATA_DIR = os.path.join(VAR_PREFIX, 'data')
  825. SPAM_DIR = os.path.join(VAR_PREFIX, 'spam')
  826. WRAPPER_DIR = os.path.join(EXEC_PREFIX, 'mail')
  827. BIN_DIR = os.path.join(PREFIX, 'bin')
  828. SCRIPTS_DIR = os.path.join(PREFIX, 'scripts')
  829. TEMPLATE_DIR = os.path.join(PREFIX, 'templates')
  830. MESSAGES_DIR = os.path.join(PREFIX, 'messages')
  831. PUBLIC_ARCHIVE_FILE_DIR = os.path.join(VAR_PREFIX, 'archives', 'public')
  832. PRIVATE_ARCHIVE_FILE_DIR = os.path.join(VAR_PREFIX, 'archives', 'private')
  833. # Directories used by the qrunner subsystem
  834. QUEUE_DIR = os.path.join(VAR_PREFIX, 'qfiles')
  835. INQUEUE_DIR = os.path.join(QUEUE_DIR, 'in')
  836. OUTQUEUE_DIR = os.path.join(QUEUE_DIR, 'out')
  837. CMDQUEUE_DIR = os.path.join(QUEUE_DIR, 'commands')
  838. BOUNCEQUEUE_DIR = os.path.join(QUEUE_DIR, 'bounces')
  839. NEWSQUEUE_DIR = os.path.join(QUEUE_DIR, 'news')
  840. ARCHQUEUE_DIR = os.path.join(QUEUE_DIR, 'archive')
  841. SHUNTQUEUE_DIR = os.path.join(QUEUE_DIR, 'shunt')
  842. VIRGINQUEUE_DIR = os.path.join(QUEUE_DIR, 'virgin')
  843. # Other useful files
  844. PIDFILE = os.path.join(DATA_DIR, 'master-qrunner.pid')
  845. SITE_PW_FILE = os.path.join(DATA_DIR, 'adm.pw')
  846. LISTCREATOR_PW_FILE = os.path.join(DATA_DIR, 'creator.pw')
  847. # Import a bunch of version numbers
  848. from Version import *
  849. # Vgg: Language descriptions and charsets dictionary, any new supported
  850. # language must have a corresponding entry here. Key is the name of the
  851. # directories that hold the localized texts. Data are tuples with first
  852. # element being the description, as described in the catalogs, and second
  853. # element is the language charset. I have chosen code from /usr/share/locale
  854. # in my GNU/Linux. :-)
  855. def _(s):
  856. return s
  857. LC_DESCRIPTIONS = {}
  858. def add_language(code, description, charset):
  859. LC_DESCRIPTIONS[code] = (description, charset)
  860. add_language('big5', _('Traditional Chinese'), 'big5')
  861. add_language('cs', _('Czech'), 'iso-8859-2')
  862. add_language('de', _('German'), 'iso-8859-1')
  863. add_language('en', _('English (USA)'), 'us-ascii')
  864. add_language('es', _('Spanish (Spain)'), 'iso-8859-1')
  865. add_language('fr', _('French'), 'iso-8859-1')
  866. add_language('gb', _('Simplified Chinese'), 'gb2312')
  867. add_language('hu', _('Hungarian'), 'iso-8859-2')
  868. add_language('it', _('Italian'), 'iso-8859-1')
  869. add_language('ja', _('Japanese'), 'euc-jp')
  870. add_language('no', _('Norwegian'), 'iso-8859-1')
  871. add_language('ru', _('Russian'), 'koi8-r')
  872. del _
  873. # Include Python's site-packages directory. We need this until we require
  874. # Python 2.2, which includes the email package in its standard library. Until
  875. # then, we distribute the email package as a distutils install.
  876. import sys
  877. sitedir = os.path.join(sys.prefix, 'lib', 'python'+sys.version[:3],
  878. 'site-packages')
  879. sys.path.append(sitedir)