[Mailman-Users] Adding users via email - No confirmation wanted.

Tim Faircloth tpf at canes.gsw.edu
Wed Apr 21 16:24:19 CEST 2004

At 09:53 AM 4/21/2004, you wrote:
>If you can produce a one-per-line text listing of all the email addresses
>that need to be subscribed, e.g.:
>joe_smith at harvey.net.au
>carol_jones at harvey.net.au
>darryl at harvey.net.au
>[...et cetera...]
>then you could do this from a simple command line. Take a look at the
>$prefix/bin/add_members command, with options similar to these:
>$prefix/bin/add_members --regular-members-file=<file> \
>       --welcome-msg=n   --admin-notify=n   <listname>
>(Run add_members with "--help" to get a full syntax help display.)
>I haven't tested this on my system, but according to the documentation this
>should subscribe the people listed in the file, with no confirmation messages.
>Try it on a short list of just a couple of users first, to make sure it
>behaves as you wish it to.

It's possible to write a perl script to parse an email and run 
add_members... then set up an account on the server that is allowed to run 
the script under sudo with no password... then have his .forward file 
contain the line "| sudo scriptname".  Honestly it sounds like a hackish 
way of doing it, but it could work.  The line you add using the "visudo" 
command would look something like this:

<username>      ALL=NOPASSWD: /absolute/path/to/script

Just a thought.  If you're better with python or shell scripting, it 
doesn't *have* to be a perl script.

That setup would allow for adding via email without allowing a root ssh 
shell to your list administrator.  The script could also be modified to 
remove members as well, but it would change the format of the input to 
something like this (if you're good, you could add several users and remove 
users in the same email):

add <usertoadd>
add <usertoadd>
remove <usertoremove>
remove <usertoremove>

Tim Faircloth, System Administrator
Office: (229) 931-5076	Beeper: (229) 928-1458

More information about the Mailman-Users mailing list