[Mailman-Users] Nno require password for WEB unsubscribe

Daniel Abad dabad at cidadei.com.br
Tue Jan 22 14:04:16 CET 2002

Hi all!

I use this like a solution for unsubscribe without a password.. but, how to
do the same using my browser? 
I need to create a simple webpage that unsubscribe my user without use pass.
Is it possible??

Tks all.


-----Mensagem original-----
De: Jon Carnes [mailto:jonc at nc.rr.com]
Enviada em: quarta-feira, 16 de janeiro de 2002 05:28
Para: tdavis at birddog.com; Jon Carnes
Cc: mailman-users at python.org
Assunto: Re: [Mailman-Users] no require password for unsubscribe?

On Tuesday 15 January 2002 16:29, tdavis at birddog.com wrote:
> I was pondering this idea.  Great idea it is too.
> But is there a way to get the email address from the FROM headers rather
> than have them explicity put it in the subject line ?
> I see a problem in the FROM headers where they can have a bunch of stuff
> in there like name and whatever else like "Foo Bar <jo at hotmail.com>"
> Any thoughts here?

Easy, use:
  UNSUB=`grep -i "From: " - |head -1 |tr "<>" "  " `

The command tr is translate, and we're using it here to convert any < or > 
into a blank.  The rest of the script then handles it from there, looking 
for an isolated string that has a @ inside it.

BTW: A friend of mine came up with a more elegant solution for doing the 

 - 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":

# This script runs as user mailman, but is only executable by user mail
# script to unsubscribe user from volleyball list
#   Mail to volleyball-unsub at haht.com
#   Subject: unsubscribe username at domain.com
UNSUB=`grep -i "Subject: " - |head -1`
for i in $UNSUB
   /home/mailman/bin/remove_members volleyball $i
# 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.


Jon Carnes

Mailman-Users maillist  -  Mailman-Users at python.org

More information about the Mailman-Users mailing list