[Mailman-Developers] mailman and voting

Barry A. Warsaw barry@python.org
Sat Nov 16 15:15:30 2002

>>>>> "MD" == Marilyn Davis <marilyn@deliberate.com> writes:

    MD> Thank you Barry.  I'm so glad you find it interesting.

    MD> A copy of the article that they are (finally) going to publish
    MD> (maybe) is at
    MD> http://www.deliberate.com/eVote/papers/ljarticle.html.  You
    MD> can see that it talks about "majordomo" and I am to
    MD> search-and-replace with "mailman" and make it work.

Cool.  I've only just skimmed the article, but it looks interesting.
I think MM2.1 might provide a very nice platform for eVote.  For
example, MM2.1 supports virtual lists, so you could do something like,
set up one or a small number of voting lists, and manipulate the
recipients via the Mailman/Post.py interface.

    MD> I do have a question.  To milk mailman for password
    MD> verification and the list of addresses, I fork and exec to
    MD> withlist, attaching withlist's stdout to eVote's stdin to
    MD> collect my answers. (eVote is written in C.)  But withlist
    MD> also writes to stderr - when there is no error.  Might the
    MD> mailman authors consider only writing to stderr when there's
    MD> an error?

I'm thinking that withlist might be a hammer when you need a
screwdriver.  Remember that there really isn't anything special about
withlist -- it just imports a few Python modules and manipulates those
modules.  So there's certainly nothing stopping you from writing a
script that is much more appropriate for your task.
    MD> It would be easier for me.  Or maybe you folks can
    MD> provide an argument to withlist that suppresses the stderr
    MD> messages that aren't errors. (I haven't figured out how to
    MD> direct both streams into my stdin within my C code.)

I can think of a couple of approaches.  If eVote has an RPC mechanism,
it's likely there either exists or you could easily write, a Python
interface to that RPC, and have eVote and Mailman communicate over
that link.  Or you might consider embedding Python in the C code for
eVote, and then it would be trivial for eVote to directly import and
call Mailman code.

    MD> Another thought I'm having is that it would be nifty to carry
    MD> eVote through to the web interface.  Maybe we can do that one
    MD> day.

    MD> For exim, because mailman is turned-on in the configuration
    MD> file rather than on a list-by-list basis, eVote comes to all
    MD> the lists or none.  Is this a bad thing?  Should the admin be
    MD> allowed to toggle it on her configuration page?

It's not a bad thing, but you could certainly add some smarts to
Mailman to configure that per-list.  For example, you could write a
small handler module (e.g. Mailman/Handlers/Acknowledge.py) that hands
the message off to eVote.  It would be easy to write a little gui glue
for your new handler too.  See examples in Mailman/Gui/*.py

Or you could add new email commands, and set Mailman up so that only
certain lists respond to those commands.  The commands could be as
simple as just handing the message off to eVote.  See examples in

    MD> I'm feeling very good about this project.  Thank you so much
    MD> for your support.

No problem.  It should work out well, and because Python is so
malleable and interfaces nicely with C programs, I think you can have
a much tighter integration between the two systems, if you want.


More information about the Mailman-Developers mailing list