2 #***************************************************************************
3 #* Copyright (C) 2003-2014 Polytechnique.org *
4 #* http://opensource.polytechnique.org/ *
6 #* This program is free software; you can redistribute it and/or modify *
7 #* it under the terms of the GNU General Public License as published by *
8 #* the Free Software Foundation; either version 2 of the License, or *
9 #* (at your option) any later version. *
11 #* This program is distributed in the hope that it will be useful, *
12 #* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 #* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 #* GNU General Public License for more details. *
16 #* You should have received a copy of the GNU General Public License *
17 #* along with this program; if not, write to the Free Software *
18 #* Foundation, Inc., *
19 #* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
20 #***************************************************************************
22 import base64
, MySQLdb
, os
, getopt
, sys
, MySQLdb
.converters
, sha
, signal
24 sys
.path
.append('/usr/lib/mailman/bin')
26 from pwd
import getpwnam
27 from grp
import getgrnam
29 from SimpleXMLRPCServer
import SimpleXMLRPCServer
30 from SimpleXMLRPCServer
import SimpleXMLRPCRequestHandler
33 from Mailman
import MailList
34 from Mailman
import Utils
35 from Mailman
import Message
36 from Mailman
import Errors
37 from Mailman
import mm_cfg
38 from Mailman
import i18n
39 from Mailman
.UserDesc
import UserDesc
40 from Mailman
.ListAdmin
import readMessage
41 from email
.Iterators
import typed_subpart_iterator
44 uid
= getpwnam(mm_cfg
.MAILMAN_USER
)[2]
45 gid
= getgrnam(mm_cfg
.MAILMAN_GROUP
)[2]
51 if ( os
.getuid() is not uid
) or ( os
.getgid() is not gid
):
55 for listname
in Utils
.list_names():
57 mlist
= MailList
.MailList(listname
,lock
=0)
59 print 'ERROR for '+listname
64 ############################################
66 ############################################
70 print 'OK for '+listname
72 print 'ERROR for '+listname