Added comments containing code to add new members to a mailing list using listadmin.

Left to do:
  - create mailing list
  - create and publish listadmin config file
  - update code to use listadmin config file
  - uncomment code
  - ponder implications of listadmin config file (security)
This commit is contained in:
Michael Gregson 2009-06-17 20:33:42 -06:00
parent 4e1bc7fc41
commit 4720fcd252
1 changed files with 6 additions and 0 deletions

View File

@ -152,6 +152,12 @@ def create_member(username, password, name, program):
addmember = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = addmember.communicate(password)
status = addmember.wait()
# # If the user was created, consider adding them to the mailing list
# if not status:
# listadmin_cfg_file = "/path/to/the/listadmin/config/file"
# mail = subprocess.Popen(["/usr/bin/listadmin", "-f", listadmin_cfg_file, "--add-member", username + "@csclub.uwaterloo.ca"])
# status2 = mail.wait() # Fuck if I care about errors!
except OSError, e:
raise MemberException(e)