--- ucspi-tcp-0.88.patched/rblsmtpd.c   2008-09-25 09:34:34.941181000 +0200
+++ ucspi-tcp-0.88.ipv6/rblsmtpd.c      2008-09-25 10:23:46.362178499 +0200
@@ -25,6 +25,9 @@
   strerr_die1x(100,"rblsmtpd: usage: rblsmtpd [ -b ] [ -R ] [ -t timeout ] [ -r base ] [ -a base ] smtpd [ arg ... ]");
 }

+int decision = 0; /* 0 undecided, 1 accept, 2 reject, 3 bounce */
+static stralloc text; /* defined if decision is 2 or 3 */
+
 char *ip_env;
 static stralloc ip_reverse;

@@ -33,8 +36,13 @@
   unsigned int i;
   unsigned int j;

-  ip_env = env_get("TCPREMOTEIP");
-  if (!ip_env) ip_env = "";
+  if (strcmp(env_get("PROTO"), "TCP6")) {
+    ip_env = env_get("TCPREMOTEIP");
+    if (!ip_env) ip_env = "";
+  } else {
+    ip_env = "";
+    decision = 1; /* always accept IPv6 connections as there are no IPv6 DNSBLs (yet) */
+  }

   if (!stralloc_copys(&ip_reverse,"")) nomem();

@@ -53,9 +61,6 @@
 int flagfailclosed = 0;
 int flagmustnotbounce = 0;

-int decision = 0; /* 0 undecided, 1 accept, 2 reject, 3 bounce */
-static stralloc text; /* defined if decision is 2 or 3 */
-
 static stralloc tmp;

 void rbl(char *base)

