There are a couple of commands that are generally used internally between WA and LISTSERV to provide information to the web interface in a manner specially formatted for that use.  In some cases these commands may be useful to third-party programmers who would otherwise have to parse out the human-oriented responses from the standard commands.


Query ***GUI*** listname [FOR userid@host]

The basic QUERY ***GUI*** command may be issued by any user -- it's effectively the same as the standard QUERY command in that regard -- but requires list owner or LISTSERV maintainer privileges and authentication (personal password or OK cookie confirmation) to be used with the FOR modifier to obtain someone else's information, again, the same as the standard QUERY command.  List owners may execute the command with the FOR modifier only against lists they own.

The QUERY ***GUI*** command provides a machine-readable alternative to the QUERY command.  For instance, the "standard" command QUERY TEST FOR J.DOE@EXAMPLE.COM will result in a response like this:

Subscription options for "Doe, Jane" <j.doe@EXAMPLE.COM>, list TEST:

MAIL           You are sent individual postings as they are received
FULLHDR        Full (normal) mail headers
NOREPRO        You do not receive a copy of your own postings
ACK            Short e-mail acknowledgement of successfully processed
              postings

Subscription date: 29 Mar 2019

The topics you subscribe to are: All

One matching entry found.

It is not impossible to parse that output with a script.  However, it is much simpler for a script to parse the output of QUERY ***GUI*** TEST FOR J.DOE@EXAMPLE.COM , which looks like this:

***HDR*** j.doe@EXAMPLE.COM
***NAME*** Doe, Jane
***LIST*** TEST

***OPT*** MAIL
***OPT*** FULLHDR
***OPT*** NOREPRO
***OPT*** ACK

***SUBDATE*** 29 Mar 2019
***TOPICS*** All
***TOPLIST*** A B C

One matching entry found.

If there are multiple matches (for instance, if you use a wildcard specification for the email address), each match will begin with the ***HDR*** line, so it is simple for your script to process the individual entries.

Note that the word "GUI" in "***GUI***" MUST be capitalized.  If it is not, you get the following:

There is no ***GUI*** list on this server. Try sending a "LIST" command to
get    a    description    of     all    the    lists    available    from
LISTSERV@LISTSERV.EXAMPLE.COM.

Subscription options for "Doe, Jane" <j.doe@EXAMPLE.COM>, list test:

MAIL           You are sent individual postings as they are received
FULLHDR        Full (normal) mail headers
NOREPRO        You do not receive a copy of your own postings
ACK            Short e-mail acknowledgement of successfully processed
              postings

Subscription date: 29 Mar 2019

The topics you subscribe to are: All

One matching entry found.

Also note that the minimum abbreviation "Q" is acceptable in place of "QUERY", so "Q ***GUI*** FOR J.DOE@EXAMPLE.COM" is valid.


SHOW X-LISTKWD *
SHOW X-LISTKWD keyword[,keyword2,...keywordn] * | listname [listname2,...listnamen]

SHOW X-LISTKWD cannot be issued by list subscribers without higher privilege.  Execution requires list owner or LISTSERV maintainer privileges and authentication (personal password, OK cookie confirmation).  List owners may execute the command only against lists they own.

SHOW X-LISTKWD is another LISTSERV internal command, which can be useful for determining via a script what lists exist on the server, and/or what options are set for a specified list.  For instance,

SHOW X-LISTKWD *

sends back a list of the lists on your server in a machine-readable format:

***LIST*** ODBCTEST
***LIST*** TEST-NONOTEBOOK
***LIST*** TEST

This is similar to the human-friendly output of the LISTS command, which would probably provide more information than you need:

ODBCTEST          OBDC test list
TEST              Test list
TEST-NONOTEBOOK   Test list with no notebook

But the command is much more powerful than this.  Let's add "OWNER" as a parameter before the asterisk, and make the command

SHOW X-LISTKWD OWNER *

***LIST*** ODBCTEST
OWNER nathan@EXAMPLE.COM
***LIST*** TEST-NONOTEBOOK
OWNER nathan@EXAMPLE.COM
***LIST*** TEST
OWNER nathan@EXAMPLE.COM jdoe@EXAMPLE.COM

That's more like it; now you have a tool to provide an easily-parsed list of all of your list owners, by list.  Note that if you have defined an owner address that contains characters that need to be escaped, e.g.,

Owner= "john.o'shaugnessy"@example.com

, that address will show up in the output without the double-quotes, e.g.,

***LIST*** TEST
OWNER nathan@EXAMPLE.COM john.o'shaugnessy@EXAMPLE.COM

But what if we want to know who all the owners, editors, and moderators are for all lists on the server?  Simple, comma-separate the three keywords and use a wildcard instead of a list name:

SHOW X-LISTKWD OWNER,EDITOR,MODERATOR *

***LIST*** ODBCTEST
OWNER nathan@EXAMPLE.COM
***LIST*** TEST-NONOTEBOOK
OWNER nathan@EXAMPLE.COM
EDITOR nathan@EXAMPLE.COM
MODERATOR ALL nathan@EXAMPLE.COM
***LIST*** TEST
OWNER nathan@EXAMPLE.COM jdoe@EXAMPLE.COM
EDITOR jdoe@EXAMPLE.COM (TEST)

Important:  When specifying multiple keywords with SHOW X-LISTKWD, there cannot be any spaces between the keywords and the commas.  You MUST specify multiple keywords exactly as shown, i.e.,


keyword1,keyword2,keyword3

       and so forth, for as many keywords as you are specifying.  If any spaces are found in the keywords, the command fails with no output.  This command was designed to be issued by an automated process, so it expects a rather rigid syntax.  If your calls to SHOW X-LISTKWD are returning no data, check to ensure that you have not inadvertently put spaces between the keywords and their commas.


In summary,


SHOW X-LISTKWD OWNER,EDITOR,MODERATOR *

works, but


SHOW X-LISTKWD OWNER, EDITOR, MODERATOR *

SHOW X-LISTKWD OWNER , EDITOR , MODERATOR *

or any other combination of keywords, commas, and spaces, do not work.


Tip:  When issued by a list owner who is not a LISTSERV maintainer, this command will output information only for the lists owned by that list owner

Note:  If you have set the "Quiet:" parameter in the Owner= keyword, it will show up like this:


***LIST*** TEST
OWNER nathan@EXAMPLE.COM QUIET: jdoe@EXAMPLE.COM

If you want to issue the SHOW X-LISTKWD command against a single list, simply specify it instead of the wildcard:

SHOW X-LISTKWD OWNER,EDITOR,MODERATOR TEST

***LIST*** TEST
OWNER nathan@EXAMPLE.COM jdoe@EXAMPLE.COM
EDITOR jdoe@EXAMPLE.COM (TEST)

You may specify multiple lists (space-separated) if you choose:

SHOW X-LISTKWD OWNER,EDITOR,MODERATOR TEST ODBCTEST

***LIST*** TEST
OWNER nathan@EXAMPLE.COM jdoe@EXAMPLE.COM
EDITOR jdoe@EXAMPLE.COM (TEST)
***LIST*** ODBCTEST
OWNER nathan@EXAMPLE.COM

Tip:  When you specify list names explicitly, the results will display in the same order in which you specified the list names.

The SHOW X-LISTKWD command works with any documented list header keyword.  For instance:

SHOW X-LISTKWD NOTEBOOK,DIGEST TEST

***LIST*** TEST
NOTEBOOK YES E:\LISTSERV\LISTS\TEST MONTHLY PRIVATE
DIGEST YES SAME DAILY BOTTOM_BANNER

SHOW X-LISTKWD NOTEBOOK,DIGEST TEST

***LIST*** TEST
DEFAULT-OPTIONS NOACK REPRO

SHOW X-LISTKWD SUBSCRIPTION *

***LIST*** ODBCTEST
SUBSCRIPTION BY_OWNER
***LIST*** TEST-NONOTEBOOK
SUBSCRIPTION CLOSED
***LIST*** TEST
SUBSCRIPTION OPEN

and so forth.  If a particular keyword is not set explicitly for a given list, there is simply no output for that keyword:

SHOW X-LISTKWD SUBSCRIPTION,NOTIFY *

***LIST*** ODBCTEST
SUBSCRIPTION BY_OWNER
***LIST*** TEST-NONOTEBOOK
SUBSCRIPTION CLOSED
NOTIFY YES
***LIST*** TEST
SUBSCRIPTION OPEN

In this case, only the TEST-NONOTEBOOK list has a setting for Notify.  You can assume at that point that the other lists are operating with the default setting (for Notify=, it would be "Yes", so in reality, all three of the lists are set to "Notify= Yes").