- from PLD
authorMarcin Krol <hawk@tld-linux.org>
Wed, 22 Jul 2015 10:34:13 +0000 (10:34 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Wed, 22 Jul 2015 10:34:13 +0000 (10:34 +0000)
23 files changed:
add_nonmembers [new file with mode: 0644]
keep-original-mime-headers.patch [new file with mode: 0644]
mailman-FHS.patch [new file with mode: 0644]
mailman-MM_FIND_GROUP_NAME.patch [new file with mode: 0644]
mailman-MM_FIND_USER_NAME.patch [new file with mode: 0644]
mailman-browser-save-passwd.patch [new file with mode: 0644]
mailman-build.patch [new file with mode: 0644]
mailman-cron.patch [new file with mode: 0644]
mailman-daemonize-fds.patch [new file with mode: 0644]
mailman-dont-send-broken-reminder-ugly-hack.patch [new file with mode: 0644]
mailman-httpauth.patch [new file with mode: 0644]
mailman-lib64.patch [new file with mode: 0644]
mailman-mailmanctl-status.patch [new file with mode: 0644]
mailman-python-compile.patch [new file with mode: 0644]
mailman-umbrella-anon-hack.patch [new file with mode: 0644]
mailman-x-imap-folder.patch [new file with mode: 0644]
mailman.conf [new file with mode: 0644]
mailman.init [new file with mode: 0644]
mailman.logrotate [new file with mode: 0644]
mailman.spec [new file with mode: 0644]
mailman.sysconfig [new file with mode: 0644]
mailman.tmpfiles [new file with mode: 0644]
subscribe_list [new file with mode: 0644]

diff --git a/add_nonmembers b/add_nonmembers
new file mode 100644 (file)
index 0000000..755811d
--- /dev/null
@@ -0,0 +1,273 @@
+#! /usr/bin/python
+#
+# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software 
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# argv[1] should be the name of the list.
+
+# Make sure that the list of email addresses doesn't contain any comments,
+# like majordomo may throw in.  For now, you just have to remove them manually.
+
+"""Add nonmembers to a list from the command line.
+
+Usage:
+    add_nonmembers [options] listname
+
+Options:
+
+    --accepted-file=file
+    -a file
+        A file containing addresses of the members to be added,
+        one address per line, to the list of postings which are
+        automatically accepted. If file is `-', read addresses
+        from stdin.
+
+    --moderated-file=file
+    -m file
+        A file containing addresses of the members to be added,
+        one address per line, to the list of postings which are
+        held for moderation. If file is `-', read addresses
+        from stdin.
+
+    --rejected-file=file
+    -r file
+        A file containing addresses of the members to be added,
+        one address per line, to the list of postings which are
+        automatically rejected. If file is `-', read addresses
+        from stdin.
+
+    --discarded-file=file
+    -d file
+        A file containing addresses of the members to be added,
+        one address per line, to the list of postings which are
+        automatically discarded. If file is `-', read addresses
+        from stdin.
+
+    --empty
+    -e
+        Empty all current addresses from the list before adding
+        new addresses.
+
+    --verbose
+    -v
+        Verbose output.  Display messages stating whether each
+        address was added or already in a list
+
+    --help
+    -h
+        Print this help message and exit.
+
+    listname
+        The name of the Mailman list you are adding members to.  It must
+        already exist.
+
+You must supply at least one of -n and -d options.  At most one of the
+files can be `-'.
+"""
+
+import sys
+import os
+import getopt
+from cStringIO import StringIO
+
+import paths
+# Import this /after/ paths so that the sys.path is properly hacked
+from email.Utils import parseaddr
+
+from Mailman import MailList
+from Mailman import Utils
+from Mailman import Message
+from Mailman import Errors
+from Mailman import mm_cfg
+from Mailman import i18n
+
+_ = i18n._
+
+
+\f
+def usage(status, msg=''):
+    print >> sys.stderr, _(__doc__)
+    if msg:
+        print >> sys.stderr, msg
+    sys.exit(status)
+
+
+\f
+def readfile(filename):
+    if filename == '-':
+        fp = sys.stdin
+        closep = 0
+    else:
+        fp = open(filename)
+        closep = 1
+    # strip all the lines of whitespace and discard blank lines
+    lines = filter(None, [line.strip() for line in fp.readlines()])
+    if closep:
+        fp.close()
+    return lines
+
+
+\f
+class Tee:
+    def __init__(self, outfp):
+        self.__outfp = outfp
+
+    def write(self, msg):
+        sys.stdout.write(msg)
+        self.__outfp.write(msg)
+
+
+class UserDesc: pass
+
+
+\f
+def addall(mlist, submlist, list, members, verbose, outfp):
+    tee = Tee(outfp)
+
+    for member in members:
+        if member in mlist.accept_these_nonmembers:
+            if verbose:
+                print >> tee, _('%(list)s: already in accept_these_nonmembers: %(member)s')
+        elif member in mlist.hold_these_nonmembers:
+            if verbose:
+                print >> tee, _('%(list)s: already in hold_these_nonmembers: %(member)s')
+        elif member in mlist.reject_these_nonmembers:
+            if verbose:
+                print >> tee, _('%(list)s: already in reject_these_nonmembers: %(member)s')
+        elif member in mlist.discard_these_nonmembers:
+            if verbose:
+                print >> tee, _('%(list)s: already in discard_these_nonmembers: %(member)s')
+        else:
+            submlist.append(member)
+            if verbose:
+                print >> tee, _('%(list)s: added: %(member)s')
+
+    return submlist
+
+\f
+def main():
+    try:
+        opts, args = getopt.getopt(sys.argv[1:],
+                                   'a:m:r:d:ehv',
+                                   ['accepted-file=',
+                                    'moderated-file=',
+                                    'rejected-file=',
+                                    'discarded-file=',
+                                    'empty-list',
+                                    'verbose',
+                                    'help'])
+    except getopt.error, msg:
+        usage(1, msg)
+
+    if len(args) <> 1:
+        usage(1)
+
+    listname = args[0].lower().strip()
+    afile = None
+    mfile = None
+    rfile = None
+    dfile = None
+    verbose = 0
+    empty = 0
+    stdin = 0
+    for opt, arg in opts:
+        if opt in ('-h', '--help'):
+            usage(0)
+        elif opt in ('-a', '--accepted-file'):
+            afile = arg
+            if afile == "-":
+                stdin += 1
+        elif opt in ('-m', '--moderated-file'):
+            mfile = arg
+            if mfile == "-":
+                stdin += 1
+        elif opt in ('-r', '--rejected-file'):
+            rfile = arg
+            if rfile == "-":
+                stdin += 1
+        elif opt in ('-d', '--discarded-file'):
+            dfile = arg
+            if dfile == "-":
+                stdin += 1
+        elif opt in ('-e', '--empty-list'):
+            empty = 1
+        elif opt in ('-v', '--verbose'):
+            verbose = 1
+
+    if afile is None and mfile is None and rfile is None and dfile is None:
+        usage(1)
+
+    if stdin > 1:
+        usage(1, _('Cannot read more than one list of members '
+                   'from standard input.'))
+
+    try:
+        mlist = MailList.MailList(listname)
+    except Errors.MMUnknownListError:
+        usage(1, _('No such list: %(listname)s'))
+
+    otrans = i18n.get_translation()
+
+    # Read the member files
+    try:
+        amembers = []
+        mmembers = []
+        rmembers = []
+        dmembers = []
+        if afile:
+            amembers = readfile(afile)
+            if empty:
+                mlist.accept_these_nonmembers = []
+        if mfile:
+            mmembers = readfile(mfile)
+            if empty:
+                mlist.hold_these_nonmembers = []
+        if rfile:
+            rmembers = readfile(rfile)
+            if empty:
+                mlist.reject_these_nonmembers = []
+        if dfile:
+            dmembers = readfile(dfile)
+            if empty:
+                mlist.discard_these_nonmembers = []
+
+        if not amembers and not mmembers and not rmembers and not dmembers \
+               and not empty:
+            usage(0, _('Nothing to do.'))
+
+        s = StringIO()
+        i18n.set_language(mlist.preferred_language)
+
+        if afile:
+            mlist.accept_these_nonmembers = addall(mlist, mlist.accept_these_nonmembers, 'accept_these_nonmembers', amembers, verbose, s)
+
+        if mfile:
+            mlist.hold_these_nonmembers = addall(mlist, mlist.hold_these_nonmembers, 'hold_these_nonmembers', mmembers, verbose, s)
+
+        if rfile:
+            mlist.reject_these_nonmembers = addall(mlist, mlist.reject_these_nonmembers, 'reject_these_nonmembers', rmembers, verbose, s)
+
+        if dfile:
+            mlist.discard_these_nonmembers = addall(mlist, mlist.discard_these_nonmembers, 'discard_these_nonmembers', dmembers, verbose, s)
+
+        mlist.Save()
+    finally:
+        mlist.Unlock()
+        i18n.set_translation(otrans)
+
+\f
+if __name__ == '__main__':
+    main()
diff --git a/keep-original-mime-headers.patch b/keep-original-mime-headers.patch
new file mode 100644 (file)
index 0000000..a3b1732
--- /dev/null
@@ -0,0 +1,75 @@
+save original mime headers from attachment to .raw file and send them back when
+attachment is accessed over cgi. as the logistic of saving attachment with
+filename is quite unreliable, even if the content-types match for input and
+output the filename extension offered may make no sense on client computer.
+
+for example input email has:
+Name: test.rtf
+Type: application/msword
+Size: 17084 bytes
+
+Mailman will detect from mimetype .dot extension:
+python -c 'from mimetypes import guess_all_extensions; print guess_all_extensions("application/msword");'
+['.wiz', '.dot', '.doc']
+
+and save as test.wiz, client will request such file, and will get:
+Content-Type: application/msword
+
+and will save as test.wiz, now client desktop has no ideas how to open .wiz
+file and has to rename file manually to .rtf to actually being able top open it
+with double click.
+
+saving and sending original headers ensures we get original filename that was
+in email. works for private archives but unfortunately as public archives are
+sent out direcly by webserver which we have no control over the extra headers
+to send. (altho if we mod_asis could work here, but that means totally
+incompatible storage from previous versions)
+
+Signed-off-by: Elan Ruusamäe <glen@delfi.ee>
+--- mailman-2.1.13/Mailman/Cgi/private.py~     2010-08-27 14:28:41.000000000 +0300
++++ mailman-2.1.13/Mailman/Cgi/private.py      2010-08-27 14:28:45.036366738 +0300
+@@ -175,6 +175,12 @@
+             f = gzip.open(true_filename, 'r')
+         else:
+             f = open(true_filename, 'r')
++            if mm_cfg.ARCHIVER_STORES_ATTACHMENT_HEADERS:
++                # if .raw exists, dump it out as it contains extra headers
++                if os.path.exists(true_filename + '.raw'):
++                    fh = open(true_filename + '.raw', 'r')
++                    sys.stdout.write(fh.read())
++                    fh.close()
+     except IOError:
+         msg = _('Private archive file not found')
+         doc.SetTitle(msg)
+--- mailman-2.1.13/Mailman/Handlers/Scrubber.py~       2010-08-27 15:27:27.000000000 +0300
++++ mailman-2.1.13/Mailman/Handlers/Scrubber.py        2010-08-27 15:27:33.452165228 +0300
+@@ -520,6 +520,15 @@
+     fp = open(path, 'w')
+     fp.write(decodedpayload)
+     fp.close()
++
++    # print Content-Type and Content-Disposition we found to .raw for Cgi.private to use
++    if mm_cfg.ARCHIVER_STORES_ATTACHMENT_HEADERS:
++        f = open(path + '.raw', 'w')
++        for k, v in msg.items():
++            if k.lower() in ['content-type', 'content-disposition']:
++                f.write("%s: %s\n" % (k, v.replace("\n ", " ").replace("\n\t", " ")))
++        f.close()
++
+     # Now calculate the url
+     baseurl = mlist.GetBaseArchiveURL()
+     # Private archives will likely have a trailing slash.  Normalize.
+--- mailman-2.1.13/Mailman/Defaults.py.in~     2010-08-27 17:48:45.000000000 +0300
++++ mailman-2.1.13/Mailman/Defaults.py.in      2010-08-29 16:15:45.888393508 +0300
+@@ -335,6 +335,11 @@
+ # in the archives too.
+ ARCHIVER_OBSCURES_EMAILADDRS = Yes
++# Whether archive stores attachment headers which contain original MIME type
++# and filenames For private archives those headers are sent back as well when
++# serving content. Note that this changes behaviour and maybe insecure.
++ARCHIVER_STORES_ATTACHMENT_HEADERS = No
++
+ # Pipermail assumes that message bodies contain US-ASCII text.
+ # Change this option to define a different character set to be used as
+ # the default character set for the archive.  The term "character set"
diff --git a/mailman-FHS.patch b/mailman-FHS.patch
new file mode 100644 (file)
index 0000000..ab3929b
--- /dev/null
@@ -0,0 +1,213 @@
+--- mailman-2.1.5.orig/bin/check_perms 2003-03-31 15:07:55.000000000 -0500
++++ mailman-2.1.5.FHS/bin/check_perms  2004-10-08 16:05:09.000000000 -0400
+@@ -164,7 +164,8 @@
+         print _('checking mode for %(prefix)s')
+     dirs = {}
+     for d in (mm_cfg.PREFIX, mm_cfg.EXEC_PREFIX, mm_cfg.VAR_PREFIX,
+-              mm_cfg.LOG_DIR):
++              mm_cfg.CONFIG_DIR, mm_cfg.DATA_DIR, mm_cfg.LOCK_DIR,
++              mm_cfg.LOG_DIR, mm_cfg.QUEUE_DIR, mm_cfg.PID_DIR):
+         dirs[d] = True
+     for d in dirs.keys():
+         try:
+--- mailman-2.1.5.orig/configure.in    2003-12-24 12:11:48.000000000 -0500
++++ mailman-2.1.5.FHS/configure.in     2004-09-30 16:13:56.000000000 -0400
+@@ -180,7 +180,7 @@
+ AC_SUBST(VAR_PREFIX)
+ AC_MSG_CHECKING(for --with-var-prefix)
+ AC_ARG_WITH(var-prefix, dnl
+-[  --with-var-prefix     directory for mutable data [/var/mailman]])
++[  --with-var-prefix    directory for mutable data [/var/mailman]])
+ case "$with_var_prefix" in
+         yes)    VAR_PREFIX="$default_var_prefix"; ans=$VAR_PREFIX;;
+         ""|no)  VAR_PREFIX="$prefix"; ans="no";;
+@@ -207,6 +207,61 @@
+     prefixcheck=$VAR_PREFIX
+ fi
++# Get the configuration file directory
++AC_SUBST(CONFIG_DIR)
++AC_MSG_CHECKING(for --with-config-dir)
++AC_ARG_WITH(config-dir, dnl
++[  --with-config-dir    specify directory for configuration data other than [VAR_]PREFIX/data])
++case "$with_config_dir" in
++    yes|no|"") CONFIG_DIR="$VAR_PREFIX/data";;
++    *)         CONFIG_DIR=$with_config_dir;;
++esac
++AC_MSG_RESULT($CONFIG_DIR)
++
++# Get the lock directory
++AC_SUBST(LOCK_DIR)
++AC_MSG_CHECKING(for --with-lock-dir)
++AC_ARG_WITH(lock-dir, dnl
++[  --with-lock-dir    specify directory for lock files other than [VAR_]PREFIX/locks])
++case "$with_lock_dir" in
++    yes|no|"") LOCK_DIR="$VAR_PREFIX/locks";;
++    *)         LOCK_DIR=$with_lock_dir;;
++esac
++AC_MSG_RESULT($LOCK_DIR)
++
++# Get the log directory
++AC_SUBST(LOG_DIR)
++AC_MSG_CHECKING(for --with-log-dir)
++AC_ARG_WITH(log-dir, dnl
++[  --with-log-dir    specify directory for log files other than [VAR_]PREFIX/logs])
++case "$with_log_dir" in
++    yes|no|"") LOG_DIR="$VAR_PREFIX/logs";;
++    *)         LOG_DIR=$with_log_dir;;
++esac
++AC_MSG_RESULT($LOG_DIR)
++
++# Get the pid directory
++AC_SUBST(PID_DIR)
++AC_MSG_CHECKING(for --with-pid-dir)
++AC_ARG_WITH(pid-dir, dnl
++[  --with-pid-dir    specify directory for the pid file other than [VAR_]PREFIX/data])
++case "$with_pid_dir" in
++    yes|no|"") PID_DIR="$VAR_PREFIX/data";;
++    *)         PID_DIR=$with_pid_dir;;
++esac
++AC_MSG_RESULT($PID_DIR)
++
++# Get the queue directory
++AC_SUBST(QUEUE_DIR)
++AC_MSG_CHECKING(for --with-queue-dir)
++AC_ARG_WITH(queue-dir, dnl
++[  --with-queue-dir    specify directory for queue files other than [VAR_]PREFIX/qfiles])
++case "$with_queue_dir" in
++    yes|no|"") QUEUE_DIR="$VAR_PREFIX/qfiles";;
++    *)         QUEUE_DIR=$with_queue_dir;;
++esac
++AC_MSG_RESULT($QUEUE_DIR)
++
+ # new macro for finding group names
+ AC_DEFUN(MM_FIND_GROUP_NAME, [
+ # $1 == variable name
+@@ -619,7 +674,7 @@
+            templates/Makefile cron/Makefile scripts/Makefile messages/Makefile
+            cron/crontab.in misc/mailman Makefile
+            tests/Makefile tests/bounces/Makefile tests/msgs/Makefile
+-           $SCRIPTS],
++           $SCRIPTS ],
+         echo "configuration completed at" `date`)
+ # Make sure all the build scripts are executable.
+--- mailman-2.1.5.orig/Mailman/Defaults.py.in  2004-04-24 22:30:03.000000000 -0400
++++ mailman-2.1.5.FHS/Mailman/Defaults.py.in   2004-10-08 14:38:57.000000000 -0400
+@@ -1198,9 +1198,11 @@
+ # Useful directories
+ LIST_DATA_DIR   = os.path.join(VAR_PREFIX, 'lists')
+-LOG_DIR         = os.path.join(VAR_PREFIX, 'logs')
+-LOCK_DIR        = os.path.join(VAR_PREFIX, 'locks')
++LOG_DIR         = '@LOG_DIR@'
++LOCK_DIR        = '@LOCK_DIR@'
++CONFIG_DIR      = '@CONFIG_DIR@'
+ DATA_DIR        = os.path.join(VAR_PREFIX, 'data')
++PID_DIR         = '@PID_DIR@'
+ SPAM_DIR        = os.path.join(VAR_PREFIX, 'spam')
+ WRAPPER_DIR     = os.path.join(EXEC_PREFIX, 'mail')
+ BIN_DIR         = os.path.join(PREFIX, 'bin')
+@@ -1211,7 +1213,7 @@
+ PRIVATE_ARCHIVE_FILE_DIR = os.path.join(VAR_PREFIX, 'archives', 'private')
+ # Directories used by the qrunner subsystem
+-QUEUE_DIR       = os.path.join(VAR_PREFIX, 'qfiles')
++QUEUE_DIR       = '@QUEUE_DIR@'
+ INQUEUE_DIR     = os.path.join(QUEUE_DIR, 'in')
+ OUTQUEUE_DIR    = os.path.join(QUEUE_DIR, 'out')
+ CMDQUEUE_DIR    = os.path.join(QUEUE_DIR, 'commands')
+@@ -1225,9 +1227,9 @@
+ MAILDIR_DIR     = os.path.join(QUEUE_DIR, 'maildir')
+ # Other useful files
+-PIDFILE = os.path.join(DATA_DIR, 'master-qrunner.pid')
+-SITE_PW_FILE = os.path.join(DATA_DIR, 'adm.pw')
+-LISTCREATOR_PW_FILE = os.path.join(DATA_DIR, 'creator.pw')
++PIDFILE = os.path.join(PID_DIR, 'master-qrunner.pid')
++SITE_PW_FILE = os.path.join(CONFIG_DIR, 'adm.pw')
++LISTCREATOR_PW_FILE = os.path.join(CONFIG_DIR, 'creator.pw')
+ # Import a bunch of version numbers
+ from Version import *
+--- mailman-2.1.5.orig/Mailman/MTA/Postfix.py  2003-03-31 16:49:43.000000000 -0500
++++ mailman-2.1.5.FHS/Mailman/MTA/Postfix.py   2004-10-08 16:02:20.000000000 -0400
+@@ -32,8 +32,8 @@
+ from Mailman.Logging.Syslog import syslog
+ LOCKFILE = os.path.join(mm_cfg.LOCK_DIR, 'creator')
+-ALIASFILE = os.path.join(mm_cfg.DATA_DIR, 'aliases')
+-VIRTFILE = os.path.join(mm_cfg.DATA_DIR, 'virtual-mailman')
++ALIASFILE = os.path.join(mm_cfg.CONFIG_DIR, 'aliases')
++VIRTFILE = os.path.join(mm_cfg.CONFIG_DIR, 'virtual-mailman')
+ try:
+     True, False
+--- mailman-2.1.5.orig/Makefile.in     2003-03-31 14:26:57.000000000 -0500
++++ mailman-2.1.5.FHS/Makefile.in      2004-10-15 16:48:17.000000000 -0400
+@@ -28,6 +28,11 @@
+ prefix=               @prefix@
+ exec_prefix=  @exec_prefix@
+ var_prefix=   @VAR_PREFIX@
++configdir=    @CONFIG_DIR@
++lockdir=      @LOCK_DIR@
++logdir=               @LOG_DIR@
++piddir=               @PID_DIR@
++queuedir=     @QUEUE_DIR@
+ DESTDIR=
+ CC=           @CC@
+@@ -41,8 +46,12 @@
+ OPT=          @OPT@
+ CFLAGS=               @CFLAGS@ $(OPT) $(DEFS)
++FHS_DIRS= \
++      ${configdir} ${lockdir} ${logdir} ${piddir} ${queuedir}
++
++
+ VAR_DIRS= \
+-      logs archives lists locks data spam qfiles \
++      archives lists data spam \
+       archives/private archives/public
+ ARCH_INDEP_DIRS= \
+@@ -96,6 +105,15 @@
+           else true; \
+           fi; \
+       done
++      @for d in $(FHS_DIRS); \
++      do \
++          dir=$(DESTDIR)/$$d; \
++          if test ! -d $$dir; then \
++              echo "Creating directory $$dir"; \
++              $(INSTALL) -d -m $(DIRMODE) $$dir; \
++          else true; \
++          fi; \
++      done
+       chmod o-r $(DESTDIR)$(var_prefix)/archives/private
+       @for d in $(ARCH_INDEP_DIRS); \
+       do \
+--- mailman-2.1.5.orig/misc/Makefile.in        2004-05-13 23:34:34.000000000 -0400
++++ mailman-2.1.5.FHS/misc/Makefile.in 2004-10-13 14:00:19.000000000 -0400
+@@ -26,6 +26,12 @@
+ prefix=       @prefix@
+ exec_prefix=  @exec_prefix@
+ var_prefix=   @VAR_PREFIX@
++configdir=    @CONFIG_DIR@
++lockdir=      @LOCK_DIR@
++logdir=               @LOG_DIR@
++piddir=               @PID_DIR@
++queuedir=     @QUEUE_DIR@
++MAILMAN_GROUP=  @MAILMAN_GROUP@
+ DESTDIR=
+ CC=           @CC@
+@@ -84,7 +90,7 @@
+           $(INSTALL) -m $(FILEMODE) paths.py $$dir; \
+       done
+       $(INSTALL) -m $(EXEMODE) mailman $(DESTDIR)$(SCRIPTSDIR)
+-      $(INSTALL) -m $(FILEMODE) sitelist.cfg $(DESTDIR)$(DATADIR)
++      $(INSTALL) -m $(FILEMODE) sitelist.cfg $(DESTDIR)$(configdir)
+ install-packages:
+       for p in $(PACKAGES); \
diff --git a/mailman-MM_FIND_GROUP_NAME.patch b/mailman-MM_FIND_GROUP_NAME.patch
new file mode 100644 (file)
index 0000000..1e9cf72
--- /dev/null
@@ -0,0 +1,39 @@
+diff -urN mailman-2.1.2.orig/configure.in mailman-2.1.2/configure.in
+--- mailman-2.1.2.orig/configure.in    2003-04-22 05:34:51.000000000 +0200
++++ mailman-2.1.2/configure.in 2003-10-04 10:27:52.070293960 +0200
+@@ -212,31 +212,9 @@
+ # $1 == variable name
+ # $2 == user id to check for
+ AC_SUBST($1)
+-changequote(,)
+-if test -z "$$1"
+-then
+-    cat > conftest.py <<EOF
+-import grp
+-gid = ''
+-for group in "$2".split():
+-    try:
+-        try:
+-            gname = grp.getgrgid(int(group))[0]
+-            break
+-        except ValueError:
+-            gname = grp.getgrnam(group)[0]
+-            break
+-    except KeyError:
+-        gname = ''
+-fp = open("conftest.out", "w")
+-fp.write("%s\n" % gname)
+-fp.close()
+-EOF
+-    $PYTHON conftest.py
+-    $1=`cat conftest.out`
+-fi
+-changequote([, ])
+-rm -f conftest.out conftest.py])
++
++$1=$2
++])
+ # new macro for finding UIDs
+
diff --git a/mailman-MM_FIND_USER_NAME.patch b/mailman-MM_FIND_USER_NAME.patch
new file mode 100644 (file)
index 0000000..239dbb8
--- /dev/null
@@ -0,0 +1,36 @@
+--- mailman-2.1.12/configure.in~       2010-01-20 14:28:15.842832566 +0100
++++ mailman-2.1.12/configure.in        2010-01-20 14:34:13.560833631 +0100
+@@ -318,31 +318,8 @@
+ # $1 == variable name
+ # $2 == user id to check for
+ AC_SUBST($1)
+-changequote(,)
+-if test -z "$$1"
+-then
+-    cat > conftest.py <<EOF
+-import pwd
+-uid = ''
+-for user in "$2".split():
+-    try:
+-        try:
+-            uname = pwd.getpwuid(int(user))[0]
+-            break
+-        except ValueError:
+-            uname = pwd.getpwnam(user)[0]
+-            break
+-    except KeyError:
+-        uname = ''
+-fp = open("conftest.out", "w")
+-fp.write("%s\n" % uname)
+-fp.close()
+-EOF
+-    $PYTHON conftest.py
+-    $1=`cat conftest.out`
+-fi
+-changequote([, ])
+-rm -f conftest.out conftest.py])
++$1=$2
++])
+ # Check for some other uid to use than `mailman'
+ AC_MSG_CHECKING(for --with-username)
diff --git a/mailman-browser-save-passwd.patch b/mailman-browser-save-passwd.patch
new file mode 100644 (file)
index 0000000..b159420
--- /dev/null
@@ -0,0 +1,484 @@
+
+NOTE: be sure to use vim -b when editing this file!
+
+http://stackoverflow.com/questions/5461153/how-to-completely-turn-off-vims-abilty-to-recode-files
+
+diff -ur mailman-2.1.14/templates/ar/admlogin.html mailman-2.1.14-form/templates/ar/admlogin.html
+--- mailman-2.1.14/templates/ar/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/ar/admlogin.html     2011-09-04 10:55:52.865551595 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">كلمة سر %(who)s القائمة:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/ast/admlogin.html mailman-2.1.14-form/templates/ast/admlogin.html
+--- mailman-2.1.14/templates/ast/admlogin.html 2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/ast/admlogin.html    2011-09-04 10:55:52.868884928 +0200
+@@ -15,7 +15,8 @@
+     <tr>
+       <td><div align="right">Llista Contrase&ntilde;es %(who)s:</div>
+ </td>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/ca/admlogin.html mailman-2.1.14-form/templates/ca/admlogin.html
+--- mailman-2.1.14/templates/ca/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/ca/admlogin.html     2011-09-04 10:55:52.868884928 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div align="right">Contrasenya de %(who)s de la llista:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/cs/admlogin.html mailman-2.1.14-form/templates/cs/admlogin.html
+--- mailman-2.1.14/templates/cs/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/cs/admlogin.html     2011-09-04 10:55:52.872218260 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Heslo pro %(who)s:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/da/admlogin.html mailman-2.1.14-form/templates/da/admlogin.html
+--- mailman-2.1.14/templates/da/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/da/admlogin.html     2011-09-04 10:55:52.872218260 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Listens %(who)s adgangskode:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/de/admlogin.html mailman-2.1.14-form/templates/de/admlogin.html
+--- mailman-2.1.14/templates/de/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/de/admlogin.html     2011-09-04 10:55:52.875551592 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">%(who)s-Passwort:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/en/admlogin.html mailman-2.1.14-form/templates/en/admlogin.html
+--- mailman-2.1.14/templates/en/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/en/admlogin.html     2011-09-04 10:55:52.875551592 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">List %(who)s Password:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/es/admlogin.html mailman-2.1.14-form/templates/es/admlogin.html
+--- mailman-2.1.14/templates/es/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/es/admlogin.html     2011-09-04 10:55:52.878884925 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Clave del %(who)s de la lista:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/et/admlogin.html mailman-2.1.14-form/templates/et/admlogin.html
+--- mailman-2.1.14/templates/et/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/et/admlogin.html     2011-09-04 10:55:52.878884925 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Listi %(who)s parool:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/eu/admlogin.html mailman-2.1.14-form/templates/eu/admlogin.html
+--- mailman-2.1.14/templates/eu/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/eu/admlogin.html     2011-09-04 10:55:52.878884925 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">%(who)sren Pasahitza:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/fi/admlogin.html mailman-2.1.14-form/templates/fi/admlogin.html
+--- mailman-2.1.14/templates/fi/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/fi/admlogin.html     2011-09-04 10:55:52.882218259 +0200
+@@ -15,7 +15,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Listan %(who)s Salasana:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/fr/admlogin.html mailman-2.1.14-form/templates/fr/admlogin.html
+--- mailman-2.1.14/templates/fr/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/fr/admlogin.html     2011-09-04 10:55:52.882218259 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD> <div ALIGN="Right">Mot de passe %(who)s de la liste: </div> </TD>
+-      <TD> <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD> <INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle> <INPUT type="SUBMIT" 
+diff -ur mailman-2.1.14/templates/gl/admlogin.html mailman-2.1.14-form/templates/gl/admlogin.html
+--- mailman-2.1.14/templates/gl/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/gl/admlogin.html     2011-09-04 10:55:52.885551594 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right"></Chave de %(who)s da rolda:></div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/he/admlogin.html mailman-2.1.14-form/templates/he/admlogin.html
+--- mailman-2.1.14/templates/he/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/he/admlogin.html     2011-09-04 10:55:52.885551594 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="left">סיסמת הרשימה %(who)s:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/hr/admlogin.html mailman-2.1.14-form/templates/hr/admlogin.html
+--- mailman-2.1.14/templates/hr/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/hr/admlogin.html     2011-09-04 10:55:52.888884928 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">%(who)sska lozinka liste:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/hu/admlogin.html mailman-2.1.14-form/templates/hu/admlogin.html
+--- mailman-2.1.14/templates/hu/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/hu/admlogin.html     2011-09-04 10:55:52.888884928 +0200
+@@ -13,7 +13,8 @@
+     </TR>
+     <tr>
+       <TD> <div ALIGN="Right">Lista %(who)s Jelszava: </div> </TD>
+-      <TD> <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD> <INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle> <INPUT TYPE="SUBMIT" name="admlogin"
+--- mailman-2.1.20/templates/ia/admlogin.html~ 2015-05-25 11:30:53.000000000 +0300
++++ mailman-2.1.20/templates/ia/admlogin.html  2015-05-25 11:30:54.870489260 +0300
+@@ -15,7 +15,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Contrasigno de %(who)s pro le lista:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/it/admlogin.html mailman-2.1.14-form/templates/it/admlogin.html
+--- mailman-2.1.14/templates/it/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/it/admlogin.html     2011-09-04 10:55:52.892218261 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+     <TD><div ALIGN="Right">Password di lista per %(who)s:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/ja/admlogin.html mailman-2.1.14-form/templates/ja/admlogin.html
+--- mailman-2.1.14/templates/ja/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/ja/admlogin.html     2011-09-04 10:55:52.892218261 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">¥ê¥¹¥È %(who)s ¥Ñ¥¹¥ï¡¼¥É:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/ko/admlogin.html mailman-2.1.14-form/templates/ko/admlogin.html
+--- mailman-2.1.14/templates/ko/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/ko/admlogin.html     2011-09-04 10:58:38.895559084 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD> <div ALIGN="Right"> ¸ÞÀϸµ ¸®½ºÆ® °ü¸®ÀÚ ºñ¹Ð¹øÈ£: </div> </TD>
+-      <TD> <INPUT TYPE=password NAME=adminpw SIZE=30></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle> <INPUT TYPE=SUBMIT name="request_login"
+diff -ur mailman-2.1.14/templates/lt/admlogin.html mailman-2.1.14-form/templates/lt/admlogin.html
+--- mailman-2.1.14/templates/lt/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/lt/admlogin.html     2011-09-04 10:55:52.895551593 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Forumo %(who)s slaptaþodis:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/nl/admlogin.html mailman-2.1.14-form/templates/nl/admlogin.html
+--- mailman-2.1.14/templates/nl/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/nl/admlogin.html     2011-09-04 10:55:52.898884926 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Lijst%(who)s wachtwoord:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/no/admlogin.html mailman-2.1.14-form/templates/no/admlogin.html
+--- mailman-2.1.14/templates/no/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/no/admlogin.html     2011-09-04 10:55:52.898884926 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Listens %(who)s passord:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/pl/admlogin.html mailman-2.1.14-form/templates/pl/admlogin.html
+--- mailman-2.1.14/templates/pl/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/pl/admlogin.html     2011-09-04 10:55:52.902218260 +0200
+@@ -15,7 +15,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Has³o %(who)s:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/pt/admlogin.html mailman-2.1.14-form/templates/pt/admlogin.html
+--- mailman-2.1.14/templates/pt/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/pt/admlogin.html     2011-09-04 10:55:52.902218260 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">List %(who)s Password:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/pt_BR/admlogin.html mailman-2.1.14-form/templates/pt_BR/admlogin.html
+--- mailman-2.1.14/templates/pt_BR/admlogin.html       2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/pt_BR/admlogin.html  2011-09-04 10:55:52.905551594 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Senha de %(who)s na Lista:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/ro/admlogin.html mailman-2.1.14-form/templates/ro/admlogin.html
+--- mailman-2.1.14/templates/ro/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/ro/admlogin.html     2011-09-04 10:55:52.905551594 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right"><b>%(who)s</b>: parola de acces</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+--- mailman-2.1.20/templates/ru/admlogin.html~ 2015-03-31 20:21:49.000000000 +0300
++++ mailman-2.1.20/templates/ru/admlogin.html  2015-05-25 11:37:56.109031155 +0300
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Введите пароль %(who)s:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT" name="admlogin" value="Начать работу..."></td>
+diff -ur mailman-2.1.14/templates/sk/admlogin.html mailman-2.1.14-form/templates/sk/admlogin.html
+--- mailman-2.1.14/templates/sk/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/sk/admlogin.html     2011-09-04 10:55:52.908884928 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Heslo pre %(who)s:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/sl/admlogin.html mailman-2.1.14-form/templates/sl/admlogin.html
+--- mailman-2.1.14/templates/sl/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/sl/admlogin.html     2011-09-04 10:55:52.908884928 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Geslo za %(who)s:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/sr/admlogin.html mailman-2.1.14-form/templates/sr/admlogin.html
+--- mailman-2.1.14/templates/sr/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/sr/admlogin.html     2011-09-04 10:55:52.912218262 +0200
+@@ -12,7 +12,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Лозинка за листу%(who)s:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/sv/admlogin.html mailman-2.1.14-form/templates/sv/admlogin.html
+--- mailman-2.1.14/templates/sv/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/sv/admlogin.html     2011-09-04 10:55:52.912218262 +0200
+@@ -13,7 +13,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Listan %(who)s l&ouml;senord:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/tr/admlogin.html mailman-2.1.14-form/templates/tr/admlogin.html
+--- mailman-2.1.14/templates/tr/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/tr/admlogin.html     2011-09-04 10:55:52.915551595 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Liste %(who)s Þifresi:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/uk/admlogin.html mailman-2.1.14-form/templates/uk/admlogin.html
+--- mailman-2.1.14/templates/uk/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/uk/admlogin.html     2011-09-04 10:55:52.915551595 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Введіть пароль користувача %(who)s:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/vi/admlogin.html mailman-2.1.14-form/templates/vi/admlogin.html
+--- mailman-2.1.14/templates/vi/admlogin.html  2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/vi/admlogin.html     2011-09-04 10:55:52.918884928 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">Mật khẩu hộp thư %(who)s:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/zh_CN/admlogin.html mailman-2.1.14-form/templates/zh_CN/admlogin.html
+--- mailman-2.1.14/templates/zh_CN/admlogin.html       2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/zh_CN/admlogin.html  2011-09-04 10:55:52.918884928 +0200
+@@ -14,7 +14,8 @@
+     </TR>
+     <tr>
+       <TD><div ALIGN="Right">显示 %(who)s密码:</div></TD>
+-      <TD><INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle><INPUT type="SUBMIT"
+diff -ur mailman-2.1.14/templates/zh_TW/admlogin.html mailman-2.1.14-form/templates/zh_TW/admlogin.html
+--- mailman-2.1.14/templates/zh_TW/admlogin.html       2010-09-20 20:18:27.000000000 +0200
++++ mailman-2.1.14-form/templates/zh_TW/admlogin.html  2011-09-04 10:59:24.015561119 +0200
+@@ -13,7 +13,8 @@
+     </TR>
+     <tr>
+       <TD> <div ALIGN="Right"> 壇主密碼: </div> </TD>
+-      <TD> <INPUT TYPE=password NAME=adminpw SIZE=30></TD>
++      <TD><INPUT STYLE="display: none;" TYPE="text" NAME="userid" VALUE="%(listname)s">
++          <INPUT TYPE="password" NAME="adminpw" SIZE="30"></TD>
+     </tr>
+     <tr>
+       <td colspan=2 align=middle> <INPUT TYPE=SUBMIT name="request_login"
diff --git a/mailman-build.patch b/mailman-build.patch
new file mode 100644 (file)
index 0000000..8fd8fc5
--- /dev/null
@@ -0,0 +1,673 @@
+--- mailman-2.1.5.orig/bin/Makefile.in 2003-12-24 12:03:15.000000000 -0500
++++ mailman-2.1.5.build/bin/Makefile.in        2004-10-15 15:36:46.000000000 -0400
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ DEFS=         @DEFS@
+@@ -55,7 +54,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -71,8 +70,6 @@
+           $(INSTALL) -m $(EXEMODE) $(BUILDDIR)/$$f $(DESTDIR)$(SCRIPTSDIR); \
+       done
+-finish:
+-
+ clean:
+ distclean:
+--- mailman-2.1.5.orig/cron/Makefile.in        2003-03-31 14:27:07.000000000 -0500
++++ mailman-2.1.5.build/cron/Makefile.in       2004-10-15 15:36:46.000000000 -0400
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ DEFS=         @DEFS@
+@@ -68,8 +67,6 @@
+           $(INSTALL) -m $(EXEMODE) $(BUILDDIR)/$$f $(DESTDIR)$(CRONDIR); \
+       done
+-finish:
+-
+ clean:
+ distclean:
+--- mailman-2.1.5.orig/Mailman/Archiver/Makefile.in    2003-03-31 14:26:58.000000000 -0500
++++ mailman-2.1.5.build/Mailman/Archiver/Makefile.in   2004-10-15 15:36:46.000000000 -0400
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ DEFS=         @DEFS@
+@@ -47,7 +46,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -63,8 +62,6 @@
+           $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \
+       done
+-finish:
+-
+ clean:
+ distclean:
+--- mailman-2.1.5.orig/Mailman/Bouncers/Makefile.in    2003-03-31 14:26:58.000000000 -0500
++++ mailman-2.1.5.build/Mailman/Bouncers/Makefile.in   2004-10-15 15:36:46.000000000 -0400
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ DEFS=         @DEFS@
+@@ -45,7 +44,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -61,8 +60,6 @@
+           $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \
+       done
+-finish:
+-
+ clean:
+ distclean:
+--- mailman-2.1.5.orig/Mailman/Cgi/Makefile.in 2003-03-31 14:26:59.000000000 -0500
++++ mailman-2.1.5.build/Mailman/Cgi/Makefile.in        2004-10-15 15:36:46.000000000 -0400
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ DEFS=         @DEFS@
+@@ -47,7 +46,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -63,8 +62,6 @@
+           $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(CGIDIR); \
+         done
+-finish:
+-
+ clean:
+ distclean:
+--- mailman-2.1.5.orig/Mailman/Commands/Makefile.in    2003-03-31 14:27:00.000000000 -0500
++++ mailman-2.1.5.build/Mailman/Commands/Makefile.in   2004-10-15 15:36:46.000000000 -0400
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ DEFS=         @DEFS@
+@@ -45,7 +44,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -61,8 +60,6 @@
+           $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \
+       done
+-finish:
+-
+ clean:
+ distclean:
+--- mailman-2.1.5.orig/Mailman/Gui/Makefile.in 2003-03-31 14:27:01.000000000 -0500
++++ mailman-2.1.5.build/Mailman/Gui/Makefile.in        2004-10-15 15:36:46.000000000 -0400
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ DEFS=         @DEFS@
+@@ -45,7 +44,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -61,8 +60,6 @@
+           $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \
+       done
+-finish:
+-
+ clean:
+ distclean:
+--- mailman-2.1.5.orig/Mailman/Handlers/Makefile.in    2003-03-31 14:27:01.000000000 -0500
++++ mailman-2.1.5.build/Mailman/Handlers/Makefile.in   2004-10-15 15:36:46.000000000 -0400
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ DEFS=         @DEFS@
+@@ -45,7 +44,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -61,8 +60,6 @@
+           $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \
+       done
+-finish:
+-
+ clean:
+ distclean:
+--- mailman-2.1.5.orig/Mailman/Logging/Makefile.in     2003-03-31 14:27:02.000000000 -0500
++++ mailman-2.1.5.build/Mailman/Logging/Makefile.in    2004-10-15 15:36:46.000000000 -0400
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ DEFS=         @DEFS@
+@@ -45,7 +44,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -61,8 +60,6 @@
+           $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \
+       done
+-finish:
+-
+ clean:
+ distclean:
+--- mailman-2.1.5.orig/Mailman/Makefile.in     2003-03-31 14:26:58.000000000 -0500
++++ mailman-2.1.5.build/Mailman/Makefile.in    2004-10-15 15:36:46.000000000 -0400
+@@ -20,8 +20,6 @@
+ # Variables set by configure
+-VERSION=      @VERSION@
+-
+ VPATH=                @srcdir@
+ srcdir=       @srcdir@
+ bindir=       @bindir@
+@@ -30,7 +28,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ DEFS=         @DEFS@
+@@ -48,7 +45,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -79,12 +76,6 @@
+           (cd $$d; $(MAKE) DESTDIR=$(DESTDIR) install); \
+       done
+-finish:
+-      @for d in $(SUBDIRS); \
+-      do \
+-          (cd $$d; $(MAKE) DESTDIR=$(DESTDIR) finish); \
+-      done
+-
+ clean:
+       for d in $(SUBDIRS); \
+       do \
+--- mailman-2.1.5.orig/Mailman/MTA/Makefile.in 2003-03-31 14:27:02.000000000 -0500
++++ mailman-2.1.5.build/Mailman/MTA/Makefile.in        2004-10-15 15:36:46.000000000 -0400
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ DEFS=         @DEFS@
+@@ -45,7 +44,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -61,8 +60,6 @@
+           $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \
+       done
+-finish:
+-
+ clean:
+ distclean:
+--- mailman-2.1.5.orig/Mailman/Queue/Makefile.in       2003-03-31 14:27:03.000000000 -0500
++++ mailman-2.1.5.build/Mailman/Queue/Makefile.in      2004-10-15 15:36:46.000000000 -0400
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ DEFS=         @DEFS@
+@@ -45,7 +44,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -61,8 +60,6 @@
+           $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \
+       done
+-finish:
+-
+ clean:
+ distclean:
+--- mailman-2.1.5.orig/Makefile.in     2003-03-31 14:26:57.000000000 -0500
++++ mailman-2.1.5.build/Makefile.in    2004-10-15 16:26:03.000000000 -0400
+@@ -61,11 +61,10 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+-DIRSETGID=    chmod g+s
+ DATE = $(shell python -c 'import time; print time.strftime("%d-%b-%Y"),')
+ LANGPACK = README-I18N.en templates messages
+@@ -85,14 +84,24 @@
+ doinstall: $(SUBDIRS)
+       @echo "Creating architecture independent directories..."
++      dir=$(DESTDIR)$(prefix); \
++      if test ! -d $$dir; then \
++              echo "Creating directory hierarchy $$dir"; \
++              $(INSTALL) -d -m $(DIRMODE) $$dir; \
++      else true; \
++      fi;
++      dir=$(DESTDIR)$(var_prefix); \
++      if test ! -d $$dir; then \
++              echo "Creating directory hierarchy $$dir"; \
++              $(INSTALL) -d -m $(DIRMODE) $$dir; \
++      else true; \
++      fi;
+       @for d in $(VAR_DIRS); \
+       do \
+           dir=$(DESTDIR)$(var_prefix)/$$d; \
+           if test ! -d $$dir; then \
+               echo "Creating directory hierarchy $$dir"; \
+-              $(srcdir)/mkinstalldirs $$dir; \
+-              chmod $(DIRMODE) $$dir; \
+-              $(DIRSETGID) $$dir; \
++              $(INSTALL) -d -m $(DIRMODE) $$dir; \
+           else true; \
+           fi; \
+       done
+@@ -102,9 +111,7 @@
+           dir=$(DESTDIR)$(prefix)/$$d; \
+           if test ! -d $$dir; then \
+               echo "Creating directory hierarchy $$dir"; \
+-              $(srcdir)/mkinstalldirs $$dir; \
+-              chmod $(DIRMODE) $$dir; \
+-              $(DIRSETGID) $$dir; \
++              $(INSTALL) -d -m $(DIRMODE) $$dir; \
+           else true; \
+           fi; \
+       done
+@@ -114,9 +121,7 @@
+           dir=$(DESTDIR)$(exec_prefix)/$$d; \
+           if test ! -d $$dir; then \
+               echo "Creating directory hierarchy $$dir"; \
+-              $(srcdir)/mkinstalldirs $$dir; \
+-              chmod $(DIRMODE) $$dir; \
+-              $(DIRSETGID) $$dir; \
++              $(INSTALL) -d -m $(DIRMODE) $$dir; \
+           else true; \
+           fi; \
+       done
+--- mailman-2.1.5.orig/messages/Makefile.in    2004-04-24 22:30:04.000000000 -0400
++++ mailman-2.1.5.build/messages/Makefile.in   2004-10-15 15:36:46.000000000 -0400
+@@ -32,7 +32,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ DEFS=         @DEFS@
+@@ -43,7 +42,6 @@
+ CFLAGS=               $(OPT) $(DEFS)
+ PACKAGEDIR=   $(prefix)/messages
+ SHELL=                /bin/sh
+-DIRSETGID=    chmod g+s
+ MSGFMT=       @PYTHON@ ../build/bin/msgfmt.py
+ MSGMERGE=     msgmerge
+@@ -60,7 +58,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -90,9 +88,8 @@
+       do \
+           dir=$(DESTDIR)$(prefix)/$$d; \
+           echo "Creating language directory $$dir"; \
+-          $(srcdir)/../mkinstalldirs $$dir; \
+-          chmod $(DIRMODE) $$dir; \
+-          $(DIRSETGID) $$dir; \
++          $(INSTALL) -d -m $(DIRMODE) `dirname $$dir`; \
++          $(INSTALL) -d -m $(DIRMODE) $$dir; \
+       done
+       @for d in $(LANGUAGES); \
+       do \
+@@ -112,8 +109,6 @@
+ mofiles: $(MOFILES)
+-finish:
+-
+ clean:
+       -rm -f */LC_MESSAGES/mailman.mo
+--- mailman-2.1.5.orig/misc/Makefile.in        2004-05-13 23:34:34.000000000 -0400
++++ mailman-2.1.5.build/misc/Makefile.in       2004-10-15 15:36:46.000000000 -0400
+@@ -29,7 +29,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ PYTHON=               @PYTHON@
+@@ -61,7 +60,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ DATAMODE=     664
+@@ -93,8 +92,6 @@
+           (cd $(PKGDIR)/$$p ; umask 02 ; PYTHONPATH=$(PYTHONLIBDIR) $(PYTHON) $(SETUPCMD)); \
+       done
+-finish:
+-
+ clean:
+ distclean:
+--- mailman-2.1.5.orig/scripts/Makefile.in     2003-03-31 14:27:12.000000000 -0500
++++ mailman-2.1.5.build/scripts/Makefile.in    2004-10-15 15:36:46.000000000 -0400
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ DEFS=         @DEFS@
+@@ -49,7 +48,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -68,8 +67,6 @@
+       $(INSTALL) -m $(FILEMODE) $(srcdir)/join    $(DESTDIR)$(SCRIPTSDIR)/subscribe
+       $(INSTALL) -m $(FILEMODE) $(srcdir)/leave   $(DESTDIR)$(SCRIPTSDIR)/unsubscribe
+-finish:
+-
+ clean:
+ distclean:
+--- mailman-2.1.5.orig/src/Makefile.in 2003-03-31 14:27:14.000000000 -0500
++++ mailman-2.1.5.build/src/Makefile.in        2004-10-15 15:36:46.000000000 -0400
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ PYTHON=       @PYTHON@
+@@ -63,10 +62,9 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
+-EXEMODE=      755
++DIRMODE=      2775
++EXEMODE=      2755
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+-DIRSETGID=    chmod g+s
+ # Fixed definitions
+@@ -110,20 +108,10 @@
+       do \
+           exe=$(DESTDIR)$(CGIDIR)/$$f$(CGIEXT); \
+           $(INSTALL_PROGRAM) $$f $$exe; \
+-          $(DIRSETGID) $$exe; \
+       done
+       for f in $(MAIL_PROGS); \
+       do \
+           $(INSTALL_PROGRAM) $$f $(DESTDIR)$(MAILDIR); \
+-          $(DIRSETGID) $(DESTDIR)$(MAILDIR)/$$f; \
+-      done
+-
+-finish:
+-      -for f in $(SUID_CGI_PROGS); \
+-      do \
+-          exe=$(DESTDIR)$(CGIDIR)/$$f$(CGIEXT); \
+-          chown $(MAILMAN_USER) $$exe; \
+-          chmod u+s $$exe; \
+       done
+ clean:
+--- mailman-2.1.5.orig/templates/Makefile.in   2004-04-24 22:30:04.000000000 -0400
++++ mailman-2.1.5.build/templates/Makefile.in  2004-10-18 12:49:01.000000000 -0400
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ TRUE=         @TRUE@
+@@ -48,7 +47,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -61,15 +60,13 @@
+ install:
+       for d in $(LANGUAGES); \
+       do \
+-          $(srcdir)/../mkinstalldirs $(DESTDIR)$(TEMPLATEDIR)/$$d; \
++          $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(TEMPLATEDIR)/$$d; \
+           for f in $(srcdir)/$$d/*.html $(srcdir)/$$d/*.txt; \
+           do \
+               $(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(TEMPLATEDIR)/$$d; \
+           done; \
+       done
+-finish:
+-
+ clean:
+ distclean:
+--- mailman-2.1.5.orig/tests/bounces/Makefile.in       2003-03-31 14:27:16.000000000 -0500
++++ mailman-2.1.5.build/tests/bounces/Makefile.in      2004-10-15 15:36:46.000000000 -0400
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ DEFS=         @DEFS@
+@@ -46,7 +45,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -60,8 +59,6 @@
+           $(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(BOUNCEDIR); \
+       done
+-finish:
+-
+ clean:
+ distclean:
+--- mailman-2.1.5.orig/tests/Makefile.in       2003-03-31 14:27:15.000000000 -0500
++++ mailman-2.1.5.build/tests/Makefile.in      2004-10-15 15:36:46.000000000 -0400
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ DEFS=         @DEFS@
+@@ -46,7 +45,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -71,8 +70,6 @@
+           (cd $$d; $(MAKE) DESTDIR=$(DESTDIR) install); \
+       done
+-finish:
+-
+ clean:
+ distclean:
+--- mailman-2.1.5.orig/tests/msgs/Makefile.in  2003-03-31 14:27:17.000000000 -0500
++++ mailman-2.1.5.build/tests/msgs/Makefile.in 2004-10-15 15:36:46.000000000 -0400
+@@ -28,7 +28,6 @@
+ DESTDIR=
+ CC=           @CC@
+-CHMOD=        @CHMOD@
+ INSTALL=      @INSTALL@
+ DEFS=         @DEFS@
+@@ -46,7 +45,7 @@
+ # Modes for directories and executables created by the install
+ # process.  Default to group-writable directories but
+ # user-only-writable for executables.
+-DIRMODE=      775
++DIRMODE=      2775
+ EXEMODE=      755
+ FILEMODE=     644
+ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE)
+@@ -60,8 +59,6 @@
+           $(INSTALL) -m $(FILEMODE) $$f $(DESTDIR)$(MSGSDIR); \
+       done
+-finish:
+-
+ clean:
+ distclean:
diff --git a/mailman-cron.patch b/mailman-cron.patch
new file mode 100644 (file)
index 0000000..6dd08bf
--- /dev/null
@@ -0,0 +1,101 @@
+diff -r -u mailman-2.1.5.orig/cron/bumpdigests mailman-2.1.5/cron/bumpdigests
+--- mailman-2.1.5.orig/cron/bumpdigests        2002-10-21 18:36:56.000000000 -0400
++++ mailman-2.1.5/cron/bumpdigests     2004-09-03 10:41:12.000000000 -0400
+@@ -1,4 +1,4 @@
+-#! @PYTHON@
++#! @PYTHON@ -S
+ #
+ # Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
+ #
+diff -r -u mailman-2.1.5.orig/cron/checkdbs mailman-2.1.5/cron/checkdbs
+--- mailman-2.1.5.orig/cron/checkdbs   2003-12-26 17:51:10.000000000 -0500
++++ mailman-2.1.5/cron/checkdbs        2004-08-31 12:21:24.000000000 -0400
+@@ -1,4 +1,4 @@
+-#! @PYTHON@
++#! @PYTHON@ -S
+ #
+ # Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
+ #
+diff -r -u mailman-2.1.5.orig/cron/crontab.in.in mailman-2.1.5/cron/crontab.in.in
+--- mailman-2.1.5.orig/cron/crontab.in.in      2002-01-06 01:28:12.000000000 -0500
++++ mailman-2.1.5/cron/crontab.in.in   2004-09-02 17:43:27.000000000 -0400
+@@ -1,27 +1,27 @@
+ # At 8AM every day, mail reminders to admins as to pending requests.
+ # They are less likely to ignore these reminders if they're mailed
+ # early in the morning, but of course, this is local time... ;)
+-0 8 * * * @PYTHON@ -S @prefix@/cron/checkdbs
++0 8 * * * @MAILMAN_USER@ @prefix@/cron/checkdbs
+ #
+ # At 9AM, send notifications to disabled members that are due to be
+ # reminded to re-enable their accounts.
+-0 9 * * * @PYTHON@ -S @prefix@/cron/disabled
++0 9 * * * @MAILMAN_USER@ @prefix@/cron/disabled
+ #
+ # Noon, mail digests for lists that do periodic as well as threshhold delivery.
+-0 12 * * * @PYTHON@ -S @prefix@/cron/senddigests
++0 12 * * * @MAILMAN_USER@ @prefix@/cron/senddigests
+ #
+ # 5 AM on the first of each month, mail out password reminders.
+-0 5 1 * * @PYTHON@ -S @prefix@/cron/mailpasswds
++0 5 1 * * @MAILMAN_USER@ @prefix@/cron/mailpasswds
+ #
+ # Every 5 mins, try to gate news to mail.  You can comment this one out
+ # if you don't want to allow gating, or don't have any going on right now,
+ # or want to exclusively use a callback strategy instead of polling.
+-0,5,10,15,20,25,30,35,40,45,50,55 * * * * @PYTHON@ -S @prefix@/cron/gate_news
++0,5,10,15,20,25,30,35,40,45,50,55 * * * * @MAILMAN_USER@ @prefix@/cron/gate_news
+ #
+ # At 3:27am every night, regenerate the gzip'd archive file.  Only
+ # turn this on if the internal archiver is used and
+ # GZIP_ARCHIVE_TXT_FILES is false in mm_cfg.py
+-27 3 * * * @PYTHON@ -S @prefix@/cron/nightly_gzip
++27 3 * * * @MAILMAN_USER@ @prefix@/cron/nightly_gzip
+ #
+ # At 4:30AM daily, cull old entries from the 'bad' and 'shunt' queues.
+-30 4 * * * @PYTHON@ -S @prefix@/cron/cull_bad_shunt
++30 4 * * * @MAILMAN_USER@ @prefix@/cron/cull_bad_shunt
+diff -r -u mailman-2.1.5.orig/cron/disabled mailman-2.1.5/cron/disabled
+--- mailman-2.1.5.orig/cron/disabled   2004-02-10 17:59:45.000000000 -0500
++++ mailman-2.1.5/cron/disabled        2004-08-31 12:22:54.000000000 -0400
+@@ -1,4 +1,4 @@
+-#! @PYTHON@
++#! @PYTHON@ -S
+ #
+ # Copyright (C) 2001-2004 by the Free Software Foundation, Inc.
+ #
+diff -r -u mailman-2.1.5.orig/cron/gate_news mailman-2.1.5/cron/gate_news
+--- mailman-2.1.5.orig/cron/gate_news  2003-09-21 22:29:51.000000000 -0400
++++ mailman-2.1.5/cron/gate_news       2004-08-31 12:21:48.000000000 -0400
+@@ -1,4 +1,4 @@
+-#! @PYTHON@
++#! @PYTHON@ -S
+ #
+ # Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
+ #
+diff -r -u mailman-2.1.5.orig/cron/mailpasswds mailman-2.1.5/cron/mailpasswds
+--- mailman-2.1.5.orig/cron/mailpasswds        2003-09-21 22:29:51.000000000 -0400
++++ mailman-2.1.5/cron/mailpasswds     2004-08-31 12:21:56.000000000 -0400
+@@ -1,4 +1,4 @@
+-#! @PYTHON@
++#! @PYTHON@ -S
+ #
+ # Copyright (C) 1998-2003 by the Free Software Foundation, Inc.
+ #
+diff -r -u mailman-2.1.5.orig/cron/nightly_gzip mailman-2.1.5/cron/nightly_gzip
+--- mailman-2.1.5.orig/cron/nightly_gzip       2002-10-21 18:36:58.000000000 -0400
++++ mailman-2.1.5/cron/nightly_gzip    2004-08-31 12:22:32.000000000 -0400
+@@ -1,4 +1,4 @@
+-#! @PYTHON@
++#! @PYTHON@ -S
+ # 
+ # Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
+ #
+diff -r -u mailman-2.1.5.orig/cron/senddigests mailman-2.1.5/cron/senddigests
+--- mailman-2.1.5.orig/cron/senddigests        2002-10-21 18:36:58.000000000 -0400
++++ mailman-2.1.5/cron/senddigests     2004-08-31 12:22:44.000000000 -0400
+@@ -1,4 +1,4 @@
+-#! @PYTHON@
++#! @PYTHON@ -S
+ #
+ # Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
+ #
diff --git a/mailman-daemonize-fds.patch b/mailman-daemonize-fds.patch
new file mode 100644 (file)
index 0000000..92f918f
--- /dev/null
@@ -0,0 +1,15 @@
+--- mailman-2.1.11/bin/mailmanctl~     2009-03-06 15:02:12.706376997 +0200
++++ mailman-2.1.11/bin/mailmanctl      2009-03-06 14:55:45.366717626 +0200
+@@ -480,6 +480,12 @@
+         os.chdir(mm_cfg.PREFIX)
+         # Set our file mode creation umask
+         os.umask(007)
++        # Redirect the standard file descriptors to /dev/null.
++        nullfd = os.open("/dev/null", os.O_RDWR|os.O_APPEND)
++        os.dup2(nullfd, 0);
++        os.dup2(nullfd, 1);
++        os.dup2(nullfd, 2);
++        os.close(nullfd)
+         # I don't think we have any unneeded file descriptors.
+         #
+         # Now start all the qrunners.  This returns a dictionary where the
diff --git a/mailman-dont-send-broken-reminder-ugly-hack.patch b/mailman-dont-send-broken-reminder-ugly-hack.patch
new file mode 100644 (file)
index 0000000..32aa8cd
--- /dev/null
@@ -0,0 +1,38 @@
+--- mailman-2.1.5/templates/pl/cronpass.txt~   Fri Oct  1 06:28:28 2004
++++ mailman-2.1.5/templates/pl/cronpass.txt    Fri Oct  1 06:28:28 2004
+@@ -1,21 +1,21 @@
+-To jest przypomnienie, wysy³ane raz na miesi±c, o tym, ¿e jeste¶ 
+-cz³onkiem list dyskusyjnych na serwerze %(hostname)s.  Znajdziesz 
+-tutaj informacje o tym w jaki sposób zmieniæ parametry swojej 
+-subskrybcji lub jak siê wypisaæ z listy.
++To jest przypomnienie, wysylane raz na miesiac, o tym, ze jestes 
++czlonkiem list dyskusyjnych na serwerze %(hostname)s.  Znajdziesz 
++tutaj informacje o tym w jaki sposob zmienic parametry swojej 
++subskrybcji lub jak sie wypisac z listy.
+-Przez stronê WWW mo¿esz zmieniaæ to w jaki sposób i czy w ogóle 
+-maj± byæ do Ciebie wysy³ane wiadomo¶ci. Mo¿esz zmieniæ swój adres, 
+-prze³±czyæ dostarczanie na tryb paczek, albo chwilowo wstrzymaæ 
+-wysy³anie do listów na Twój adres (np. z powodu wyjazdu na wakacje) 
++Przez strone WWW mozesz zmieniac to w jaki sposob i czy w ogole 
++maja byc do Ciebie wysylane wiadomosci. Mozesz zmienic swoj adres, 
++przelaczyc dostarczanie na tryb paczek, albo chwilowo wstrzymac 
++wysylanie do listow na Twoj adres (np. z powodu wyjazdu na wakacje) 
+ i wiele innych opcji.
+-Oprócz interfesju przez WWW, wiêkszo¶æ zmian w subskrybcji mo¿e byæ 
+-dokonywana za po¶rednictwem emaila. Wy¶lij wiadomo¶æ na adres
+-'-request' swojej listy (np. %(exreq)s) ze s³owem 'help' w tre¶ci, 
+-w odpowiedzi otrzymasz emaila z dalszymi wskazówkami.
++Oprocz interfesju przez WWW, wiekszosc zmian w subskrybcji moze byc 
++dokonywana za posrednictwem emaila. Wyslij wiadomosc na adres
++'-request' swojej listy (np. %(exreq)s) ze slowem 'help' w tresci, 
++w odpowiedzi otrzymasz emaila z dalszymi wskazowkami.
+-Wszystkie pytania, problemy i komentarze proszê kierowaæ do opiekuna
++Wszystkie pytania, problemy i komentarze prosze kierowac do opiekuna
+ tej listy %(owner)s.
+-Has³o dla %(useraddr)s:
++Haslo dla %(useraddr)s:
diff --git a/mailman-httpauth.patch b/mailman-httpauth.patch
new file mode 100644 (file)
index 0000000..3e97933
--- /dev/null
@@ -0,0 +1,31 @@
+Maybe for security have USE_HTTP_AUTH = ['user1', 'user2']
+
+NOTE: you won't be able to authorize with list password anymore.
+
+--- mailman-2.1.11/Mailman/Defaults.py.in~     2009-06-08 16:45:29.000000000 +0300
++++ mailman-2.1.11/Mailman/Defaults.py.in      2009-06-08 16:45:31.967055253 +0300
+@@ -1319,6 +1319,10 @@
+ AuthListModerator = 4 # List Moderator (can only handle held requests)
+ AuthSiteAdmin = 5     # Site Administrator (total control over everything)
++# If value is True, site administrator is trusted from REMOTE_USER CGI variable
++# Use this to if you want to use password authentication for site admin.
++USE_HTTP_AUTH   = False
++
+ # Useful directories
+ LIST_DATA_DIR   = os.path.join(VAR_PREFIX, 'lists')
+ LOG_DIR         = '@LOG_DIR@'
+--- mailman-2.1.11/Mailman/Utils.py~   2009-06-08 16:45:22.000000000 +0300
++++ mailman-2.1.11/Mailman/Utils.py    2009-06-08 16:45:25.094129761 +0300
+@@ -411,6 +411,11 @@
+ def check_global_password(response, siteadmin=True):
++    if mm_cfg.USE_HTTP_AUTH:
++        if os.environ.get('AUTH_TYPE') != None and os.environ.get('REMOTE_USER') != None:
++            return True
++        # Fallback to global password auth
++
+     challenge = get_global_password(siteadmin)
+     if challenge is None:
+         return None
diff --git a/mailman-lib64.patch b/mailman-lib64.patch
new file mode 100644 (file)
index 0000000..d3f88a5
--- /dev/null
@@ -0,0 +1,11 @@
+--- mailman-2.1.9/misc/paths.py.in~    2008-04-11 16:57:17.000000000 +0300
++++ mailman-2.1.9/misc/paths.py.in     2008-04-11 17:03:09.313098943 +0300
+@@ -45,7 +45,7 @@
+ sys.path.insert(0, os.path.join(prefix, 'pythonlib'))
+ # Include Python's site-packages directory.
+-sitedir = os.path.join(sys.prefix, 'lib', 'python'+sys.version[:3],
++sitedir = os.path.join(sys.prefix, sys.lib, 'python'+sys.version[:3],
+                        'site-packages')
+ sys.path.append(sitedir)
diff --git a/mailman-mailmanctl-status.patch b/mailman-mailmanctl-status.patch
new file mode 100644 (file)
index 0000000..ba2473d
--- /dev/null
@@ -0,0 +1,177 @@
+diff -r -u mailman-2.1.5.orig/bin/mailmanctl mailman-2.1.5/bin/mailmanctl
+--- mailman-2.1.5.orig/bin/mailmanctl  2004-02-03 17:26:08.000000000 -0500
++++ mailman-2.1.5/bin/mailmanctl       2004-09-10 18:23:34.000000000 -0400
+@@ -35,7 +35,7 @@
+ pid directly.  The `start', `stop', `restart', and `reopen' commands handle
+ everything for you.
+-Usage: %(PROGRAM)s [options] [ start | stop | restart | reopen ]
++Usage: %(PROGRAM)s [options] [ start | stop | restart | reopen | status ]
+ Options:
+@@ -89,6 +89,9 @@
+     reopen  - This will close all log files, causing them to be re-opened the
+               next time a message is written to them
++
++    status  - This returns a string indicating the status of the master
++              qrunner
+ """
+ import sys
+@@ -189,6 +192,52 @@
+         return 0
+     return 1
++def mailman_status():
++    # return status, pid
++    #
++    # These status values match the /etc/init.d status values
++    # (at least on Red Hat), try to return equivalent status if possible
++    # status is 0 if running,
++    # status is 1 if dead but pid file exists
++    # status is 2 if dead but subsys locked
++    # status is 3 if stopped (pid returned will be 0)
++    #
++    #
++    # We want any user to be able to query the status and this presents
++    # few interesting permission problems and is why we don't use
++    # qrunner_state(). The pidfile is only readable by the mailman owner
++    # and group, however the lockfile is world readable. So we will
++    # get the master pid from the lockfile. We try to determine if the
++    # master process exists by sending it a signal. If we don't have
++    # permission to signal the process, but the process exists we'll
++    # get a EPERM error, if the process does not exist then we'll get
++    # a ESRCH error.
++
++    try:
++        hostname, pid, tempfile = get_lock_data()
++    except IOError, e:
++        if e.errno == errno.ENOENT:
++            # Lock file didn't exist, can't be running
++            return 3, 0
++        else:
++            raise
++    if hostname <> socket.gethostname():
++        # not running on this host
++        return 3, 0
++    # Find out if the process exists by calling kill with a signal 0.
++    try:
++        os.kill(pid, 0)
++    except OSError, e:
++        if e.errno == errno.ESRCH:
++            # process does not exist
++            return 1, pid
++        elif e.errno == errno.EPERM:
++            # we don't have permission signal the process but it exists
++            return 0, pid
++        else:
++            raise
++    return 0, pid
++
+ def acquire_lock_1(force):
+     # Be sure we can acquire the master qrunner lock.  If not, it means some
+@@ -336,13 +385,15 @@
+         command = COMMASPACE.join(args)
+         usage(1, _('Bad command: %(command)s'))
++    command = args[0].lower()
++
+     if checkprivs:
+         check_privs()
+     else:
+-        print _('Warning!  You may encounter permission problems.')
++        if command != 'status':
++          print _('Warning!  You may encounter permission problems.')
+     # Handle the commands
+-    command = args[0].lower()
+     if command == 'stop':
+         # Sent the master qrunner process a SIGINT, which is equivalent to
+         # giving cron/qrunner a ctrl-c or KeyboardInterrupt.  This will
+@@ -361,6 +412,14 @@
+         if not quiet:
+             print _('Re-opening all log files')
+         kill_watcher(signal.SIGHUP)
++    elif command == 'status':
++        status, pid = mailman_status()
++        if not quiet:
++            if status == 0:
++                print _("mailman (pid %(pid)d) is running...")
++            else:
++                print _("mailman is stopped")
++        sys.exit(status)
+     elif command == 'start':
+         # First, complain loudly if there's no site list.
+         check_for_site_list()
+--- mailman-2.1.20/misc/mailman.in~    2015-03-31 20:21:49.000000000 +0300
++++ mailman-2.1.20/misc/mailman.in     2015-05-25 11:22:11.283298992 +0300
+@@ -37,23 +37,61 @@
+ MAILMANHOME=@prefix@
+ MAILMANCTL=$MAILMANHOME/bin/mailmanctl
++# Source function library.
++. /etc/rc.d/init.d/functions
++
++RETVAL=0
++prog="mailman"
++
++start() {
++    msg_starting "$prog"
++    daemon $PYTHON $MAILMANCTL -s -q start
++    RETVAL=$?
++    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
++}
++
++stop() {
++    msg_stopping "$prog"
++    daemon $PYTHON $MAILMANCTL -q stop
++    RETVAL=$?
++    [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
++}
++
++restart() {
++    stop
++    start
++    RETVAL=$?
++}
++
++
+ case "$1" in
+ 'start')
+-    #rm -f $MAILMANHOME/locks/*
+-    $PYTHON $MAILMANCTL -s -q start
++    start
+     ;;
+ 'stop')
+-    $PYTHON $MAILMANCTL -q stop
++    stop
+     ;;
+ 'restart')
+-    $PYTHON $MAILMANCTL -q restart
++    restart
+     ;;
+ 'reopen')
+     $PYTHON $MAILMANCTL -q reopen
+     ;;
++'condrestart')
++    $PYTHON $MAILMANCTL -q -u status
++    retval=$?
++    if [ $retval -eq 0 ]; then
++              restart
++    fi
++    ;;
++
++'status')
++    $PYTHON $MAILMANCTL -u status
++    RETVAL=$?
++
+ esac
+-exit 0
++exit $RETVAL
diff --git a/mailman-python-compile.patch b/mailman-python-compile.patch
new file mode 100644 (file)
index 0000000..cc13a51
--- /dev/null
@@ -0,0 +1,53 @@
+This patch is to fix bug #137863
+
+https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=137863
+
+The problem arose when the SELinux security policy detected mailman
+attempting to open files under /usr/src/build (i.e. the buildroot
+where the RPM is created). It was a bit of a mystery what in mailmain
+was causing access to a hardcoded absolute path that only exists on
+the machine mailman was built on and doesn't exist on the machine it
+was installed on. It was finally determined the path had been embedded
+in the .pyc files when they were compiled during the build
+process. These path names are used as debug output when exceptions
+occur in the .pyc file (e.g. file, line number in stack traces). The
+SELinux security violations occurred only after a python exception
+occurred in mailman. The solution to supply the "ddir" parameter
+(debug directory) in the compile_dir function call. Given that mailman
+expects to build on the machine and in its install directory it was
+never necessary to suppy a "ddir" parameter in addition to "dir"
+because they were the same. But when building for an alternate
+installation it is necessary to supply both parameters because they
+are different. Note in the default case of building on the target both
+$(DESTDIR)$(prefix)" and "$(prefix)" will evaluate to the same value
+and the original behavior will be retained.
+
+The compile_dir command used to recurse from the $(prefix)/Mailman
+root to find .py files, but this missed .py files also located here:
+
+$(prefix)/bin
+$(prefix)/cron
+$(prefix)/pythonlib
+$(prefix)/scripts
+$(prefix)/tests
+
+In particular it missed $(prefix)/pythonlib. When $(prefix)/pythonlib
+was added a new problem was observed, that path contained pre-compiled
+.pyc files that are unpacked from a codecs tar file and since the .pyc
+files already existed in the tar file the compile_dir command skipped
+compiling them. This resulting in leaving the wrong debug path in the
+.pyc file (the ddir arg to compile_dir). Therefore we added "force" to
+the compile_dir command and started the directory recursion one level
+higher.
+
+--- mailman-2.1.20/Makefile.in~        2015-03-31 20:21:49.000000000 +0300
++++ mailman-2.1.20/Makefile.in 2015-05-25 11:25:09.402548855 +0300
+@@ -124,7 +124,7 @@
+       do \
+           (cd $$d; $(MAKE) DESTDIR=$(DESTDIR) install); \
+       done
+-      $(PYTHON) -c 'from compileall import *; compile_dir("$(DESTDIR)$(prefix)/Mailman", ddir="$(prefix)/Mailman")'
++      $(PYTHON) -c 'from compileall import *; compile_dir("$(DESTDIR)$(prefix)", ddir="$(prefix)")'
+ # Only run bin/update if we aren't installing in DESTDIR, as this
+ # means there are probably no lists to deal with, and it wouldn't
diff --git a/mailman-umbrella-anon-hack.patch b/mailman-umbrella-anon-hack.patch
new file mode 100644 (file)
index 0000000..997e86f
--- /dev/null
@@ -0,0 +1,31 @@
+This is a hack usable only if you want
+a moderated umbrella list of moderated lists.
+
+Set anonymous_list to Yes for umbrella list and allow posts
+from umbrella list to be accepted by sublists without moderation.
+
+This patch makes possible to reply to original poster instead of umbrella list.
+
+--- mailman-2.1.9/Mailman/Handlers/Cleanse.py~ 2006-01-15 22:01:35.000000000 +0100
++++ mailman-2.1.9/Mailman/Handlers/Cleanse.py  2008-04-16 16:28:46.000000000 +0200
+@@ -34,16 +34,17 @@
+     del msg['urgent']
+     # We remove other headers from anonymous lists
+     if mlist.anonymous_list:
+-        syslog('post', 'post to %s from %s anonymized',
++        syslog('post', 'post to %s from %s anonymizored',
+                mlist.internal_name(), msg.get('from'))
++        del msg['reply-to']
++        msg['Reply-To'] = msg.get('from')
+         del msg['from']
+-        del msg['reply-to']
+         del msg['sender']
+         # Hotmail sets this one
+         del msg['x-originating-email']
+         i18ndesc = str(uheader(mlist, mlist.description, 'From'))
+         msg['From'] = formataddr((i18ndesc, mlist.GetListEmail()))
+-        msg['Reply-To'] = mlist.GetListEmail()
++        # msg['Reply-To'] = mlist.GetListEmail()
+     # Some headers can be used to fish for membership
+     del msg['return-receipt-to']
+     del msg['disposition-notification-to']
diff --git a/mailman-x-imap-folder.patch b/mailman-x-imap-folder.patch
new file mode 100644 (file)
index 0000000..de2f6ca
--- /dev/null
@@ -0,0 +1,51 @@
+--- mailman-2.1.9/Mailman/Gui/General.py       2006-08-30 17:54:22.000000000 +0300
++++ mailman-2.1.9/Mailman/Gui/General.py       2007-09-20 17:45:31.857725007 +0300
+@@ -409,6 +409,13 @@
+              headers.)"""))
+             )
++        # add X-IMAP-Folder header
++        rtn.append(
++            ('x_imap_folder', mm_cfg.String, WIDTH, 0,
++             _('''If filled add to each outgroing email X-IMAP-Folder header
++             with this value.'''))
++            )
++
+         # Discard held messages after this number of days
+         rtn.append(
+             ('max_days_to_hold', mm_cfg.Number, 7, 0,
+--- mailman-2.1.20/Mailman/Handlers/CookHeaders.py~    2015-03-31 20:21:49.000000000 +0300
++++ mailman-2.1.20/Mailman/Handlers/CookHeaders.py     2015-05-25 11:28:53.400847919 +0300
+@@ -107,6 +107,11 @@
+     # X-BeenThere's intact.
+     change_header('X-BeenThere', mlist.GetListEmail(),
+                   mlist, msg, msgdata, delete=False)
++
++    # X-IMAP-Folder header, used commonly for server side filtering to folders.
++    if mlist.x_imap_folder:
++        msg['X-IMAP-Folder'] = mlist.x_imap_folder
++
+     # Add Precedence: and other useful headers.  None of these are standard
+     # and finding information on some of them are fairly difficult.  Some are
+     # just common practice, and we'll add more here as they become necessary.
+--- mailman-2.1.14/Mailman/MailList.py~        2010-09-20 21:18:27.000000000 +0300
++++ mailman-2.1.14/Mailman/MailList.py 2010-09-21 18:33:08.352249806 +0300
+@@ -363,6 +363,7 @@
+         self.available_languages = []
+         self.include_rfc2369_headers = 1
+         self.include_list_post_header = 1
++        self.x_imap_folder = ''
+         self.include_sender_header = 1
+         self.filter_mime_types = mm_cfg.DEFAULT_FILTER_MIME_TYPES
+         self.pass_mime_types = mm_cfg.DEFAULT_PASS_MIME_TYPES
+--- mailman-2.1.9/Mailman/versions.py  2005-12-30 20:50:08.000000000 +0200
++++ mailman-2.1.9/Mailman/versions.py  2007-09-20 16:49:02.206553877 +0300
+@@ -407,6 +407,8 @@
+     add_only_if_missing('collapse_alternatives',
+                         mm_cfg.DEFAULT_COLLAPSE_ALTERNATIVES)
++    add_only_if_missing('x_imap_folder', '')
++
\f
+ def UpdateOldUsers(mlist):
diff --git a/mailman.conf b/mailman.conf
new file mode 100644 (file)
index 0000000..8691236
--- /dev/null
@@ -0,0 +1,76 @@
+Alias /mailman/pipermail/ /var/lib/mailman/archives/public/
+
+<Directory /var/lib/mailman/archives/public>
+       Options Indexes MultiViews FollowSymLinks
+       AllowOverride None
+       # Apache 2.x
+       <IfModule !mod_authz_core.c>
+               Order allow,deny
+               Allow from all
+       </IfModule>
+       # Apache 2.4
+       <IfModule mod_authz_core.c>
+               Require all granted
+       </IfModule>
+</Directory>
+
+Alias /mailman/icons/ /usr/lib/mailman/icons/
+<Directory /usr/lib/mailman/icons/>
+       AllowOverride None
+       # Apache 2.x
+       <IfModule !mod_authz_core.c>
+               Order allow,deny
+               Allow from all
+       </IfModule>
+       # Apache 2.4
+       <IfModule mod_authz_core.c>
+               Require all granted
+       </IfModule>
+</Directory>
+
+ScriptAlias /mailman/ /usr/lib/mailman/cgi-bin/
+
+<Directory /usr/lib/mailman/cgi-bin/>
+       Options ExecCGI
+       AllowOverride None
+       AddHandler cgi-script .cgi
+       # Apache 2.x
+       <IfModule !mod_authz_core.c>
+               Order allow,deny
+               Allow from all
+       </IfModule>
+       # Apache 2.4
+       <IfModule mod_authz_core.c>
+               Require all granted
+       </IfModule>
+
+# Enable this section to use HTTP auth instead of adm.pw
+# NOTE: you won't be able to authorize with list password anymore.
+#      # Authorize as admin via HTTP auth
+#      <Files ~ "(admin|admindb|create)">
+#              # File based Authz
+#         AuthUserFile /etc/webapps/mailman/htpasswd
+#
+#         # LDAP based Authz. Apache 1.3
+#         <IfModule mod_auth_ldap.c>
+#                 AuthLDAPEnabled on
+#                 AuthLDAPURL ldap://localhost/ou=People,dc=example,dc=org?uid?sub?(objectClass=*)
+#         </IfModule>
+#
+#         # LDAP based Authz. Apache 2.x
+#              <IfModule authnz_ldap_module>
+#                      AuthLDAPURL ldap://localhost/ou=People,dc=example,dc=org?uid?one
+#                      AuthzLDAPAuthoritative off
+#                      AuthBasicProvider ldap
+#              </IfModule>
+#
+#              AuthType Basic
+#              AuthName "MailMan"
+#              Require valid-user
+#      </Files>
+</Directory>
+
+# Uncomment the following line, replacing www.example.com with your server's
+# name, to redirect queries to /mailman to the listinfo page (recommended).
+
+# RedirectMatch ^/mailman[/]*$ http://www.example.com/mailman/listinfo
diff --git a/mailman.init b/mailman.init
new file mode 100644 (file)
index 0000000..9c5c7b7
--- /dev/null
@@ -0,0 +1,94 @@
+#!/bin/sh
+#
+# mailman      mailman qrunner daemon
+#
+# chkconfig:   345 85 15
+# description: mailman is mailing lists server
+#
+# processname: mailman
+# pidfile:     /var/run/mailman/master-qrunner.pid
+# config:      /etc/webapps/mailman/mm_cfg.py
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+       if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+               msg_network_down "Mailman Qrunner Daemon"
+               exit 1
+       fi
+else
+       exit 0
+fi
+
+# Get service config
+[ -f /etc/sysconfig/mailman ] && . /etc/sysconfig/mailman
+
+start() {
+       # Check if the service is already running?
+       if [ -f /var/lock/subsys/mailman ]; then
+               msg_already_running "Mailman Qrunner Daemon"
+               return
+       fi
+
+       msg_starting "Mailman Qrunner Daemon"
+       daemon --user mailman /usr/lib/mailman/bin/mailmanctl -q -s -u start
+       RETVAL=$?
+       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/mailman
+}
+
+stop() {
+       # Stop daemons.
+       if [ ! -f /var/lock/subsys/mailman ]; then
+               msg_not_running "Mailman Qrunner Daemon"
+               return
+       fi
+
+       msg_stopping "Mailman Qrunner Daemon"
+       daemon --user mailman /usr/lib/mailman/bin/mailmanctl -u stop
+       rm -f /var/lock/subsys/mailman /var/run/mailman.pid
+}
+
+condrestart() {
+       if [ -f /var/lock/subsys/mailman ]; then
+               stop
+               start
+       else
+               msg_not_running "Mailman Qrunner Daemon"
+               RETVAL=$1
+       fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart)
+       stop
+       start
+       ;;
+  try-restart)
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
+       ;;
+  status)
+       /usr/lib/mailman/bin/mailmanctl status
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
+       exit 3
+esac
+
+exit $RETVAL
diff --git a/mailman.logrotate b/mailman.logrotate
new file mode 100644 (file)
index 0000000..bb70bef
--- /dev/null
@@ -0,0 +1,9 @@
+/var/log/mailman/* {
+       su root mailman
+       olddir /var/log/archive/mailman
+       create 660 mailman mailman
+       monthly
+       postrotate
+               /sbin/service mailman restart >/dev/null
+       endscript
+}
diff --git a/mailman.spec b/mailman.spec
new file mode 100644 (file)
index 0000000..9df6d4d
--- /dev/null
@@ -0,0 +1,574 @@
+#
+# Conditional build:
+%bcond_with    umbrella_hack   # break anonimization (for use with moderated umbrella list of moderated lists)
+
+%define                rel     1
+Summary:       The GNU Mailing List Management System
+Summary(es.UTF-8):     El Sistema de Mantenimiento de listas de GNU
+Summary(pl.UTF-8):     System Zarządzania Listami Pocztowymi GNU
+Summary(pt_BR.UTF-8):  O Sistema de Manutenção de listas da GNU
+Name:          mailman
+Version:       2.1.20
+Release:       %{rel}%{?with_umbrella_hack:.umh}
+Epoch:         5
+License:       GPL v2+
+Group:         Applications/System
+Source0:       http://downloads.sourceforge.net/mailman/%{name}-%{version}.tgz
+# Source0-md5: 96819640406f90a12bc28edd3dc09d4a
+Source1:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-man-pages.tar.bz2
+# Source1-md5: 6b55f9f8051c76961b84a12ed17fc14f
+Source2:       %{name}.conf
+Source3:       %{name}.init
+Source4:       %{name}.sysconfig
+Source5:       %{name}.logrotate
+Source6:       add_nonmembers
+Source7:       subscribe_list
+Source8:       %{name}.tmpfiles
+Patch0:                %{name}-MM_FIND_GROUP_NAME.patch
+Patch1:                %{name}-dont-send-broken-reminder-ugly-hack.patch
+Patch2:                %{name}-mailmanctl-status.patch
+Patch3:                %{name}-cron.patch
+Patch4:                %{name}-python-compile.patch
+Patch5:                %{name}-build.patch
+Patch6:                %{name}-FHS.patch
+Patch7:                %{name}-x-imap-folder.patch
+Patch8:                %{name}-lib64.patch
+Patch9:                %{name}-umbrella-anon-hack.patch
+Patch10:       %{name}-daemonize-fds.patch
+Patch11:       %{name}-httpauth.patch
+Patch12:       %{name}-MM_FIND_USER_NAME.patch
+Patch13:       keep-original-mime-headers.patch
+Patch14:       %{name}-browser-save-passwd.patch
+URL:           http://www.list.org/
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: python >= 2.1
+BuildRequires: python-devel
+BuildRequires: python-dns
+BuildRequires: python-modules
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.234
+Requires(post):        /bin/hostname
+Requires(post):        grep
+Requires(post,preun):  /sbin/chkconfig
+Requires(postun):      /usr/sbin/groupdel
+Requires(postun):      /usr/sbin/userdel
+Requires(postun):      fileutils
+Requires(postun):      grep
+Requires(pre): /bin/id
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
+Requires:      /sbin/chkconfig
+Requires:      crondaemon
+Requires:      mailcap >= 2.3-5
+Requires:      python-dns
+Requires:      python-modules
+Requires:      rc-scripts
+Requires:      smtpdaemon
+Requires:      webapps
+Requires:      webserver
+Requires:      webserver(indexfile)
+Provides:      group(mailman)
+Provides:      user(mailman)
+# for converting text/html into plain text in default configuration:
+Suggests:      lynx
+Conflicts:     logrotate < 3.8.0
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define                _queuedir       /var/spool/%{name}
+%define                _lockdir        /var/lock/%{name}
+%define                _logdir         /var/log/%{name}
+%define                _logarchdir     /var/log/archive/%{name}
+%define                _piddir         /var/run/%{name}
+
+%define                _webapps        /etc/webapps
+%define                _webapp         %{name}
+%define                _sysconfdir     %{_webapps}/%{_webapp}
+
+%description
+Mailman -- The GNU Mailing List Management System -- is a mailing list
+management system written mostly in Python. Features:
+- most standard mailing list features, including: moderation, mail
+  based commands, digests, etc...
+- an extensive Web interface, customizable on a per-list basis,
+- web based list administration interface for *all* admin-type tasks
+- automatic Web based hypermail-style archives (using pipermail or
+  other external archiver), including provisions for private archives
+- integrated mail list to newsgroup gatewaying
+- integrated newsgroup to mail list gatewaying (polling-based... if
+  you have access to the nntp server, you should be able to easily do
+  non-polling based news->mail list gatewaying; email viega@list.org
+  (I'd like to help get that going and come up with instructions)
+- smart bounce detection and correction
+- integrated fast bulk mailing
+- smart spam protection
+- extensible logging
+- multiple list owners and moderators are possible
+- optional MIME-compliant digests,
+- nice about which machine you subscribed from if you're from the
+  right domain,
+
+%description -l es.UTF-8
+Mailman -- El sistema de manutención de listas de discusión de la
+licencia GNU.
+
+%description -l pl.UTF-8
+Mailman -- System Zarządzania Listami Pocztowymi GNU -- został
+napisany głównie w Pythonie. Jego możliwości to:
+- standardowe możliwości: moderowanie, komendy przesyłane pocztą,
+  digesty itp,
+- interfejs WWW konfigurowalny dla każdej listy,
+- automatyczny system archiwizowania (z użyciem pipermaila lub innego
+  zewnętrznego archiwizera) włączając w to odpowiednie zarządzanie
+  prywatnymi archiwami,
+- bramki mail <-> news,
+- doskonały system wykrywania odbić i korekcji odbitej poczty,
+- system ochrony przed spamem,
+- rozszerzone logowanie,
+- listy mogą być własnością wielu osób oraz moderatorów może być
+  kilku.
+
+%description -l pt_BR.UTF-8
+O Mailman -- O sistema de gerenciamento de listas de discussão do GNU
+-- é um sistema de gerenciamento de listas de discussão escrito em sua
+maior parte em Python. Características:
+
+- Maioria das características de lista de discussão padrão, incluindo:
+  moderação, comandos baseados em e-mail, compiladores (digests),
+  etc...
+- Uma interface extensiva da Web, personalizável lista a lista.
+- Interface de administração de lista baseada na Web para *todas* as
+  tarefas de tipo de admin.
+- Arquivos automáticos de estilo hypermail baseado na Web (usando
+  pipermail ou outros arquivadores externos), incluindo provisões para
+  arquivos privados.
+- Lista de e-mails integrada ao gateway de grupo de notícias.
+- Grupo de notícias integrado ao gateway de lista de e-mail (baseado
+  em consulta... se você tiver acesso ao servidor nntp, deve ser fácil
+  conseguir efetuar notícias baseadas em não-consulta->gateway de
+  lista de e-mails; envie um e-mail a viega@list.org, eu gostaria de
+  ajudar a manter isto e aparecer com instruções).
+- Detecção e correção inteligente de mensagens retornadas.
+- Envio de e-mail em massa rápido e integrado.
+- Proteção inteligente contra spam.
+- Registro ampliável.
+- São possíveis múltiplos donos e moderadores de lista.
+- Compiladores (digests) opcionais compatíveis com MIME.
+- Informa a partir de qual máquina você se inscreveu, caso esteja no
+  domínio correto.
+
+%package sendmail
+Summary:       Sendmail support for mailman
+Summary(pl.UTF-8):     Obsługa mailmana dla sendmaila
+Group:         Applications/System
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+
+%description sendmail
+This package provides wrapper symlink in /etc/smrsh that allows
+sendmail to run mailman.
+
+%description sendmail -l pl.UTF-8
+Ten pakiet udostępnia dowiązanie w /etc/smrsh pozwalające sendmailowi
+uruchamiać mailmana.
+
+%prep
+%setup -q
+%patch0 -p1
+#patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%{?with_umbrella_hack:%patch9 -p1}
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
+%patch14 -p1
+
+# Conflicts with python built-in email package
+sed -i -e 's,EMAILPKG=,#EMAILPKG=,g' misc/Makefile.in
+
+install -p %{SOURCE6} %{SOURCE7} contrib
+
+%build
+%{__aclocal}
+%{__autoconf}
+
+%configure \
+       --prefix=%{_libdir}/%{name} \
+       --exec-prefix=%{_libdir}/%{name} \
+       --with-var-prefix=/var/lib/%{name} \
+       --with-config-dir=%{_sysconfdir} \
+       --with-lock-dir=%{_lockdir} \
+       --with-log-dir=%{_logdir} \
+       --with-pid-dir=%{_piddir} \
+       --with-queue-dir=%{_queuedir} \
+       --with-username=%{name} \
+       --with-groupname=%{name} \
+       --with-mail-gid='mailman' \
+       --with-cgi-gid='http' \
+       --with-mailhost=localhost.localdomain \
+       --with-urlhost=localhost.localdomain \
+       --without-permcheck
+
+%{__make}
+
+%py_lint Mailman bin misc
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{/etc/{cron.d,logrotate.d,rc.d/init.d,sysconfig,smrsh},%{_mandir}} \
+       $RPM_BUILD_ROOT{%{_sysconfdir},%{_logarchdir}} \
+       $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
+
+export PYTHONPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}:$RPM_BUILD_ROOT%{_libdir}/%{name}/pythonlib
+
+%{__make} doinstall \
+       DESTDIR=$RPM_BUILD_ROOT
+
+%{__make} install-packages -C misc \
+       DESTDIR=$RPM_BUILD_ROOT
+
+bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
+
+sed -e 's#/usr/lib/mailman#%{_libdir}/mailman#g' %{SOURCE2} \
+       > $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
+sed -e 's#/usr/lib/mailman#%{_libdir}/mailman#g' %{SOURCE2} \
+       > $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+sed -e 's#/usr/lib/mailman#%{_libdir}/mailman#g' %{SOURCE3} \
+       > $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+cp -a %{SOURCE5} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
+install %{SOURCE8} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
+
+cp -a cron/crontab.in $RPM_BUILD_ROOT/etc/cron.d/%{name}
+
+install -p contrib/{subscribe_list,add_nonmembers} $RPM_BUILD_ROOT%{_libdir}/%{name}/bin
+
+ln -s %{_sysconfdir}/sitelist.cfg $RPM_BUILD_ROOT%{_var}/lib/mailman/data/sitelist.cfg
+
+cat >> $RPM_BUILD_ROOT%{_sysconfdir}/mm_cfg.py << 'EOF'
+DEFAULT_EMAIL_HOST             = 'YOUR.HOST.NAME.HERE'
+DEFAULT_URL_HOST               = 'YOUR.HOST.NAME.HERE'
+DEFAULT_HOST_NAME              = 'YOUR.HOST.NAME.HERE'
+IMAGE_LOGOS                    = '/mailman/icons/'
+PUBLIC_ARCHIVE_URL             = '/mailman/pipermail/%%(listname)s'
+MAILMAN_GROUP                  = '%{name}'
+MAILMAN_USER                   = '%{name}'
+VIRTUAL_HOST_OVERVIEW          = Off
+
+#MTA = 'Postfix'
+#POSTFIX_STYLE_VIRTUAL_DOMAINS = []
+
+#DEFAULT_SERVER_LANGUAGE = 'pl'
+
+# If value is True, site administrator is trusted from REMOTE_USER CGI variable
+# Use this to if you want to use password authentication for site admin.
+USE_HTTP_AUTH   = False
+
+# For available options and their descriptions see:
+# %{_docdir}/%{name}-%{version}/Defaults.py*
+EOF
+
+touch $RPM_BUILD_ROOT%{_sysconfdir}/aliases{,.db}
+touch $RPM_BUILD_ROOT%{_sysconfdir}/adm.pw
+touch $RPM_BUILD_ROOT%{_var}/lib/mailman/data/last_mailman_version
+
+# Create a link to the wrapper in /etc/smrsh to allow sendmail to run it.
+ln -s %{_libdir}/%{name}/mail/%{name} $RPM_BUILD_ROOT/etc/smrsh
+
+# regenerate pyc files with proper paths
+find $RPM_BUILD_ROOT -name '*.pyc' | xargs rm -f
+%py_comp $RPM_BUILD_ROOT
+# save mm_cfg.py from py_postclean
+mv $RPM_BUILD_ROOT%{_libdir}/%{name}/Mailman/mm_cfg.{py,pyX}
+%py_postclean %{_libdir}/mailman
+
+# must do this after py_postclean
+# should we also symlink .pyc? in case commands are ran as root python would create .pyc file
+mv $RPM_BUILD_ROOT%{_libdir}/%{name}/Mailman/mm_cfg.pyX $RPM_BUILD_ROOT%{_sysconfdir}/mm_cfg.py
+ln -s %{_sysconfdir}/mm_cfg.py $RPM_BUILD_ROOT%{_libdir}/%{name}/Mailman/mm_cfg.py
+rm $RPM_BUILD_ROOT%{_libdir}/%{name}/Mailman/mm_cfg.py.dist
+
+rm -f $RPM_BUILD_ROOT%{_mandir}/README-mailman-man-pages
+rm -f $RPM_BUILD_ROOT%{_mandir}/diff.arch.8
+rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/cron/crontab.in
+rm -rf $RPM_BUILD_ROOT%{_libdir}/mailman/tests
+rm -f $RPM_BUILD_ROOT%{_libdir}/mailman/messages/*/LC_MESSAGES/*.po
+
+> %{name}.lang
+for a in $RPM_BUILD_ROOT%{_libdir}/mailman/{messages,templates}/*; do
+       l=${a##*/}
+       echo "%lang($l) ${a#$RPM_BUILD_ROOT}"
+done >> %{name}.lang
+
+# create dirs to package them
+install -d $RPM_BUILD_ROOT%{_queuedir}/{archive,bad,bounces,commands,in,news,out,retry,shunt,virgin}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%pre
+%groupadd -g 94 mailman
+%useradd -u 94 -d %{_var}/lib/%{name} -s /bin/false -c "GNU Mailing List Manager" -g mailman mailman
+
+%post
+if [ "$1" = "1" ]; then
+       if hostname=$(hostname -f 2>/dev/null); then
+               %{__sed} -i -e "s,YOUR.HOST.NAME.HERE,$hostname," %{_sysconfdir}/mm_cfg.py
+       fi
+
+       %service -q crond restart
+fi
+if [ ! -f %{_sysconfdir}/adm.pw ]; then
+       echo 'Run "%{_libdir}/%{name}/bin/mmsitepass" to set site pass.'
+fi
+if [ ! -d /var/lib/mailman/lists/mailman ]; then
+       echo 'Run "%{_libdir}/%{name}/bin/newlist mailman" to setup site-wide mailinglist.'
+fi
+if [ -f %{_var}/lib/mailman/data/last_mailman_version ]; then
+       %{_libdir}/mailman/bin/update
+fi
+/sbin/chkconfig --add mailman
+if [ -f /var/lock/subsys/mailman ] && [ -d /var/spool/mailman/data ]; then
+       ln -sf %{_sysconfdir}/sitelist.cfg /var/spool/mailman/data/sitelist.cfg
+fi
+if [ ! -f %{_sysconfdir}/aliases ]; then
+       touch %{_sysconfdir}/aliases{,.db}
+       chown root:mailman %{_sysconfdir}/aliases
+       chown mailman:mailman %{_sysconfdir}/aliases.db
+       chmod 660 %{_sysconfdir}/aliases{,.db}
+fi
+%service mailman restart "Mailman Qrunner Daemon"
+
+%preun
+if [ "$1" = "0" ]; then
+       %service mailman stop
+       /sbin/chkconfig --del mailman
+fi
+
+%postun
+if [ "$1" = "0" ]; then
+       %userremove mailman
+       %groupremove mailman
+       %service -q crond restart
+fi
+
+%triggerin -- apache1 < 1.3.37-3, apache1-base
+%webapp_register apache %{_webapp}
+
+%triggerun -- apache1 < 1.3.37-3, apache1-base
+%webapp_unregister apache %{_webapp}
+
+%triggerin -- apache < 2.2.0, apache-base
+%webapp_register httpd %{_webapp}
+
+%triggerun -- apache < 2.2.0, apache-base
+%webapp_unregister httpd %{_webapp}
+
+%triggerpostun -- mailman < 1:2.1.7-2.1
+if [ -f /var/spool/cron/%{name} ]; then
+       crontab -u %{name} -r
+fi
+
+if [ -f /var/lock/subsys/mailman ]; then
+       ln -sf %{_sysconfdir}/sitelist.cfg /var/spool/mailman/data/sitelist.cfg
+       /sbin/service mailman stop 1>&2
+       stopped=true
+fi
+
+# rescue app configs.
+for i in mm_cfg.py sitelist.cfg; do
+       if [ -f /etc/%{name}/$i.rpmsave ]; then
+               mv -f %{_sysconfdir}/$i{,.rpmnew}
+               mv -f /etc/%{name}/$i.rpmsave %{_sysconfdir}/$i
+       fi
+done
+
+if [ "`getent passwd mailman | cut -d: -f6`" != "%{_var}/lib/%{name}" ]; then
+       echo "Fixing passwd entry"
+       /usr/sbin/usermod -d %{_var}/lib/%{name} mailman
+fi
+echo "Moving data from /var/spool/mailman to /var/lib/mailman"
+mv -f /var/spool/mailman/archives/private/* %{_var}/lib/mailman/archives/private/
+mv -f /var/spool/mailman/archives/public/* %{_var}/lib/mailman/archives/public/
+mv -f /var/spool/mailman/data/* %{_var}/lib/mailman/data/
+mv -f /var/spool/mailman/lists/* %{_var}/lib/mailman/lists/
+mv -f /var/spool/mailman/spam/* %{_var}/lib/mailman/spam/
+mv -f /var/spool/mailman/logs/* %{_logdir}/
+mv -f /var/spool/mailman/locks/* %{_lockdir}/
+mv -f /var/spool/mailman/qfiles/* %{_queuedir}/
+# Fix symlinks for public archives
+cd %{_var}/lib/mailman/archives/public/
+for i in *; do
+       link=$(readlink "$i")
+       dn=$(dirname "$link")
+       if [ "$dn" = "/var/spool/mailman/archives/private" ]; then
+               ln -sf "%{_var}/lib/mailman/archives/private/$i" "$i"
+       fi
+done
+cd -
+# Remove empty dirs (DON'T rm -rf here!)
+rmdir --ignore-fail-on-non-empty /var/spool/mailman/{archives/{private,public},archives,data,lists,spam,logs,locks,qfiles}
+if [ -f %{_var}/lib/mailman/Mailman/mm_cfg.pyc ]; then
+       rm -f %{_var}/lib/mailman/Mailman/mm_cfg.pyc
+fi
+%{_libdir}/mailman/bin/update
+if [ "$stopped" = "true" ]; then
+       rm -f /var/spool/mailman/data/sitelist.cfg
+       /sbin/service mailman start 1>&2
+fi
+
+# nuke very-old config location (this mostly for Ra)
+if [ -f /etc/httpd/httpd.conf ]; then
+       sed -i -e "/^Include.*%{name}.conf/d" /etc/httpd/httpd.conf
+fi
+
+# migrate from httpd (apache2) config dir
+if [ -f /etc/httpd/%{name}.conf.rpmsave ]; then
+       cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
+       mv -f /etc/httpd/%{name}.conf.rpmsave %{_sysconfdir}/httpd.conf
+fi
+
+# migrate from httpd (apache2) config dir
+if [ -f /etc/httpd/httpd.conf/90_%{name}.conf.rpmsave ]; then
+       cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
+       mv -f /etc/httpd/httpd.conf/90_%{name}.conf.rpmsave %{_sysconfdir}/httpd.conf
+fi
+
+rm -f /etc/httpd/httpd.conf/90_%{name}.conf
+/usr/sbin/webapp register httpd %{_webapp}
+%service -q httpd reload
+
+%files -f %{name}.lang
+%defattr(644,root,root,755)
+%doc BUGS FAQ NEWS README README.CONTRIB README.NETSCAPE README.USERAGENT TODO UPGRADING INSTALL
+%doc Mailman/mm_cfg.py.dist Mailman/Defaults.py
+%{_mandir}/man?/*
+%attr(2775,root,mailman) %dir %{_sysconfdir}
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
+%attr(644,root,mailman) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mm_cfg.py
+%attr(664,root,mailman) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mm_cfg.pyc
+%attr(644,root,mailman) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sitelist.cfg
+%attr(660,root,mailman) %ghost %{_sysconfdir}/aliases
+%attr(660,root,mailman) %ghost %{_sysconfdir}/aliases.db
+%attr(640,root,mailman) %ghost %{_sysconfdir}/adm.pw
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
+
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+
+%defattr(644,root,mailman,2775)
+%dir %{_libdir}/%{name}
+%dir %{_libdir}/%{name}/bin
+%dir %{_libdir}/%{name}/cgi-bin
+%dir %{_libdir}/%{name}/cron
+%dir %{_libdir}/%{name}/icons
+%dir %{_libdir}/%{name}/mail
+%dir %{_libdir}/%{name}/scripts
+%dir %{_libdir}/%{name}/templates
+%dir %{_libdir}/%{name}/messages
+%dir %{_libdir}/%{name}/Mailman
+
+# move to %{py_sitedir}?
+%{_libdir}/%{name}/Mailman/[A-Z_hiv]*.py[co]
+%{_libdir}/%{name}/Mailman/mm_cfg.py
+%ghost %{_libdir}/%{name}/Mailman/mm_cfg.pyc
+%{_libdir}/%{name}/Mailman/Archiver
+%{_libdir}/%{name}/Mailman/Bouncers
+%{_libdir}/%{name}/Mailman/Cgi
+%{_libdir}/%{name}/Mailman/Commands
+%{_libdir}/%{name}/Mailman/Gui
+%{_libdir}/%{name}/Mailman/Handlers
+%{_libdir}/%{name}/Mailman/Logging
+%{_libdir}/%{name}/Mailman/MTA
+%{_libdir}/%{name}/Mailman/Queue
+
+%{_libdir}/%{name}/bin/*.py[co]
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/add_members
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/add_nonmembers
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/arch
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/b4b5-archfix
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/change_pw
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/check_db
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/check_perms
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/cleanarch
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/clone_member
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/config_list
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/discard
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/dumpdb
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/find_member
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/genaliases
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/inject
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/list_admins
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/list_lists
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/list_members
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/list_owners
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/mailmanctl
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/mmsitepass
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/newlist
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/qrunner
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/rb-archfix
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/remove_members
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/rmlist
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/show_qfiles
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/subscribe_list
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/sync_members
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/transcheck
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/unshunt
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/update
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/version
+%attr(2755,root,mailman) %{_libdir}/%{name}/bin/withlist
+
+%attr(2755,root,mailman) %{_libdir}/%{name}/cgi-bin/admin
+%attr(2755,root,mailman) %{_libdir}/%{name}/cgi-bin/admindb
+%attr(2755,root,mailman) %{_libdir}/%{name}/cgi-bin/confirm
+%attr(2755,root,mailman) %{_libdir}/%{name}/cgi-bin/create
+%attr(2755,root,mailman) %{_libdir}/%{name}/cgi-bin/edithtml
+%attr(2755,root,mailman) %{_libdir}/%{name}/cgi-bin/listinfo
+%attr(2755,root,mailman) %{_libdir}/%{name}/cgi-bin/options
+%attr(2755,root,mailman) %{_libdir}/%{name}/cgi-bin/private
+%attr(2755,root,mailman) %{_libdir}/%{name}/cgi-bin/rmlist
+%attr(2755,root,mailman) %{_libdir}/%{name}/cgi-bin/roster
+%attr(2755,root,mailman) %{_libdir}/%{name}/cgi-bin/subscribe
+
+%attr(755,root,root) %{_libdir}/%{name}/cron/bumpdigests
+%attr(755,root,root) %{_libdir}/%{name}/cron/checkdbs
+%attr(755,root,root) %{_libdir}/%{name}/cron/cull_bad_shunt
+%attr(755,root,root) %{_libdir}/%{name}/cron/disabled
+%attr(755,root,root) %{_libdir}/%{name}/cron/gate_news
+%attr(755,root,root) %{_libdir}/%{name}/cron/mailpasswds
+%attr(755,root,root) %{_libdir}/%{name}/cron/nightly_gzip
+%attr(755,root,root) %{_libdir}/%{name}/cron/senddigests
+%{_libdir}/%{name}/cron/paths.py*
+%{_libdir}/%{name}/scripts/*
+%{_libdir}/%{name}/icons/*
+%attr(2755,root,mailman) %{_libdir}/%{name}/mail/mailman
+
+%dir %{_var}/lib/%{name}
+%dir %{_var}/lib/%{name}/archives
+%dir %attr(2771,root,mailman) %{_var}/lib/%{name}/archives/private
+%dir %{_var}/lib/%{name}/archives/public
+%dir %{_var}/lib/%{name}/data
+%ghost %{_var}/lib/%{name}/data/last_mailman_version
+%{_var}/lib/%{name}/data/sitelist.cfg
+%dir %{_var}/lib/%{name}/lists
+%dir %{_var}/lib/%{name}/spam
+%dir %{_queuedir}
+%dir %{_queuedir}/*
+%dir %{_lockdir}
+%dir %{_logdir}
+%dir %{_logarchdir}
+%dir %{_piddir}
+/usr/lib/tmpfiles.d/%{name}.conf
+
+%files sendmail
+%defattr(644,root,root,755)
+/etc/smrsh/%{name}
diff --git a/mailman.sysconfig b/mailman.sysconfig
new file mode 100644 (file)
index 0000000..866d22d
--- /dev/null
@@ -0,0 +1,4 @@
+# Customized setings for mailman qrunner
+
+# Nice level for mailman qrunner
+#SERVICE_RUN_NICE_LEVEL="+5"
diff --git a/mailman.tmpfiles b/mailman.tmpfiles
new file mode 100644 (file)
index 0000000..c19f76f
--- /dev/null
@@ -0,0 +1 @@
+d /var/run/mailman 0775 root mailman -
diff --git a/subscribe_list b/subscribe_list
new file mode 100644 (file)
index 0000000..48be188
--- /dev/null
@@ -0,0 +1,218 @@
+#! /usr/bin/python
+#
+# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software 
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# argv[1] should be the name of the list.
+# argv[2] should be the list of non-digested users.
+# argv[3] should be the list of digested users.
+
+# Make sure that the list of email addresses doesn't contain any comments,
+# like majordomo may throw in.  For now, you just have to remove them manually.
+
+"""Add members to a list from the command line.
+
+Usage:
+    subscribe_list [options] listname [listname ...]
+
+Options:
+
+    --regular-member=addr1
+    -r addr1
+        Add addr1 as a regular (non-digest) member.
+
+    --digest-member=addr1
+    -d addr1
+        Add add1 as a digest member.
+
+    --welcome-msg=<y|n>
+    -w <y|n>
+        Set whether or not to send the list members a welcome message,
+        overriding whatever the list's `send_welcome_msg' setting is.
+
+    --admin-notify=<y|n>
+    -a <y|n>
+        Set whether or not to send the list administrators a notification on
+        the success/failure of these subscriptions, overriding whatever the
+        list's `admin_notify_mchanges' setting is.
+
+    --help
+    -h
+        Print this help message and exit.
+
+    listname
+        The name of the Mailman list you are adding members to.  It must
+        already exist.
+
+You must supply at least one of -n and -d options.  At most one of the
+files can be `-'.
+"""
+
+import sys
+import os
+import getopt
+from cStringIO import StringIO
+
+import paths
+# Import this /after/ paths so that the sys.path is properly hacked
+from email.Utils import parseaddr
+
+from Mailman import MailList
+from Mailman import Utils
+from Mailman import Message
+from Mailman import Errors
+from Mailman import mm_cfg
+from Mailman import i18n
+
+_ = i18n._
+
+
+\f
+def usage(status, msg=''):
+    print >> sys.stderr, _(__doc__)
+    if msg:
+        print >> sys.stderr, msg
+    sys.exit(status)
+
+
+\f
+class Tee:
+    def __init__(self, outfp):
+        self.__outfp = outfp
+
+    def write(self, msg):
+        sys.stdout.write(msg)
+        self.__outfp.write(msg)
+
+
+class UserDesc: pass
+
+
+\f
+def add(mlist, member, digest, ack, outfp):
+    tee = Tee(outfp)
+
+    mlist_name = mlist.internal_name()
+    
+    userdesc = UserDesc()
+    userdesc.fullname, userdesc.address = parseaddr(member)
+    userdesc.digest = digest
+
+    try:
+        mlist.ApprovedAddMember(userdesc, ack, 0)
+    except Errors.MMAlreadyAMember:
+        print >> tee, _('Already a member of %(mlist_name)s: %(member)s')
+    except Errors.MMBadEmailError:
+        if userdesc.address == '':
+            print >> tee, _('Bad/Invalid email address: blank line')
+        else:
+            print >> tee, _('Bad/Invalid email address: %(member)s')
+    except MMHostileAddress:
+        print >> tee, _('Hostile address (illegal characters): %(member)s')
+    else:
+        print >> tee, _('Subscribed: %(member)s to %(mlist_name)s')
+
+
+\f
+def main():
+    try:
+        opts, args = getopt.getopt(sys.argv[1:],
+                                   'a:r:d:w:h',
+                                   ['admin-notify=',
+                                    'regular-member=',
+                                    'digest-member=',
+                                   'welcome-msg=',
+                                    'help'])
+    except getopt.error, msg:
+        usage(1, msg)
+
+    if len(args) < 1:
+        usage(1, args)
+
+    listnames = args
+
+    send_welcome_msg = None
+    admin_notif = None
+    member_address = None
+    digest_member = 0
+    for opt, arg in opts:
+        if opt in ('-h', '--help'):
+            usage(0)
+        elif opt in ('-d', '--digest-member'):
+            member_address = arg
+            digest_member = 1
+        elif opt in ('-r', '--regular-member'):
+            member_address = arg
+            digest_member = 0
+        elif opt in ('-w', '--welcome-msg'):
+            if arg.lower()[0] == 'y':
+                send_welcome_msg = 1
+            elif arg.lower()[0] == 'n':
+                send_welcome_msg = 0
+            else:
+                usage(1, _('Bad argument to -w/--welcome-msg: %(arg)s'))
+        elif opt in ('-a', '--admin-notify'):
+            if arg.lower()[0] == 'y':
+                admin_notif = 1
+            elif arg.lower()[0] == 'n':
+                admin_notif = 0
+            else:
+                usage(1, _('Bad argument to -a/--admin-notify: %(arg)s'))
+                
+    if member_address is None:
+        usage(1)
+
+    listnames = [n.lower().strip() for n in listnames]
+    if not listnames:
+        print _('Nothing to do.')
+        sys.exit(0)
+
+    for listname in listnames:
+        try:
+            mlist = MailList.MailList(listname)
+        except Errors.MMUnknownListError:
+            usage(1, _('No such list: %(listname)s'))
+
+        # Set up defaults
+        if send_welcome_msg is None:
+            send_welcome_msg = mlist.send_welcome_msg
+            if admin_notif is None:
+                admin_notif = mlist.admin_notify_mchanges
+
+        otrans = i18n.get_translation()
+        # Read the regular and digest member files
+        try:
+            s = StringIO()
+            i18n.set_language(mlist.preferred_language)
+
+            add(mlist, member_address, digest_member, send_welcome_msg, s)
+
+            if admin_notif:
+                realname = mlist.real_name
+                subject = _('%(realname)s subscription notification')
+                msg = Message.UserNotification(
+                    mlist.owner, Utils.get_site_email(), subject, s.getvalue(),
+                    mlist.preferred_language)
+                msg.send(mlist)
+
+            mlist.Save()
+        finally:
+            mlist.Unlock()
+            i18n.set_translation(otrans)
+
+\f
+if __name__ == '__main__':
+    main()