[Mailman-Users] Accessing commands from PHP
John Locke
mail at freelock.com
Sat Jun 22 23:08:05 CEST 2002
Hello,
I'm doing some web application development using PHP/MySQL, and am looking
for a programmatic way of checking to see if a user is already subscribed
to a Mailman list.
I'm using a hosting company that has Mailman 2.1 installed in a Virtual
Hosting environment, and they pointed me to the list.org pages.
I'd like to use the find_member command, but am having trouble. I've
located it on the file system, and when I execute it using backticks, I
can get the help message, but I can't actually get any results when I run
it against a username.
Here's my command:
$output = `cd /usr/local/cpanel/3rdparty/mailman/bin; ls -l; ./find_member
--help; ./find_member mail at freelock.com`; echo "<pre>$output</pre>";
.... and here's the output:
<begin quote>
total 144
-rwxr-xr-x 1 mailman mailman 6620 Jun 21 01:09 add_members
-rwxr-xr-x 1 mailman mailman 3838 Jun 21 01:09 arch
-rwxr-xr-x 1 mailman mailman 2462 Jun 21 01:09 check_db
-rwxr-xr-x 1 mailman mailman 8964 Jun 21 01:09 check_perms
-rwxr-xr-x 1 mailman mailman 7123 Jun 21 01:09 clone_member
-rwxr-xr-x 1 mailman mailman 8090 Jun 21 01:09 config_list
-rwxr-xr-x 1 mailman mailman 4474 Jun 21 01:09 digest_arch
-rwxr-xr-x 1 mailman mailman 1282 Jun 21 01:09 dumpdb
-rwxr-xr-x 1 mailman mailman 4915 Jun 21 01:09 find_member
-rwxr-xr-x 1 mailman mailman 2957 Jun 21 01:09 list_lists
-rwxr-xr-x 1 mailman mailman 3519 Jun 21 01:09 list_members
-rwxr-xr-x 1 mailman mailman 2386 Jun 21 01:09 mmsitepass
-rwxr-xr-x 1 mailman mailman 2440 Jun 21 01:09 move_list
-rwxr-xr-x 1 mailman mailman 6983 Jun 21 01:09 newlist
-rw-r--r-- 1 mailman mailman 1552 Jun 21 01:09 paths.py
-rw-r--r-- 1 mailman mailman 276 Jun 21 01:09 paths.pyc
-rwxr-xr-x 1 mailman mailman 3051 Jun 21 01:09 remove_members
-rwxr-xr-x 1 mailman mailman 2952 Jun 21 01:09 rmlist
-rwxr-xr-x 1 mailman mailman 8234 Jun 21 01:09 sync_members
-rwxr-xr-x 1 mailman mailman 12809 Jun 21 01:09 update
-rwxr-xr-x 1 mailman mailman 925 Jun 21 01:09 version
-rwxr-xr-x 1 mailman mailman 6245 Jun 21 01:09 withlist
Find all lists that a member's address is on.
Usage:
find_member [options] regex [regex [...]]
Where:
--listname=listname
-l listname
Include only the named list in the search.
--exclude=listname
-x listname
Exclude the named list from the search.
--owners
-w
Search list owners as well as members.
--help
-h
Print this help message and exit.
regex
A Python regular expression to match against.
The interaction between -l and -x is as follows. If any -l option is given
then only the named list will be included in the search. If any -x option is
given but no -l option is given, then all lists will be search except those
specifically excluded.
Regular expression syntax is Perl5-like, using the Python re module.
Completespecifications are at:
http://www.python.org/doc/current/lib/module-re.html
Address matches are case-insensitive, but case-preserved addresses are
displayed.
<end quote>
mail at freelock.com is subscribed to lists, but whatever I run, I get no
response (list_lists, list_members <listname>).
I'm sure the command is being run as the web server (nobody:nobody). I'm
guessing this is a permissions issue. What permissions do I need/how can I
get responses to these commands, in this environment?
Thanks,
John Locke
http://www.freelock.com
More information about the Mailman-Users
mailing list