Unsubscribe a user from lists

Email Address:
\n"; #print $_REQUEST['list'] . "
\n"; foreach ( $_REQUEST['list'] as $list ) { # Do something with $ent #print "Removing " . $_REQUEST['email'] . " from $list
\n"; $cmd = "sudo -u mailman /usr/local/mailman/bin/remove_members $list " . $_REQUEST['email']; #print "cmd = $cmd
\n"; print "Removing from $list
\n"; $fp = popen($cmd, "r"); while(!feof($fp)) { $read = fgets($fp, 2096); $read = rtrim($read); if (strlen($read) > 0) { $results .= "$read\n"; } } #print "results = $results\n"; pclose($fp); } } else { if (!(preg_match("/[^@]*@[^@]*/", $_REQUEST['email']))) { print "Sorry, you must enter a full email address.
\n"; } else { $command = "sudo -u mailman /usr/local/mailman/bin/find_member " . escapeshellarg($_REQUEST['email']); $fp = popen ($command, "r"); while (!feof($fp)){ $read = fgets($fp, 2096); $read = rtrim($read); if ( strlen($read)>0 ) { #$result .= "$read\n" ; $results[] = $read; } } pclose($fp) ; if ($results == "") { print "Sorry, " . $_REQUEST['email'] . " is not on any mailing lists
\n"; } else { print "\n"; print "\n"; print "\n"; while ($ent = current($results)) { if (preg_match("/^(.*) found in:$/", $ent, $match)) { print "\n"; $addr = $match[1]; $re = "(" . $_REQUEST['email'] . ")"; #print "re = $re
\n"; $address = eregi_replace($re, "\\1", $addr); print "\n"; #print $match[1] . "
\n"; next($results); print "\n"; break; } next($results); } } next($results); } ?> \n"; print "
Email addressLists
$address\n"; print "
"; ?>
\n"; } } } ?> Back to Mailman Services Page