pythonpython-3.xperldovecot

Creating a Unix socket based authentication server for dovecot in Python


I am in the process of building a custom authentication for email accounts. The imap/pop3 server is dovecot. The dovecout have an easy option to use Key-value authentication (dict) database via socket. The have the documentation and perl socket server example in https://doc.dovecot.org/configuration_manual/authentication/dict/

I need a socket server in python to enable authentication via socket url

uri = proxy:/var/run/auth_proxy_dovecot/socket:somewhere

What inputs are need to send the socket? What is the format of the input ? What are the output format expected ?

I was unable to find any such developer documentations regarding it . The only documentation they say is it use the protocol https://github.com/dovecot/core/blob/master/src/lib-dict/dict-client.h

I understand it is a simple script , but if some one wrote such python script or socket program , it will be good to know where to find those documentations.


Solution

  • I wrote a python server using the socketserver class To read data from the socket and process it.