Package: qpsmtpd
Version: 0.84-8
Tags: patch

The debian version of qpsmtpd has its own modified version of the
SPF plugin, therefore this problem (which also exists in the upstream
version) needs to be fixed in debian.

The SPF plugin will hang on IPv6 clients because the code does not
handle themn correctly and will end in a endless loop.

Patch attached fixes this problem.


Regards,
Michael
diff -Naur qpsmtpd-0.84.orig/plugins/sender_permitted_from qpsmtpd-0.84/plugins/sender_permitted_from
--- qpsmtpd-0.84.orig/plugins/sender_permitted_from	2012-11-14 02:46:02.000000000 +0100
+++ qpsmtpd-0.84/plugins/sender_permitted_from	2012-11-14 02:53:23.000000000 +0100
@@ -68,7 +68,12 @@
           if exists $relay_clients{$client_ip};
         return (DECLINED, "SPF - relaying permitted")
           if exists $more_relay_clients->{$client_ip};
-        $client_ip =~ s/\d+\.?$//;    # strip off another 8 bits
+        if ( $client_ip =~ /:/ ) {
+          $client_ip =~s /[0-9a-f]+:*$//; # strip off another segment
+        }
+        else {
+          $client_ip =~ s/\d+\.?$//;      # strip off another 8 bits
+        }
     }
 
     my $scope = $from ? 'mfrom' : 'helo';

Reply via email to