diff src/dnsbl.cpp @ 290:bb69fdc3acaa

Unique ip connection limits only apply to authenticated connections
author Carl Byington <carl@five-ten-sg.com>
date Fri, 21 Mar 2014 13:55:46 -0700
parents 9bd5388bf469
children 9f0d9fcb58dd
line wrap: on
line diff
--- a/src/dnsbl.cpp	Fri Mar 21 12:36:52 2014 -0700
+++ b/src/dnsbl.cpp	Fri Mar 21 13:55:46 2014 -0700
@@ -1203,15 +1203,14 @@
     if (dccifd_port) {
         priv.dccifd = new DccInterface(dccifd_port, &priv, priv.ip, priv.helo, priv.mailaddr);
     }
-    const char *uid = (priv.authenticated) ? priv.authenticated : priv.mailaddr;
-    if (priv.authenticated || dc.default_context->is_unauthenticated_limited(priv.mailaddr)) {
+    if (priv.authenticated) {
         int hourly, daily;
-        add_auth_address(uid, hourly, daily, priv.ip);
-        int h_limit = dc.default_context->find_address_limit(uid);
+        add_auth_address(priv.authenticated, hourly, daily, priv.ip);
+        int h_limit = dc.default_context->find_address_limit(priv.authenticated);
         int d_limit = dc.default_context->get_daily_address_multiple() * h_limit;
         if (debug_syslog > 1) {
             char msg[maxlen];
-            snprintf(msg, sizeof(msg), "connect for %s (%d %d addresses, %d %d limits)", uid, hourly, daily, h_limit, d_limit);
+            snprintf(msg, sizeof(msg), "connect for %s (%d %d addresses, %d %d limits)", priv.authenticated, hourly, daily, h_limit, d_limit);
             my_syslog(&priv, msg);
         }
         if ((hourly > h_limit) || (daily > d_limit)){