[script]mailman use password
This commit is contained in:
parent
9b71fca20d
commit
56c327d152
@ -3,7 +3,8 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
MAILMAN_HOME="/usr/lib/mailman/bin"
|
MAILMAN_HOME="/usr/lib/mailman/bin"
|
||||||
MAILING_PREFIX="noel"
|
MAILING_PREFIX="noel"
|
||||||
|
ADMIN_MAIL="mathieu@mathux.org"
|
||||||
|
ADMIN_PWD=""
|
||||||
|
|
||||||
def getListUser(listName):
|
def getListUser(listName):
|
||||||
cmd = MAILMAN_HOME+"/list_members "+listName
|
cmd = MAILMAN_HOME+"/list_members "+listName
|
||||||
@ -42,7 +43,7 @@ def getMailingLists (prefix):
|
|||||||
return lists
|
return lists
|
||||||
|
|
||||||
def createList(name):
|
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,
|
proc = subprocess.Popen(cmd,
|
||||||
shell=True,
|
shell=True,
|
||||||
stdin=sys.stdin,
|
stdin=sys.stdin,
|
||||||
@ -91,7 +92,7 @@ def delUserFromList(userEmail, listName):
|
|||||||
(stdout, stderr) = proc.communicate()
|
(stdout, stderr) = proc.communicate()
|
||||||
ret = proc.returncode
|
ret = proc.returncode
|
||||||
|
|
||||||
|
|
||||||
#--------------------MAIN--------------------
|
#--------------------MAIN--------------------
|
||||||
if len(sys.argv) < 3:
|
if len(sys.argv) < 3:
|
||||||
print "Usage %s nom email [ancien_email]"%sys.argv[0]
|
print "Usage %s nom email [ancien_email]"%sys.argv[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user