summaryrefslogtreecommitdiff
path: root/mailman/bin/bounces.py
diff options
context:
space:
mode:
authorBarry Warsaw2009-01-20 20:54:22 -0500
committerBarry Warsaw2009-01-20 20:54:22 -0500
commitf6cfc823e94fdc67114534ffa4e0e058d6ee81b8 (patch)
treedae9158dfd05fd92b18d576f57b78e906196a42b /mailman/bin/bounces.py
parent0c996b693d1cc68d864acc313ba919197717a413 (diff)
downloadmailman-f6cfc823e94fdc67114534ffa4e0e058d6ee81b8.tar.gz
mailman-f6cfc823e94fdc67114534ffa4e0e058d6ee81b8.tar.zst
mailman-f6cfc823e94fdc67114534ffa4e0e058d6ee81b8.zip
Diffstat (limited to 'mailman/bin/bounces.py')
-rw-r--r--mailman/bin/bounces.py61
1 files changed, 0 insertions, 61 deletions
diff --git a/mailman/bin/bounces.py b/mailman/bin/bounces.py
deleted file mode 100644
index e5e4e16b6..000000000
--- a/mailman/bin/bounces.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright (C) 2001-2009 by the Free Software Foundation, Inc.
-#
-# This file is part of GNU Mailman.
-#
-# GNU Mailman 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 3 of the License, or (at your option)
-# any later version.
-#
-# GNU Mailman 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
-# GNU Mailman. If not, see <http://www.gnu.org/licenses/>.
-
-"""Process VERP'd bounces.
-
-Called by the wrapper, stdin is the mail message, and argv[1] is the name
-of the target mailing list.
-
-Errors are redirected to logs/error.
-"""
-
-import sys
-import logging
-
-from mailman import Utils
-from mailman import loginit
-from mailman.configuration import config
-from mailman.i18n import _
-from mailman.queue import Switchboard
-
-
-
-def main():
- # Setup logging to stderr stream and error log.
- loginit.initialize(propagate=True)
- log = logging.getLogger('mailman.error')
- try:
- listname = sys.argv[1]
- except IndexError:
- log.error(_('bounces script got no listname.'))
- sys.exit(1)
- # Make sure the list exists
- if not Utils.list_exists(listname):
- log.error(_('bounces script, list not found: $listname'))
- sys.exit(1)
- # Immediately queue the message for the bounces qrunner to process. The
- # advantage to this approach is that messages should never get lost --
- # some MTAs have a hard limit to the time a filter prog can run. Postfix
- # is a good example; if the limit is hit, the proc is SIGKILL'd giving us
- # no chance to save the message.
- bounceq = Switchboard(config.BOUNCEQUEUE_DIR)
- bounceq.enqueue(sys.stdin.read(), listname=listname, _plaintext=True)
-
-
-
-if __name__ == '__main__':
- main()