[exim] using 'socat' to connect Exim authenticator to /remot…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: snowcrash+exim-users
Dátum:  
Címzett: exim-users
Tárgy: [exim] using 'socat' to connect Exim authenticator to /remote/ UNIX socket. doable?
hi,

i've been running Exim & Dovecot together on the same box, where
Exim's been sharing Dovecot/SASL auth info over a local unix socket.
works great.

i've now split Exim & Dovecot onto two different boxes.

iiuc, Dovecot ONLY provides a UNIX (local) socket; *not* a TCP socket
for Exim to access over-the-network access. I know options include:

(a) mount the Dovecot socket's volume over NFS
(b) use a different auth method

but, i THINK i've stumbled on another option -- "socat".

i've just discovered,

    socat - Multipurpose relay
    http://www.dest-unreach.org/socat/


    "Socat is a command line based utility that establishes two
bidirectional byte streams and transfers data between them. Because
the streams can be constructed from a large set of different types of
data sinks and sources (see address types), and because lots of
address options may be applied to the streams, socat can be used for
many different purposes. It might be one of the tools that one `has
already needed'."


which, iiuc (?), can bidirectionally bridge the Dovecot unix-socket to
a TCP socket that Exim can talk/listen to.

reading further, "address types"
(http://www.dest-unreach.org/socat/doc/socat.html#ADDRESS_TYPES) seem
to include BOTH unix & tcp sockets ...

i've been trying to get this up-n-running ...

on the Dovecot box, i've cobbled-up & exec'd,

socat -d -d -lmlocal2
TCP4-LISN:1812,bind=10.0.0.101,su=nobody,fork,range=10.0.0.100/32,reuseaddr
UNIX-CONNECT:/var/run/dovecot/auth_master &

but, so far no luck ...

b4/as i continue to troubleshoot, i thought i'd check here --

HAS anyone tried/done this with socat?

IS there a reason that this can't work?

insights/suggestions are appreciated ...

(in the meantime, back to figuring this out ...)

thanks!