PageRenderTime 63ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 1ms

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

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