[Mailman-Developers] GSOC 2015 :Mailman Client written in Javascript

Abhishek Kumar abhi170893 at gmail.com
Thu Mar 5 22:08:39 CET 2015


Hi,

Thanks Aanand and Abhilash for the help and suggestions. I need further
assistance:

I tried to  write the connection class's rough javascript code. It works if
i bypass the authentication. I have encoded/decoded the authentication data
correctly ( as seemed from printing them and what python client generates
through b64encode(auth.encode('utf-8')).decode('utf-8') ). If
authentication is allowed, the javascript client shows "401,
Unauthorized. The REST API requires authentication."
This happens because the request.auth on line 68 in
src/mailman/rest/root.py  is None (see in this
<http://bazaar.launchpad.net/~mailman-coders/mailman/3.0/view/head:/src/mailman/rest/root.py>
file)
even when i am passing the authentication data in the http header . However
there are no issues when i use the python client through shell  and
everyhing works fine. I was unable to figure out the issue. Any ideas
regarding what should i do here..? The  js code(uses some nodejs) can be
seen here <http://pastebin.com/isxPbsNk>.

Also i need some guidance on what should i do now towards applying for this
project. Should i go on writing the javascript version by discussing it
with the community..? And regarding what would go into my proposal, my
current understanding stands at  mainly writing javascript equivalent of
everything present in _client.py(mailman client) alongwith documentation
and tetsting. What more is required to be done in this project..?




On Thu, Mar 5, 2015 at 12:33 PM, Abhilash Raj <raj.abhilash1 at gmail.com>
wrote:

> Hi Abhishek,
>
> On Wednesday 04 March 2015 07:43 PM, Abhishek Kumar wrote:
> > Hi,
> >
> > I was able to setup the mailman (Core, postorius, mailman.client,
> > postorius_standalone)  by downloading them individually. Also with
> > superuser, i can create domains. I have some questions:
> >
> > 1) When i try to create list i get : HTTP Error 500: A server error
> > occurred. Please contact the administrator
>
> Try to find out what error is raised, check the logs in
> var/logs/mailman.log . This error is very common due to the absence to
> postmap command which mailman uses to create postfix maps. Either you
> can set your mta to nullmta by adding the following in yout mailman.cfg
> in var/etc/
>
> [mta]
> incoming: mailman.mta.null.NullMTA
> outgoing: mailman.mta.null.NullMTA
>
>
> or simply install postfix.
>
> > 2) Though i am able to create domain using postorius ui, i am unable to
> do
> > it by directly using the mailman.client. The development.rst doc says
> > "python manage.py mmclient" can be used for the purpose. But after doing
> > this no client object is created.  I also tried tried the way given
> > mailmanclient/docs/using.rst
> > <
> http://bazaar.launchpad.net/~mailman-coders/mailman.client/trunk/view/head:/src/mailmanclient/docs/using.rst
> >
> >  with
> > port 8001. This creates client , but that object is unable to talk to the
> > rest server.
>
> Just saying that "object is unable to talk to the rest server" doesn't
> help. Make a habit of mentioning the complete traceback from logs when
> you have errors. Do you get a `Mailman API Error`? If yes, check that
> your mailman is running. If not, start it using `mailman start` command.
>
> > 3) Is what i installed using lp:mailman the mailman core..? and this
> handles
> > the rest requests..?
>
> Yes!
>
> > 4) Is there more documentation online other than that available in the
> doc
> > folders of the projects..? I searched online but didn't get any developer
> > type documentation.
>
> No, the same documentation is available on readthedocs in a html format.
>
> > 5) If i make any changes in the code, what's the best way to make them
> > reflected in the mailman..? run "python setup.py develop" for that
> > project..?
>
> You don't need to do anything if you ran `python setup.py develop` to
> set it up first time. If you used `python setup.py install` then you
> need to run that again to reflect your changes.
>
> > On Wed, Mar 4, 2015 at 2:41 PM, Abhilash Raj <raj.abhilash1 at gmail.com>
> > wrote:
> >
> >> On Wednesday 04 March 2015 02:01 PM, Abhishek Kumar wrote:
> >>> Hi,
> >>>
> >>> Using the viurtualenv, i was able to complete the setup guide. But i am
> >>> required to login at http://localhost:8000/ and there is no option to
> >>> register. So i logged in using Mozilla persona. But even after that i
> am
> >>> not getting any options to create domains and list as described here
> >>
> >> Are you using mailman-bundler? It does not work right now! For
> >> development you'd have to download and setup each projects (Core,
> >> postorius, mailman.client, postorius_standalone) from launchpad.
> >>
> >> Also, only superuser is allowed to create domains. You can create one in
> >> django (postorius_standalone) using the command:
> >>
> >>    $ python manage.py createsuperuser
> >>
> >> Then you have to login as a superuser using the login credentials given
> >> or through persona.
> >>
> >> --
> >> thanks,
> >> Abhilash Raj
> >>
> >>
> >
> >
>
> --
> thanks,
> Abhilash Raj
>
>


-- 
Thanks,
Abhishek Kumar


More information about the Mailman-Developers mailing list