Re: [Mailman-Users] How to import a list of members?
![](https://secure.gravatar.com/avatar/9d3e0579c010b91cec6aa63c55803e43.jpg?s=120&d=mm&r=g)
Hallo Zbigniew,
Op vrijdag 25 april 2008 schreef Zbigniew Szalbot aan lists.mailman-users@duinheks.nl:
Lovely! That seems to de exactly what I want. Thank tou very much for your help.
Groeten,
Hans.
jdh punt beekhuizen bij duinheks punt nl
--- GoldED+/LNX 1.1.5/080305
- Origin: The Wizard is using MBSE/Linux (2:280/1018)
![](https://secure.gravatar.com/avatar/f13c29c47480a7806c6c769d98d8b749.jpg?s=120&d=mm&r=g)
Not sure if this will help anyone - but I had a requirement to enable remote subscription from a command line. I wrapped a call to cURL for this.
--->8---
#!/bin/bash
# mlynn 03/28/2008
# Wrap a call to curl to enable subscription to a mailman list
#
VERSION="0.1"
MAILMANURL="http://lists.yourserver.com/mailman/subscribe"
PROGRAM=basename $0
function ERROR # Spew the wrongness { echo "Error: Code $1" echo "${2}?" exit $1 }
function SYNTAX # # Tell the people how you communicate # { echo "SYNTAX:" echo "$PROGRAM $VERSION" echo " $PROGRAM [[email] [firstname] [lastname] [password] [listname]]" echo " This handy script will wrap a call to cURL for the purpose of subscribing" echo " a user to a mailman list. If you fail to provide optional arguments, you" echo " will be prompted to enter them at the command line." echo " " }
function CHECKCURL
#
# Check for commands you depend upon
#
{
CURL=which curl
if [ $? -ne 0 ]; then
ERROR 1 "the command curl is missing from the system"
fi;
}
function GETARGS # # Get the arguments - duh. # { if [ "$1" = "-h" -o "$1" = "--h" ]; then SYNTAX exit 0 fi if [ -z $1 ]; then { echo "Enter email for user to be subscribed: " read EMAIL if [ -z $EMAIL ]; then ERROR 30 "You must enter a valid email address." fi } else EMAIL=$1 fi if [ -z $2 ]; then { echo "Enter the first name of the person to be subscribed: " read FIRSTNAME if [ -z $FIRSTNAME ]; then ERROR 30 "You the first name of the subscibee." fi } else FIRSTNAME=$2 fi if [ -z $3 ]; then { echo "Enter the last name of the person to be subscribed: " read LASTNAME if [ -z $LASTNAME ]; then ERROR 30 "You the last name of the subscibee." fi } else LASTNAME=$3 fi if [ -z $4 ]; then { echo "Enter the list access password for this user: " read PW if [ -z $PW ]; then ERROR 30 "You must enter a password for $EMAIL." fi } else PW=$4 fi if [ -z $5 ]; then { echo "Enter the list name to subscribe $EMAIL to: " read LIST if [ -z $LIST ]; then ERROR 30 "You must enter a valid listname." fi } else LIST=$5 fi }
function DOCURL # Build the cURL call {
# urlencode the email '@'
UEMAIL=`echo $EMAIL | sed "s/\@/\%40/g"`
CMD="curl -s
$MAILMANURL/${LIST}?email=${UEMAIL}&fullname=$FIRSTNAME%20$LASTNAME&pw=$
PW&pw-conf=$PW&digest=0&email-button=Submit"
OUT=${CMD}
if echo ${OUT} | grep -i "no such list"
; then
{
ERROR 30 "List $LIST not found. Please check
and try again."
}
else
{
echo "List subscription for the following user
appears to have worked."
echo "Email: $EMAIL"
echo "Full Name: $FIRSTNAME $LASTNAME"
echo "The user should recieve an email
requesting confirmation for this subscription."
exit 0
}
fi
}
CHECKCURL GETARGS $1 $2 $3 $4 $5 DOCURL ---8<----
-----Original Message----- From: mailman-users-bounces+michael_lynn=ml.com@python.org [mailto:mailman-users-bounces+michael_lynn=ml.com@python.org] On Behalf Of lists.mailman-users@duinheks.nl Sent: Friday, April 25, 2008 4:47 AM To: mailman-users Subject: Re: [Mailman-Users] How to import a list of members?
Hallo Zbigniew,
Op vrijdag 25 april 2008 schreef Zbigniew Szalbot aan lists.mailman-users@duinheks.nl:
Lovely! That seems to de exactly what I want. Thank tou very much for your help.
Groeten,
Hans.
jdh punt beekhuizen bij duinheks punt nl
--- GoldED+/LNX 1.1.5/080305
- Origin: The Wizard is using MBSE/Linux (2:280/1018)
Mailman-Users mailing list Mailman-Users@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/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/michael_lynn%40ml.c om
Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp
This message w/attachments (message) may be privileged, confidential or proprietary, and if you are not an intended recipient, please notify the sender, do not use or share it and delete it. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Merrill Lynch. Subject to applicable law, Merrill Lynch may monitor, review and retain e-communications (EC) traveling through its networks/systems. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or error-free. This message is subject to terms available at the following link: http://www.ml.com/e-communications_terms/. By messaging with Merrill Lynch you consent to the foregoing.
![](https://secure.gravatar.com/avatar/1a93c56100e4ff59148a61aa3e051fdc.jpg?s=120&d=mm&r=g)
Wow, that beats my lazy way of doing it, which is simply a cron job which uses the *add_members* function to import a list of email addresses from a text file, that I have a PHP script <http://www.syjmovie.com> saving the addresses to.
Michael Kubler *G*rey *P*hoenix *P*roductions <http://www.greyphoenix.biz>
Lynn, Michael (A&E) wrote:
![](https://secure.gravatar.com/avatar/a429822da1b8906a24ae4dddb0ac39d5.jpg?s=120&d=mm&r=g)
Hello Michael Lynne and other list members,
I'm looking for an easy way to update the real names ONLY for members already on the list.
I've studied
FAQ "3.53. Additional web administration tools?"
(http://tinyurl.com/4r553c)
and
Michael Lynne's curl wrapper
(http://tinyurl.com/5gug8d)
but I can't find a place where the CGI's are documented to know how I could write a curl wrapper to do what I want.
I don't have direct access to the command line tools or binaries because I'm using mailman provided by a hosting service.
Can anyone point me in the right direction?
Kind regards, Todd Andrews
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Todd Andrews wrote:
View the source of the appropriate page in your browser to see what post data is sent by the form when you submit it.
A URL similar to
will do what you want
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/f13c29c47480a7806c6c769d98d8b749.jpg?s=120&d=mm&r=g)
Not sure if this will help anyone - but I had a requirement to enable remote subscription from a command line. I wrapped a call to cURL for this.
--->8---
#!/bin/bash
# mlynn 03/28/2008
# Wrap a call to curl to enable subscription to a mailman list
#
VERSION="0.1"
MAILMANURL="http://lists.yourserver.com/mailman/subscribe"
PROGRAM=basename $0
function ERROR # Spew the wrongness { echo "Error: Code $1" echo "${2}?" exit $1 }
function SYNTAX # # Tell the people how you communicate # { echo "SYNTAX:" echo "$PROGRAM $VERSION" echo " $PROGRAM [[email] [firstname] [lastname] [password] [listname]]" echo " This handy script will wrap a call to cURL for the purpose of subscribing" echo " a user to a mailman list. If you fail to provide optional arguments, you" echo " will be prompted to enter them at the command line." echo " " }
function CHECKCURL
#
# Check for commands you depend upon
#
{
CURL=which curl
if [ $? -ne 0 ]; then
ERROR 1 "the command curl is missing from the system"
fi;
}
function GETARGS # # Get the arguments - duh. # { if [ "$1" = "-h" -o "$1" = "--h" ]; then SYNTAX exit 0 fi if [ -z $1 ]; then { echo "Enter email for user to be subscribed: " read EMAIL if [ -z $EMAIL ]; then ERROR 30 "You must enter a valid email address." fi } else EMAIL=$1 fi if [ -z $2 ]; then { echo "Enter the first name of the person to be subscribed: " read FIRSTNAME if [ -z $FIRSTNAME ]; then ERROR 30 "You the first name of the subscibee." fi } else FIRSTNAME=$2 fi if [ -z $3 ]; then { echo "Enter the last name of the person to be subscribed: " read LASTNAME if [ -z $LASTNAME ]; then ERROR 30 "You the last name of the subscibee." fi } else LASTNAME=$3 fi if [ -z $4 ]; then { echo "Enter the list access password for this user: " read PW if [ -z $PW ]; then ERROR 30 "You must enter a password for $EMAIL." fi } else PW=$4 fi if [ -z $5 ]; then { echo "Enter the list name to subscribe $EMAIL to: " read LIST if [ -z $LIST ]; then ERROR 30 "You must enter a valid listname." fi } else LIST=$5 fi }
function DOCURL # Build the cURL call {
# urlencode the email '@'
UEMAIL=`echo $EMAIL | sed "s/\@/\%40/g"`
CMD="curl -s
$MAILMANURL/${LIST}?email=${UEMAIL}&fullname=$FIRSTNAME%20$LASTNAME&pw=$
PW&pw-conf=$PW&digest=0&email-button=Submit"
OUT=${CMD}
if echo ${OUT} | grep -i "no such list"
; then
{
ERROR 30 "List $LIST not found. Please check
and try again."
}
else
{
echo "List subscription for the following user
appears to have worked."
echo "Email: $EMAIL"
echo "Full Name: $FIRSTNAME $LASTNAME"
echo "The user should recieve an email
requesting confirmation for this subscription."
exit 0
}
fi
}
CHECKCURL GETARGS $1 $2 $3 $4 $5 DOCURL ---8<----
-----Original Message----- From: mailman-users-bounces+michael_lynn=ml.com@python.org [mailto:mailman-users-bounces+michael_lynn=ml.com@python.org] On Behalf Of lists.mailman-users@duinheks.nl Sent: Friday, April 25, 2008 4:47 AM To: mailman-users Subject: Re: [Mailman-Users] How to import a list of members?
Hallo Zbigniew,
Op vrijdag 25 april 2008 schreef Zbigniew Szalbot aan lists.mailman-users@duinheks.nl:
Lovely! That seems to de exactly what I want. Thank tou very much for your help.
Groeten,
Hans.
jdh punt beekhuizen bij duinheks punt nl
--- GoldED+/LNX 1.1.5/080305
- Origin: The Wizard is using MBSE/Linux (2:280/1018)
Mailman-Users mailing list Mailman-Users@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/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/michael_lynn%40ml.c om
Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp
This message w/attachments (message) may be privileged, confidential or proprietary, and if you are not an intended recipient, please notify the sender, do not use or share it and delete it. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Merrill Lynch. Subject to applicable law, Merrill Lynch may monitor, review and retain e-communications (EC) traveling through its networks/systems. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or error-free. This message is subject to terms available at the following link: http://www.ml.com/e-communications_terms/. By messaging with Merrill Lynch you consent to the foregoing.
![](https://secure.gravatar.com/avatar/1a93c56100e4ff59148a61aa3e051fdc.jpg?s=120&d=mm&r=g)
Wow, that beats my lazy way of doing it, which is simply a cron job which uses the *add_members* function to import a list of email addresses from a text file, that I have a PHP script <http://www.syjmovie.com> saving the addresses to.
Michael Kubler *G*rey *P*hoenix *P*roductions <http://www.greyphoenix.biz>
Lynn, Michael (A&E) wrote:
![](https://secure.gravatar.com/avatar/a429822da1b8906a24ae4dddb0ac39d5.jpg?s=120&d=mm&r=g)
Hello Michael Lynne and other list members,
I'm looking for an easy way to update the real names ONLY for members already on the list.
I've studied
FAQ "3.53. Additional web administration tools?"
(http://tinyurl.com/4r553c)
and
Michael Lynne's curl wrapper
(http://tinyurl.com/5gug8d)
but I can't find a place where the CGI's are documented to know how I could write a curl wrapper to do what I want.
I don't have direct access to the command line tools or binaries because I'm using mailman provided by a hosting service.
Can anyone point me in the right direction?
Kind regards, Todd Andrews
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Todd Andrews wrote:
View the source of the appropriate page in your browser to see what post data is sent by the form when you submit it.
A URL similar to
will do what you want
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (5)
-
lists.mailman-users@duinheks.nl
-
Lynn, Michael (A&E)
-
Mark Sapiro
-
Michael Kubler
-
Todd Andrews