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.

I'm just thinking if, namespace wise, it could use "socket". Then it could be:
socket:inet:host:port
socket:unix:pathname
socket:host:port

The last format could be allowed (and quite easily detected) so use of 
dict_tcp_open can simply be replaced with dict_socket_open, reducing code 
(tcp:host:port => socket:host:port). If absolute pathnames (start with /) are 
enforced, there would never be a conflict with this. Of course if relative 
pathnames are allowed there would be a possible conflict if somebody had a 
hostname of "unix" but I believe enforcing absolute pathnames would be safer 
and rule this out.

This would be 100% in line with "socketmap" and "lmtp" I believe. So usability 
it would be very familiar, and if "socket" is not the best keyword, we could 
use something else.

I can also see in socketmap there is use of auto_cln.h which maintains 
connections, reuses them, and re-establishes them, and already supports both 
tcp and unix sockets. Without having looked into them too deeply it looks like 
these could be utilised for the tcp table and unix socket table too? It looks 
like it could be possible to just clone the dict_socketmap_open and just 
replace the protocol areas. This would potentially mean we're not changing the 
amount of code since we'd be removing dict_tcp.[ch] and adding a potentially 
same size dict_socket.[ch]

I am really keen on helping to implement this and feedback on the above 
thoughts and ideas would be greatly appreciated. It would definitely offer a 
more secure way to do simple lookups such as the current tcp implementation 
provides.

Thanks!

Jason

Reply via email to