[Mailman-Users] Unsubscription Script, try #2

Bob Puff@NLE bob at nleaudio.com
Tue Jan 16 02:28:27 CET 2001


Ok guys, here's my second shot at this unsubscription script.  This time I used sendmail, and made the message look like it came from the person, so they get the unsubscription confirmation message.  But there is a serious problem.  First though, here is the script:


#!/bin/bash
#
# Mailman auto unsubscription  by Bob Puff 01/15/01
#
# Call from your aliases file like:
# test-unsub:   /home/mailman/unsub test-request at yourdomain.com
#
sp="xxxxx"  # Put your site password here
#

read fl ;
addr="`echo $fl | awk '{print $2}'`" ;
# Yeah, it's crude, but it gets the user's address most of the time

echo "From: $addr" > /tmp/$addr
echo "To: $1" >> /tmp/$addr
echo "Subject: unsubscribe $sp $addr" >> /tmp/$addr
echo "" >> /tmp/$addr
echo "unsubscribe $sp $addr" >> /tmp/$addr
echo "" >> /tmp/$addr

/usr/lib/sendmail -f $addr $1 < /tmp/$addr     
rm /tmp/$addr


Now to the problem.  Mailman kicks back the line to the user, along with the message "succeeded."  The big problem is that it reveals the site password!  It would be much nicer to have mailman reply with, "You have successfully unsubscribed from xxx."

If we use the remove member file in /bin, I suspect we're back at square 1 with no message being sent to the user.  I suppose the script could generate this message, but it would be nicer to have Mailman do it.

Ideas?

Bob




More information about the Mailman-Users mailing list