[Mailman-Users] Programmatic Subscription
bergenpeak at comcast.net
bergenpeak at comcast.net
Fri May 9 22:03:03 CEST 2008
I had a similar need where someone should be able to subscribe or
unsubscribe without having
to do any sort of admin or user confirmation. I also had a need to make
it easy for a user to subscribe to 25-100 lists without having to
manually subscribe to 25-100 individual lists.
Note that there's a way to configure mailman so a user can subscribe
without confirmation but that's not true on unsubscribe. Going on
vacation and having to unsub from 100 lists and also confirm for 100
lists was too complicated and the mail admin (me) would be doing these
by hand.
I also have a closed user community so don't need to worry about
malicious sub or unsub requests.
So, here's what I did:
1) Wrote code to process all mail_list-requests. Basically, this code
replaces the work mailman does on request processing. So in
/etc/aliases, each group has an entry "maillist-request |
/blah/request-processing.pl"
2) This code extracts who the mail is from, subject, and what list the
mail was sent to and with this information calls remove_member or
add_member directly.
3) I crafted a web page with all the groups listed as a unqiue url. If
the user clicks on the link, it pre-opens a mail message with the right
target address for that group and a subject of "subscribe" or
"unsubscribe". All they need to do is hit send and the code gets
delivered to the mailman server where the code sitting behind the
"maillist-request" adds or removes the user. Folks could sub or unsub
10s of lists in a few seconds.
4) If they wanted on all lists, I created a fictitious group called
"maillist-all" which was also a url on the web page. When mail to that
alias hit the maillist-request code, it would detect the mail being sent
to maillist "all" and then do the remove_member or add_member for this
user from all individual mail lists.
I'd expect you could have the URL instead hit some cgi-bin code which
would call the add or remove user directly, but the mail approach was
fine for my needs.
Bill Honneus (honneus) wrote:
> Hi Jeff,
>
> The reason we want to do this is because we want to control the
> subscriptions to our mailing list interface through our application. We
> disable subscriptions and unsubscriptions by email, so the only way that
> users can join is through our application interface. We would only
> allow users who have signed on through the application to subscribe, so
> they would have already verified themselves.
>
> Hope this clarifies the reason.
>
> Regards,
>
> Bill
>
> -----Original Message-----
> From: Jeff Shepherd [mailto:jeffs at tolisgroup.com]
> Sent: Friday, May 09, 2008 2:58 PM
> To: Bill Honneus (honneus)
> Cc: mailman-users at python.org
> Subject: Re: [Mailman-Users] Programmatic Subscription
>
> Hi Bill,
> While I cannot provide insight on how to do this, I wonder why you would
> want to bypass the confirmation in the first place. The problem with
> bypassing that is that I can then subscribe several people to your list
> without confirming they are the ones who in-fact wanted to be
> subscribed. I could do this just to annoy people who I dislike.
>
> The purpose of the confirmation is to ensure that this doesn't happen.
> I don't think bypassing it is a very good idea.
>
> -Jeff
>
>
> Bill Honneus (honneus) wrote:
>
>> Hi,
>>
>> When a user subscribes or unsubscribes from a mailing list, they are
>> sent an email confirmation and must click a link on the web interface
>> or reply to the email to confirm their subscription/removal. One of
>> our engineers is creating a portlet on a web application, and what he
>> wants to do is allow the user to be immediately subscribed as soon as
>>
>
>
>> they click a link. Is there a way to configure Mailman so that a user
>>
>
>
>> is immediately subscribed or removed without the confirmation process?
>> Alternatively, if we were to write some custom code on our
>> application, could we simply call the subscribe cgi script, and then
>> send the confirmation request from the application without asking the
>> user for further input?
>>
>> Please let me know if this is a sound approach.
>>
>> Thanks,
>>
>> Bill
>> ------------------------------------------------------
>> 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/
>> Unsubscribe:
>> http://mail.python.org/mailman/options/mailman-users/jeffs%40tolisgrou
>> p.com
>>
>> Security Policy:
>> http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.h
>> tp
>>
>>
> ------------------------------------------------------
> 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/
> Unsubscribe: http://mail.python.org/mailman/options/mailman-users/bergenpeak%40comcast.net
>
> Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp
>
>
More information about the Mailman-Users
mailing list