Hi Abhilash

I am a naive to Python development, but my client was having the
requirement of sending SMS to the moderators.

We are using postgresql database . I have used psycopg2 module to fetch the
email address of the moderator from the database for the list that is
posted.(mlist_fqdnname)

>From the email address I have used ldapsearch to fetch mobile number of the
email address from ldap using subprocess module.

After receving the mobile number we are having SMS api to send the message
to the moderator to this I have imported urllib and urllib.request module
in parsing http requests.

I am not sure what I did was a right way of approach but I could able to
achieve that.

All the above piece of code was incorporated in hold.py file.

Request your valuable inputs on this approach. If there is any more better
approach your inputs are most welcome.

Regards
Sandeep

On Tue, Jul 16, 2019 at 10:34 PM Abhilash Raj <maxk...@asynchronous.in>
wrote:

>
>
> On Tue, Jul 16, 2019, at 9:56 AM, sandeep kumar wrote:
> > Thanks Abhilash for valuable inputs.
> >
> > I will come back to you if in case of any challenges.
> >
> > We have also implemented sending SMS notification along with the mail
> > notification to the moderator whenever the post is held for approval.
>
> Would be curious to see how you did this, and maybe suggest something
> in case you are using internal APIs which could break when upgrading
> to a new version.
>
> > We could able to achieve that through the inputs received from this
> > mailing list group. Thanks once again
> >
> > Regards
> > Sandeep
> >
> > Sent from my iPhone
> >
> > > On 16-Jul-2019, at 9:37 PM, Abhilash Raj <maxk...@asynchronous.in>
> wrote:
> > >
> > >> On Tue, Jul 16, 2019, at 4:12 AM, sandeep kumar wrote:
> > >> Hi Team
> > >>
> > >> We want to integrate LDAP authentication for a user to login into
> > >> postorious.
> > >>
> > >> When a user tries to login, he should be authenticated by an LDAP
> instead
> > >> of getting authenticated using the credentials saved in the mailman
> > >> database.
> > >>
> > >> What file should be edited and any small clue would be welcome.
> > >
> > > First see Django's Docs on authentication backends[1]. This[2] seems to
> > > come up as the most popular library for LDAP authentication in Django.
> > >
> > >
> > > [1]:
> https://docs.djangoproject.com/en/2.2/topics/auth/customizing/#specifying-authentication-backends
> > > [2]: https://django-auth-ldap.readthedocs.io/en/latest/
> > >
> > >
> > > You won't have to change anything in the source, only use the
> appropriate
> > > settings defined in the docs of Django-auth-ldap to integrate with
> LDAP.
> > >
> > > There might be some minor details that I am not aware of, but if you
> > > setup correct settings, other things should work okay. You *may* have
> to
> > > create your own Sign-In pages though. I am assuming you won't have a
> > > sign-up page.
> > >
> > > You'll end up making changes in `urls.py` in the mailman-suite project
> > > too, just to configure the right URLs to redirect to for
> authentication.
> > >
> > > Sorry for sparse information, but I hope this will be a good starting
> point
> > > for you. It would be awesome if you could also document this process
> > > if you succeed since there have been some requests in past about
> > > integrating with LDAP. It could help others in future :)
> > >
> > >> --
> > >> Regards
> > >> Sandeep Kumar
> > >> +91-9642669192
> > >> _______________________________________________
> > >> Mailman-Developers mailing list -- mailman-developers@python.org
> > >> To unsubscribe send an email to mailman-developers-le...@python.org
> > >> https://mail.python.org/mailman3/lists/mailman-developers.python.org/
> > >> Mailman FAQ: https://wiki.list.org/x/AgA3
> > >>
> > >> Security Policy: https://wiki.list.org/x/QIA9
> > >>
> > >
> > > --
> > >  thanks,
> > >  Abhilash Raj (maxking)
> > > _______________________________________________
> > > Mailman-Developers mailing list -- mailman-developers@python.org
> > > To unsubscribe send an email to mailman-developers-le...@python.org
> > > https://mail.python.org/mailman3/lists/mailman-developers.python.org/
> > > Mailman FAQ: https://wiki.list.org/x/AgA3
> > >
> > > Security Policy: https://wiki.list.org/x/QIA9
> >
>
> --
>   thanks,
>   Abhilash Raj (maxking)
>


-- 
Regards
Sandeep Kumar
+91-9642669192
_______________________________________________
Mailman-Developers mailing list -- mailman-developers@python.org
To unsubscribe send an email to mailman-developers-le...@python.org
https://mail.python.org/mailman3/lists/mailman-developers.python.org/
Mailman FAQ: https://wiki.list.org/x/AgA3

Security Policy: https://wiki.list.org/x/QIA9

Reply via email to