[Mailman-Users] un-subscription problems

Anthony Carmody carmoda at zip.com.au
Sun Sep 22 06:53:00 CEST 2002


you know, I would be REALLY interested in a simple script invoked from a cron job, as I am on a virtual server and I
only have limited permissions & access etc.


----- Original Message -----
From: "Jon Carnes" <jonc at nc.rr.com>
To: "Trek*Spot Webmaster" <curryoday at trekspot.com>
Cc: <mailman-users at python.org>
Sent: Sunday, September 22, 2002 1:16 PM
Subject: Re: [Mailman-Users] un-subscription problems


: 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" <jonc at nc.rr.com>
: > To: "Anthony Carmody" <carmoda at interfaceergonomics.com>
: > Cc: <mailman-users at python.org>
: > 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 volleyball-unsub at haht.com
: #   Subject: unsubscribe username at domain.com
: 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
: Mailman-Users at python.org
: 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/
:





More information about the Mailman-Users mailing list