added remote_port, local_ip, local_port, and local_host to $qp->connection, as 
the p0f plugin relies on it.
---
 lib/Qpsmtpd/TcpServer.pm |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/lib/Qpsmtpd/TcpServer.pm b/lib/Qpsmtpd/TcpServer.pm
index e2f380f..964b9db 100644
--- a/lib/Qpsmtpd/TcpServer.pm
+++ b/lib/Qpsmtpd/TcpServer.pm
@@ -33,7 +33,10 @@ my $first_0;
 sub start_connection {
     my $self = shift;
 
-    my ($remote_host, $remote_info, $remote_ip);
+    my (
+        $remote_host, $remote_ip, $remote_port, $remote_info,
+        $local_host,  $local_ip,  $local_port
+       );
 
     if ($ENV{TCPREMOTEIP}) {
 
@@ -45,6 +48,10 @@ sub start_connection {
           $ENV{TCPREMOTEINFO}
           ? "$env{tcpremoteinf...@$remote_host"
           : $remote_host;
+        $remote_port = $ENV{TCPREMOTEPORT};
+        $local_ip    = $ENV{TCPLOCALIP};
+        $local_port  = $ENV{TCPLOCALPORT};
+        $local_host  = $ENV{TCPLOCALHOST};
     }
     else {
 
@@ -74,6 +81,10 @@ sub start_connection {
                                     remote_info => $remote_info,
                                     remote_ip   => $remote_ip,
                                     remote_host => $remote_host,
+                                    remote_port => $remote_port,
+                                    local_ip    => $local_ip,
+                                    local_port  => $local_port,
+                                    local_host  => $local_host,
                                     @_
                                    );
 }
-- 
1.7.0.6

Reply via email to