Thanks for all your efforts, Bob!
We are using your script on our live lists with great success.
I'm sure many lists will find this useful and I'm hoping to see it
in one of the future Mailman releases as a built-in feature. A
'confirmed unsubscription' similar to this but with a 'pending
unsubscriptions' db and random numbers would be the final
step, but we're more than satisfied now.
Gergely Soros
----- Original Message -----
From: "Bob Puff@NLE" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 16, 2001 3:09 AM
Subject: [Mailman-Users] Unsubscription Script, Try #3
> Ok, think I figured out a safe way. I used the <listname>-admin as the From:
>address in the mail to Mailman. Also added a return
message to the originating person confirming their unsubscription. So far, this looks
to be good!
>
> Call it with a couple parameters in your aliases file.
>
> Here is the script. Put this in /home/mailman, or wherever else you would like it:
>
> #!/bin/bash
> #
> # Mailman auto unsubscription by Bob Puff 01/15/01
> #
> # Pass two parameters to this script:
> # /home/mailman/unsub <list name> <domain name>
>
> # Call from your aliases file like:
> # test-unsub: /home/mailman/unsub test 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: $1-admin@$2" > /tmp/$addr
> echo "To: $1-request@$2" >> /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 $1-admin@$2 $1-request@$2 < /tmp/$addr
> rm /tmp/$addr # send the unsub to mailman, and clean up
>
> echo "From: $1-admin@$2" > /tmp/$addr
> echo "To: $addr" >> /tmp/$addr
> echo "Subject: Unsubscription Confirmation" >> /tmp/$addr
> echo "" >> /tmp/$addr
> echo "This message is to confirm your unsubscription request to" >> /tmp/$addr
> echo "the $1 list. You will receive no more messages from" >> /tmp/$addr
> echo "this list. Thank you." >> /tmp/$addr
> echo "" >> /tmp/$addr
>
> /usr/lib/sendmail -f $1-admin@$2 $addr < /tmp/$addr
> rm /tmp/$addr # send msg to the person, and clean up
>
> ------------------------------------------------------
> Mailman-Users maillist - [EMAIL PROTECTED]
> http://mail.python.org/mailman/listinfo/mailman-users
------------------------------------------------------
Mailman-Users maillist - [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users