On Sat, 2002-09-21 at 20:43, Trek*Spot Webmaster wrote:
> Hello,
> 
> I'm the one who started this thread on unsubscribing, and your idea sounds
> good.  How exactly can I go about setting this up?  (I'm completely new to
> MailMan.)
> 
> Curry O'Day
> Trek*Spot Webmaster
> http://www.trekspot.com
> 
> ----- Original Message -----
> From: "Jon Carnes" <[EMAIL PROTECTED]>
> To: "Anthony Carmody" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Saturday, September 21, 2002 9:28 AM
> Subject: Re: [Mailman-Users] un-subscription problems
> 
>

There are a couple of ways of doing this. The easiest is to add the
email address to a file and then let a mailman script (activated via an
hourly cron job) unsubscribe the user.

You should be able to modify the scripts below to write a mail Script to
collect the emails into a file, and a mailman script to pull the email
addresses out of the list.

===
A client wanted it to happen immediately so I wrote this (the email
addresses have been changed to protect the innocent):

 - In the aliases file, add an entry for the unsubscribe email:
     volleyball-unsub:  "|/home/mailman/ext/v-unsub"

 - Create the directory /home/mailman/ext
     mkdir /home/mailman/ext
     chown mail /home/mailman/ext
     chmod 0700 /home/mailman/ext

 - In /home/mailman/ext create the script "v-unsub":

#!/home/mailman/ext/bash_mailman
# This script runs as user mailman, but is only executable by user mail
# script to unsubscribe user from volleyball list
#   Mail to [EMAIL PROTECTED]
#   Subject: unsubscribe [EMAIL PROTECTED]
UNSUB=`grep -i "Subject: " - |head -1`
for i in $UNSUB
do
   /home/mailman/bin/remove_members volleyball $i
done
# End of script


 - Make the script executable:
     chmod a+x /home/mailman/ext/v-unsub

 - In the /etc/smrsh directory:
     ln -s /home/mailman/ext/v-unsub v-unsub

 - Copy and modify bash so that it runs as user mailman:
     cp /bin/bash /home/mailman/ext/bash_mailman
     chown mailman.mailman /home/mailman/ext/bash_mailman
     chmod 0555 /home/mailman/ext/bash_mailman
     chmod u+s,g+s /home/mailman/ext/bash_mailman

===

The directory /home/mailman/ext has rights such that only the mail user
can 
access the files within.  The copied version of "bash" now called 
"bash_mailman" has it's ownership changed to mailman and then has it's
UID 
and GID bits set.  Any script that runs using it as a shell will now run
as 
the user mailman with group mailman.

Wahoo!
 
Hope this helps - Jon Carnes


------------------------------------------------------
Mailman-Users mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/

Reply via email to