FAQ
Ok guys, here's my feeble attempt (that works!) to allow someone to
unsubscribe by simply sending an email to a certain address.

First, set up your aliases file with the additional entry:

test-unsub: "|/home/mailman/test-unsub"

Now, put this little script file in /home/mailman:

#!/bin/bash
#
# Mailman auto unsubscription
#
sp="xxxx" #site password
ladr="test-request at yourdomain.com" #list -request address
#
#
read fl ;
addr="`echo $fl | awk '{print $2}'`" ;
echo "unsubscribe $sp $addr" | mail -s "unsubscribe $sp $addr" $ladr

Modify the SP= and the LADR= lines as needed for your list.
Save the file. Now CHMOD 755 the file.

That's it! The only disadvantage so far is that because the mailer runs
under the permissions from Mailman, the reply "you've been unsubscribed"
message goes to your mailman address. If someone wants to elaborate on
this, I'd suggest using sendmail, and making the "from:" address be the same
as the original sender (what is extracted here).

Have fun!

Bob

Search Discussions

  • Satya at Jan 12, 2001 at 6:35 am

    On Jan 11, 2001 at 22:04, Bob Puff @ NLE wrote:
    Ok guys, here's my feeble attempt (that works!) to allow someone to
    unsubscribe by simply sending an email to a certain address. [etc]
    That's it! The only disadvantage so far is that because the mailer runs
    under the permissions from Mailman, the reply "you've been unsubscribed"
    message goes to your mailman address. If someone wants to elaborate on
    this, I'd suggest using sendmail, and making the "from:" address be the same
    as the original sender (what is extracted here).
    That's it! Perfect! Instead of your unsub script, I'll call a Perl script
    that'll extract the from address and do SMTP...

    --
    Satya. <URL:http://satya.virtualave.net/>
    US-bound grad students! For pre-apps, see <URL:http://quickapps.cjb.net/>
    Press every key to continue.
  • Dan Wilder at Jan 12, 2001 at 6:46 am

    On Fri, Jan 12, 2001 at 12:05:57PM +0530, Satya wrote:
    On Jan 11, 2001 at 22:04, Bob Puff @ NLE wrote:

    Ok guys, here's my feeble attempt (that works!) to allow someone to
    unsubscribe by simply sending an email to a certain address. [etc]
    That's it! The only disadvantage so far is that because the mailer runs
    under the permissions from Mailman, the reply "you've been unsubscribed"
    message goes to your mailman address. If someone wants to elaborate on
    this, I'd suggest using sendmail, and making the "from:" address be the same
    as the original sender (what is extracted here).
    That's it! Perfect! Instead of your unsub script, I'll call a Perl script
    that'll extract the from address and do SMTP...
    Or check out "formail".

    That sort of thing is what formail is for.

    --
    -----------------------------------------------------------------
    Dan Wilder <dan at ssc.com> Technical Manager & Correspondent
    SSC, Inc. P.O. Box 55549 Phone: 206-782-7733 x123
    Seattle, WA 98155-0549 URL http://www.linuxjournal.com/
    -----------------------------------------------------------------
  • Satya at Jan 12, 2001 at 7:31 am

    On Jan 11, 2001 at 22:46, Dan Wilder wrote:
    On Fri, Jan 12, 2001 at 12:05:57PM +0530, Satya wrote:
    That's it! Perfect! Instead of your unsub script, I'll call a Perl script
    that'll extract the from address and do SMTP...
    Or check out "formail".
    Yessssss.... procmail|formail|perl|sendmail... That'll work best.

    Perl is in there to futz around with data(bases|files) looking for confirm
    codes, sending confirmation emails, etc.

    --
    Satya. <URL:http://satya.virtualave.net/>
    US-bound grad students! For pre-apps, see <URL:http://quickapps.cjb.net/>
    Coffee not found: user halted
  • Bob Puff@NLE at Jan 12, 2001 at 10:54 pm
    Please keep me posted on your success with the perl! If I knew more about Perl I would have tried it. Still learning this script stuff!

    Bob


    Satya wrote:
    On Jan 11, 2001 at 22:04, Bob Puff @ NLE wrote:

    Ok guys, here's my feeble attempt (that works!) to allow someone to
    unsubscribe by simply sending an email to a certain address. [etc]
    That's it! The only disadvantage so far is that because the mailer runs
    under the permissions from Mailman, the reply "you've been unsubscribed"
    message goes to your mailman address. If someone wants to elaborate on
    this, I'd suggest using sendmail, and making the "from:" address be the same
    as the original sender (what is extracted here).
    That's it! Perfect! Instead of your unsub script, I'll call a Perl script
    that'll extract the from address and do SMTP...

    --
    Satya. <URL:http://satya.virtualave.net/>
    US-bound grad students! For pre-apps, see <URL:http://quickapps.cjb.net/>
    Press every key to continue.

    ------------------------------------------------------
    Mailman-Users maillist - Mailman-Users at python.org
    http://www.python.org/mailman/listinfo/mailman-users
  • Gergely Soros at Jan 13, 2001 at 12:08 am
    You're a god, Bob!

    I've modified the scriptlet so you can pass the name of the list, the
    aliases line should look like:
    listname-unsub: "|/home/mailman/test-unsub listname"
    and the line changed in the script:
    ladr="$1-request at yourdomain.com" #list -request address

    That's it! The only disadvantage so far is that because the mailer runs
    under the permissions from Mailman, the reply "you've been unsubscribed"
    message goes to your mailman address. If someone wants to elaborate on
    this, I'd suggest using sendmail, and making the "from:" address be the same
    as the original sender (what is extracted here).
    The sitepassword would then be mailed to the member, wouldn't it?


    Thanks for your help.

    Gergely Soros

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-users @
categoriespython
postedJan 12, '01 at 3:04a
activeJan 13, '01 at 12:08a
posts6
users4
websitelist.org

People

Translate

site design / logo © 2022 Grokbase