On Mon, Jan 12, 2009 at 10:39 AM, Jared Johnson <jar...@nmgi.com> wrote: > Was the name 'remote_hostname' as > opposed to 'remote_host' intentional?
no. I wrote that without looking at any references at all. > As an aside, I don't really > understand why pre-connection hooks need the same information they could get > from $connection methods (like remote ip and remote host) passed to them in > the argument hash? does remote_host cache an on-demand lookup, or store the result of a lookup that happens at some particular point? Now I'm going to go see. > it does seem that DNS caching itself makes it somewhat > trivial whether or not QP attempts to cache results of DNS queries. hmm... the remote_host gets looked up as part of the lrpip method of TcpServer, unless the flag telling it not to is set, in which case a dummy arg of "[!noip]" is provided instead. Changing that to defer the lookup until needed (needed means, Qpsmtpd::connection::remote_host gets called) might mean making some fairly deep revisions, to save some calls to the resolver.