Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37549279
en ru br
Репозитории ALT
S:2.1.39-alt1
5.1: 2.1.12-alt2
4.1: 2.1.10-alt0.3.1.M41.1
4.0: 2.1.9-alt6.M40.1
3.0: 2.1.6-alt1
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: mailman

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: mailman-2.1.9-alt-fix_bounce.patch
Скачать


diff --git a/mailman/bin/Makefile.in b/mailman/bin/Makefile.in
index dc4eee8..02b91e7 100644
--- a/mailman/bin/Makefile.in
+++ b/mailman/bin/Makefile.in
@@ -47,7 +47,7 @@ SCRIPTS=	mmsitepass newlist rmlist add_members \
 		sync_members check_db withlist check_perms find_member \
 		version config_list list_lists dumpdb cleanarch \
 		list_admins genaliases change_pw mailmanctl qrunner inject \
-		unshunt fix_url.py convert.py transcheck b4b5-archfix \
+		unshunt fix_url.py fix_bounce.py convert.py transcheck b4b5-archfix \
 		list_owners msgfmt.py show_qfiles discard rb-archfix \
 		reset_pw.py
 
diff --git a/mailman/bin/fix_bounce.py b/mailman/bin/fix_bounce.py
new file mode 100644
index 0000000..0daf288
--- /dev/null
+++ b/mailman/bin/fix_bounce.py
@@ -0,0 +1,76 @@
+#! @PYTHON@
+#
+# Copyright (C) 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+"""Reset a list members's delivery status to the default setting.
+
+This script is intended to be run as a bin/withlist script, i.e.
+
+% bin/withlist -l -r fix_bounce listname email [options]
+
+Options:
+    -v / --verbose
+        Print what the script is doing.
+
+If run standalone, it prints this help text and exits.
+"""
+
+import sys
+import getopt
+
+import paths
+from Mailman import mm_cfg
+from Mailman.i18n import _
+from Mailman.Errors import NotAMemberError
+from Mailman.MemberAdaptor import ENABLED
+
+
+
+def usage(code, msg=''):
+    print _(__doc__.replace('%', '%%'))
+    if msg:
+        print msg
+    sys.exit(code)
+
+
+
+def fix_bounce(mlist, addr, *args):
+    try:
+        opts, args = getopt.getopt(args, 'v', ['verbose'])
+    except getopt.error, msg:
+        usage(1, msg)
+
+    verbose = 0
+    mode = ENABLED
+    for opt, arg in opts:
+        if opt in ('-v', '--verbose'):
+            verbose = 1
+
+    if verbose:
+        print _('Setting %(addr)s delivery status to %(mode)s')
+    try:
+	mlist.setDeliveryStatus(addr, mode)
+    except NotAMemberError:
+	print _('No address matched:'), addr
+
+    print _('Saving list')
+    mlist.Save()
+    mlist.Unlock()
+
+
+if __name__ == '__main__':
+    usage(0)
diff --git a/mailman/configure.in b/mailman/configure.in
index c368622..2994281 100644
--- a/mailman/configure.in
+++ b/mailman/configure.in
@@ -555,6 +555,7 @@ bin/discard \
 bin/dumpdb \
 bin/find_member \
 bin/fix_url.py \
+bin/fix_bounce.py \
 bin/genaliases \
 bin/inject \
 bin/list_admins \
diff --git a/mailman/messages/docstring.files b/mailman/messages/docstring.files
index 2a9251a..34cd85d 100644
--- a/mailman/messages/docstring.files
+++ b/mailman/messages/docstring.files
@@ -59,6 +59,7 @@ bin/clone_member
 bin/list_lists
 bin/qrunner
 bin/fix_url.py
+bin/fix_bounce.py
 bin/config_list
 bin/add_members
 bin/list_admins
diff --git a/mailman/messages/ru/LC_MESSAGES/mailman.po b/mailman/messages/ru/LC_MESSAGES/mailman.po
index 83fc6a4..14a719b 100644
--- a/mailman/messages/ru/LC_MESSAGES/mailman.po
+++ b/mailman/messages/ru/LC_MESSAGES/mailman.po
@@ -9350,7 +9350,42 @@
 msgid "(as owner)"
 msgstr "(владелец)"
 
+#: bin/fix_bounce.py:19
+msgid ""
+"Reset a list members's delivery status to the default setting.\n"
+"\n"
+"This script is intended to be run as a bin/withlist script, i.e.\n"
+"\n"
+"% bin/withlist -l -r fix_bounce listname email [options]\n"
+"\n"
+"Options:\n"
+"    -v / --verbose\n"
+"        Print what the script is doing.\n"
+"\n"
+"If run standalone, it prints this help text and exits.\n"
+msgstr ""
+"Изменить режим доставки подписчику на значение по умолчанию.\n"
+"\n"
+"Этот сценарий должен быть запущен как bin/withlist, то есть:\n"
+"\n"
+"% bin/withlist -l -r fix_bounce listname email [параметры]\n"
+"\n"
+"Параметры:\n"
+"    -v / --verbose\n"
+"        Выводить информацию о действиях сценария.\n"
+"\n"
+"При запуске только самого сценария выводится данная подсказка и работа\n"
+"сценария завершается.\n"
+
+#: bin/fix_bounce.py:64
+msgid "Setting %(addr)s delivery status to %(mode)s"
+msgstr "Режим доставки подписчику %(addr)s устанавливается в %(mode)s"
+
+#: bin/fix_bounce.py:68
+msgid "No address matched:"
+msgstr "Адрес не найден:"
+
 #: bin/.svn/text-base/fix_url.py.svn-base:19 bin/fix_url.py:19
 msgid ""
 "Reset a list's web_page_url attribute to the default setting.\n"
 "\n"
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin