1
# Copyright (C) 2002-2009 by the Free Software Foundation, Inc.
3
# This file is part of GNU Mailman.
5
# GNU Mailman is free software: you can redistribute it and/or modify it under
6
# the terms of the GNU General Public License as published by the Free
7
# Software Foundation, either version 3 of the License, or (at your option)
10
# GNU Mailman is distributed in the hope that it will be useful, but WITHOUT
11
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15
# You should have received a copy of the GNU General Public License along with
16
# GNU Mailman. If not, see <http://www.gnu.org/licenses/>.
20
See a list of the public mailing lists on this GNU Mailman server.
23
from mailman.MailList import MailList
24
from mailman.config import config
25
from mailman.i18n import _
37
def process(res, args):
40
res.results.append(_('Usage:'))
41
res.results.append(gethelp(mlist))
43
hostname = mlist.host_name
44
res.results.append(_('Public mailing lists at %(hostname)s:'))
46
for listname in sorted(config.list_manager.names):
47
if listname == mlist.internal_name():
50
xlist = MailList(listname, lock=0)
51
# We can mention this list if you already know about it
52
if not xlist.advertised and xlist is not mlist:
54
# Skip the list if it isn't in the same virtual domain.
55
if xlist.host_name <> mlist.host_name:
57
realname = xlist.real_name
58
description = xlist.description or _('n/a')
59
requestaddr = xlist.GetRequestEmail()
61
res.results.append('')
62
res.results.append(_('%(i)3d. List name: %(realname)s'))
63
res.results.append(_(' Description: %(description)s'))
64
res.results.append(_(' Requests to: %(requestaddr)s'))