Help to setup a Unix socket based authentication server for dovecot in Python
Hi,
I am building a custom server platform in which dovecot is used for imap/pop . But the default authentication mechanism is not suitable for me becuase each domain will have different system users and different location for mail storage . So I need to create a custom authentication mechanism using python . There is an option to use Key-value authentication (dict) database via socket as per
https://doc.dovecot.org/configuration_manual/authentication/dict/#complete-e...
The above documentation link have a sample perl script too to send authentication to
uri = proxy:/var/run/auth_proxy_dovecot/socket:somewhere
So my question is how the inputs are send to the socket file ? in which format ?
How the result return ? and in which format ?
Let us say I can create a python socket program that can listen to /var/run/auth_proxy_dovecot/socket for getting the inputs from dovecot , but what is the format
Is it like the following
AUTH PLAIN
USER test@myemail.com
PASS mypassword
I looked into the documentation and developer documentation, I am unable to see how dovecot send the data , I can see a sample perl for answering dict lookups. Any one have a python alternative for it. ?
-- *Sherin Abdulkhareem* Chairman & Managing Director
email Email sherin@sherin.in <mailto:sherin@sherin.in>
mobile Mobile (+91)9496533234
office Office (+91)4716007799
*Syslint Technologies India Private Limited* First Floor,Asiatic Business Center Kazhakkootam, Trivandrum PIN-695582 India
Facebook <https://facebook.com/sherin.co.in> LinkedIn <https://linkedin.com/in/sherina> Google+ <https://plus.google.com/+sherinAbdulkhareem>
sherin.in <http://sherin.in>
On 08-13-2021 8:19 am, Sherin A wrote: the default authentication mechanism is not suitable for me becuase each domain will have different system users and different location for mail storage . So I need to create a custom authentication mechanism using python . There is an option to use Key-value authentication (dict) database via socket as per
Or another option... Using SQL would allow you to have key-value, you can have different mail location per domain / user, and dovecot can talk to SQL over TCP or unix:socket. You wouldn't need to make a script, and when users are stored in SQL (if you are using postfix) postfix can talk to that same SQL table to know which users are valid for accepting email.
participants (2)
-
dovecot@ptld.com
-
Sherin A