Author: radu
Date: Mon Jun  2 09:48:57 2008
New Revision: 923

Modified:
   trunk/Changes
   trunk/lib/Qpsmtpd/PollServer.pm

Log:
Set connection remote_host only when the reverse DNS lookup is successful.


Modified: trunk/Changes
==============================================================================
--- trunk/Changes       (original)
+++ trunk/Changes       Mon Jun  2 09:48:57 2008
@@ -1,3 +1,6 @@
+  async: Set connection remote_host only when the reverse DNS lookup is
+  successful
+
   Create async version of dns_whitelist_soft, rhsbl and uribl plugins.
 
   async: added pre- and post-connection hooks

Modified: trunk/lib/Qpsmtpd/PollServer.pm
==============================================================================
--- trunk/lib/Qpsmtpd/PollServer.pm     (original)
+++ trunk/lib/Qpsmtpd/PollServer.pm     Mon Jun  2 09:48:57 2008
@@ -183,7 +183,7 @@
     ParaDNS->new(
         finished   => sub { $self->continue_read(); 
$self->run_hooks("connect") },
         # NB: Setting remote_info to the same as remote_host
-        callback   => sub { $conn->remote_info($conn->remote_host($_[0])) },
+        callback   => sub { $conn->remote_info($conn->remote_host($_[0])) if 
$_[0] !~ /^[A-Z]+$/ },
         host       => $ip,
     );
     

Reply via email to