~xav0989/ubuntu/vivid/mailman/ubuntu-logo

« back to all changes in this revision

Viewing changes to bin/inject

  • Committer: Bazaar Package Importer
  • Author(s): Thijs Kinkhorst
  • Date: 2008-04-24 19:30:49 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080424193049-jy5fa9tus40tjbmn
Tags: 1:2.1.10-2
Apply upstream patch to fix regression in cmd_subscribe
so that email subscribe to the -subscribe or -join address or the
-request address with a bare 'subscribe' command results in the message
being shunted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! @PYTHON@
2
2
#
3
 
# Copyright (C) 2002 by the Free Software Foundation, Inc.
 
3
# Copyright (C) 2002-2007 by the Free Software Foundation, Inc.
4
4
#
5
5
# This program is free software; you can redistribute it and/or
6
6
# modify it under the terms of the GNU General Public License
7
7
# as published by the Free Software Foundation; either version 2
8
8
# of the License, or (at your option) any later version.
9
 
 
9
#
10
10
# This program is distributed in the hope that it will be useful,
11
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
13
# GNU General Public License for more details.
14
 
 
14
#
15
15
# You should have received a copy of the GNU General Public License
16
 
# along with this program; if not, write to the Free Software 
17
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
16
# along with this program; if not, write to the Free Software
 
17
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 
18
# USA.
18
19
 
19
20
"""Inject a message from a file into Mailman's incoming queue.
20
21
 
82
83
            if not os.path.isdir(qdir):
83
84
                usage(1, _('Bad queue directory: %(qdir)s'))
84
85
        elif opt in ('-l', '--listname'):
85
 
            listname = arg
 
86
            listname = arg.lower()
86
87
 
87
88
    if listname is None:
88
89
        usage(1, _('A list name is required'))
89
90
    elif not Utils.list_exists(listname):
90
91
        usage(1, _('No such list: %(listname)s'))
91
 
              
 
92
 
92
93
    if len(args) == 0:
93
94
        # Use standard input
94
95
        msgtext = sys.stdin.read()