[script]mailman use password

This commit is contained in:
Mathieu Maret 2016-10-24 23:58:14 +02:00
parent 9b71fca20d
commit 56c327d152

View File

@ -3,7 +3,8 @@ import subprocess
import sys
MAILMAN_HOME="/usr/lib/mailman/bin"
MAILING_PREFIX="noel"
ADMIN_MAIL="mathieu@mathux.org"
ADMIN_PWD=""
def getListUser(listName):
cmd = MAILMAN_HOME+"/list_members "+listName
@ -42,7 +43,7 @@ def getMailingLists (prefix):
return lists
def createList(name):
cmd = MAILMAN_HOME+"/newlist -l fr "+name
cmd = MAILMAN_HOME+"/newlist -a -l fr %s %s %s"%(name,ADMIN_MAIL,ADMIN_PWD)
proc = subprocess.Popen(cmd,
shell=True,
stdin=sys.stdin,
@ -91,7 +92,7 @@ def delUserFromList(userEmail, listName):
(stdout, stderr) = proc.communicate()
ret = proc.returncode
#--------------------MAIN--------------------
if len(sys.argv) < 3:
print "Usage %s nom email [ancien_email]"%sys.argv[0]