[Dovecot] auth unix sockets
Hi,
I'm working on "avelsieve" SqurrelMail plug-in to implement SIEVE "file" back end for dovecot.
- My be someone my explain me, how to use client auth socket to authenticate against dovecot-auth unix socket. As fas as I understood login must be sent in form "user\0\user\0password" as base64 encoded string.
pp code (I'm using socket used by postfix auth):
<?php $authstr = base64_encode('test@virtual.net\0test@virtual.net\0test'); $fp = fsockopen("unix:///var/spool/postfix/private/auth",0, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $out = "$authstr\r\n"; fwrite($fp, $out); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } ?>
Dovecot auth complains about syntax It seems 'auth mech' also is required. thus; how to correctly use dovecot client auth socket to authenticate? (some FAQ?, php sample code?)
- [most important] dovecot LDA uses auth maser sockets to read userdb and get home directory path to deliver mail and locate sieve scripts. I need some home path to locate users sieve script. Wow to obtain it using dovecot auth sockets?
Tnx
Uldis
On 12/6/06, Uldis Pakuls neko@it4u.lv wrote:
Dovecot auth complains about syntax It seems 'auth mech' also is required. thus; how to correctly use dovecot client auth socket to authenticate? (some FAQ?, php sample code?)
See doc/auth-protocol.txt
On Wed, 2006-12-06 at 17:55 +0200, Uldis Pakuls wrote:
- My be someone my explain me, how to use client auth socket to authenticate against dovecot-auth unix socket. As fas as I understood login must be sent in form "user\0\user\0password" as base64 encoded string.
Did you get this implemented already? Anyway, I'd suggest reading http://wiki.dovecot.org/Authentication_Protocol
So it's more like:
AUTH<tab>1<tab>PLAIN<tab>service=something<tab>resp=
participants (3)
-
Chris Laif
-
Timo Sirainen
-
Uldis Pakuls