RFC: IP address binding
2004-07-01 by Cyril Guibourg
Dear All, Following Boris Losev question I started to work on the code that would add specific mxsync address binding feature to milter-greylist. The first (lame ;) approach was to add a -i argument. It was widthdrawn upon Emmanuel suggestion to use the configuration file for this. I wrote code adding to keywords in the configuration file in order to let the administrator choose the binding interface and the port to listen on: syncaddr <ipaddr> syncport <number> The code dealing with sockets use getaddrinfo() when available and thus would be IPv6 compliant if I manage to tell conf_yacc.y & conf_lex.l how to deal with IPv6 addr. Well, what it is all about ? Emmanuel & myself are wondering what is the best syntax for such feature knowing that there are some drawbacks. Note that at this time the parser doesn't know anything about IPv6 addresses yet, although this is not a big deal to make milter-greylist mx sync feature IPv6 compliant. What we have in mind ipaddr:= '*' | ipaddr4 | ipaddr6 port := number 1) syncaddr:= "syncaddr" ipaddr syncport:= "syncport" port This is the current code but we'd rather prefer a single line statement. 2) mxsync:ipaddr | :port | ipaddr:port This one is interesting but may add complexity to the parser when dealing with IPv6 addresses: May confuse users too. 3) mxsync:ipaddr | #port | ipaddr#port This one is more common but there is a potential issue with the current grammar when considering comments. One would review the grammar and forbid comments after statements on the same line. 4) mxsync:ipaddr | .port | ipaddr.port This last one is a tentative to circumvent the issues foreseen with the two previous ones but, imho it is somewhat confusing when associated with IPv4 adresses. I would like to get comments from users about the above so that we can discuss the pros and the cons of each syntax. Of course, if someone has a genius idea to propose I would be glad to see this shared here. :-) Thanks in advance for your inputs.