On 4/15/2011 5:36 PM, WJCarpenter wrote:
I want to call dovecot's exported authentication from a Java application. Java doesn't natively know how to talk to a Unix domain socket, so there are inconveniences. There are 3rd party JNI libraries to allow Java to do it, but I'm not too wild about the idea of using JNI. My current thinking is to rig up some kind of proxy/shuttle arrangement between a localhost TCP port and the dovecot auth Unix domain socket in the filesystem. I'm looking at using the more or less standard tool "socat" to do that. ('m on a mainstream Linux distribution.)
BTW, one workaround I thought of this situation was to connect to the POP3 port and do a normal POP3 login there. That would be pretty easy, but it doesn't happen to work out for me. My SQL-based login config factors in the service name provided by dovecot, and some of the Java app users might not be authorized for POP3 and/or IMAP4. If I could figure out a way to run a second POP3 daemon with a different service name, that would probably work for me (but I don't see a way to do it ... at least with dovecot 1.1.11 ... some some later dovecot version allow that?)