LSTSRV-L Archives

LISTSERV Site Administrators' Forum

LSTSRV-L

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Bob Jones <[log in to unmask]>
Fri, 22 Jun 2007 14:01:07 -0400
text/plain (77 lines)
Kevin Parris wrote:
> Depending on your situation, either the Maestro option presented by
> Francoise or a List Exit.  For the exit, review the Advanced Topics
> manual, it isn't covered in the other manuals.
>
> A list exit is not very complicated.  If your LISTSERV system is going

Okay, so this thread has been dead a while, but I finally got around to
trying to implement a LIST_EXIT as suggested and have run into an issue.
    I read the section on LIST_EXIT in the Advanced Topics manual as
suggested and wrote an exit script.  However, I am not seeing the
advertised behavior as in the Advanced Topics manual.  Here's the
section I'm referring to:

5.2.2 DELETE/SIGNOFF/CHANGE Entry Points

Name: DEL_FILTER

Parameters: One or two; target e-mail address '15'x originator's address
Return code: 0=Accept, 1=Reject, 2=Interrupt processing of command

Description: This exit point is called for all SIGNOFF commands, and for
DELETE commands issued by a registered Node Administrator. It is NOT
called for DELETE commands originating from the list owner. If you
return the value 1, LISTSERV does not delete the target e-mail address
but continues to look for more addresses matching the pattern provided,
and the exit will be called again as appropriate. If you return the
value 2, LISTSERV simply interrupts the processing of the SIGNOFF
command and terminates the command with no further message (i.e., you
have to send your own explanation back to the command originator). If
the request is rejected, you should check for the presence of the second
parameter and send an explanatory message to that address, or to the
target address if only one parameter was specified.

I read this as saying this is the entry point I want to use to capture a
users SIGNOFF command to the list.  However, when a user actually sends
a SIGNOFF command, it seems the epname that the exit script is receiving
is DEL_SIGNOFF

Here's the script (it's pretty simple):

#!/usr/xpg4/bin/sh

# Get the arguements:
echo "JAIL ran..." > /tmp/jail.out
EPNAME=${1}; shift
echo "EPNAME =${EPNAME}=" >> /tmp/jail.out
LISTNAME=${1}; shift
echo "LISTNAME =${LISTNAME}=" >> /tmp/jail.out
TARGET_MAIL=${1}; shift
echo "TARGET_MAIL =${TARGET_MAIL}=" >> /tmp/jail.out
ORIGINATOR_MAIL=${1}
echo "ORIGINATOR_MAIL =${ORIGINATOR_MAIL}=" >> /tmp/jail.out

if [ ${EPNAME} != "DEL_FILTER" ]
then
         # This is a SIGNOFF/DELETE request, so trap it and complain
         EXIT 1
         EXIT-STRING Only the list owner is allowed to remove members
else
         # This is not a SIGNOFF/DELETE request, so continue processing
         exit 0
fi

The echo's are to allow me to do some debugging... so, when a user sends
the SIGNOFF message, here is what got put in jail.out:

JAIL ran...
EPNAME =DEL_SIGNOFF=
LISTNAME =TEST1=
TARGET_MAIL [log in to unmask]
ORIGINATOR_MAIL ==

The user is not the list owner nor a site administrator.  So, am I just
missing something here (probably) or is the LIST_EXIT not working as
documented.

ATOM RSS1 RSS2