/** * Create new mailing list with mailman 'newlist' tool * then update the list configuration according to list settings * @return true on success, false otherwise */ public function createList($group_list_id) { $dar = $this->_getMailingListDao()->searchByGroupListId($group_list_id); if ($row = $dar->getRow()) { $list = new MailingList($row); $list_admin = UserManager::instance()->getUserById($list->getListAdmin()); $list_admin_email = $list_admin->getEmail(); $list_dir = $GLOBALS['mailman_list_dir'] . "/" . $list->getListName(); if (!is_dir($list_dir) && $list->getIsPublic() != 9) { // Create list system($GLOBALS['mailman_bin_dir'] . "/newlist -q " . $list->getListName() . " {$list_admin_email} " . $list->getListPassword() . " >/dev/null"); // Then update configuraion return $this->updateListConfig($list); } } return false; }