Jason Woods:
> Hi,
> 
> I'm wanting to get some unix socket support on my mail server for
> the same protocol used by the TCP table. I can see patches for
> this were submitted before but had some issues with usability and
> namespace:
> http://comments.gmane.org/gmane.mail.postfix.user/222895
> 
> Has any thought been put into this? I'm guessing there may not be
> much demand for it so may be not but I want to check.

Why not use socketmaps? These already support "inet" and "unix"
domain sockets, and they use (length, value) netstrings which require
no encoding of special characters. There are netstring implementations
for many languages, so availability should not be a problem.

The following is from Postfix internal documentation. Unfortunately I did
not find time to make this available as a socketmap_table(5) manpage.

[begin quote]

       Postfix  socketmap names have the form inet:host:port:socketmap-name or
       unix:pathname:socketmap-name, where socketmap-name specifies the  sock-
       etmap name that the socketmap server uses.

PROTOCOL
       The  socketmap class implements a simple protocol: the client sends one
       request, and the server sends one reply.

ENCODING
       Each request and reply are sent as one netstring object.

REQUEST FORMAT
       <mapname> <space> <key>
              Search the specified socketmap under the specified key.

REPLY FORMAT
       Replies must be no longer than 100000  characters  (not  including  the
       netstring encapsulation), and must have the following form:

       OK <space> <data>
              The requested data was found.

       NOTFOUND <space>
              The requested data was not found.

       TEMP <space> <reason>

       TIMEOUT <space> <reason>

       PERM <space> <reason>
              The  request  failed.  The  reason, if non-empty, is descriptive
              text.

[End quote]

tcp_table(5) is not really something that I am proud of.

        Wietse

Reply via email to