message = "client is blacklisted";
}
+ /* Prepend "AUTO " prefix so the g-lined are put in a different snomask */
+ strcpy(reason, "AUTO ");
+
/* Expand elements of the message as necessary. */
- do_expandos(reason, sizeof(reason), message, "%txt%", (txt ? txt : "(no-txt)"), "%ip%", data->client_ip, NULL);
+ do_expandos(reason + 5, sizeof(reason) - 5, message, "%txt%", (txt ? txt : "(no-txt)"), "%ip%", data->client_ip, NULL);
if (zone->debug) {
blacklist_debug("DNSBL match: [%s] %s (%s)", zone->zone, data->client_ip, reason);
target[0] = '*';
target[1] = '@';
strcpy(target + 2, data->client_ip);
- gline_add(self->name, target, zone->duration, reason, now, now, 1);
+ gline_add(self->name, target, zone->duration, reason, now, now, 0, 1);
}
}
free(txt);
target[0] = '*';
target[1] = '@';
strcpy(target + 2, host);
- gline_add(self->name, target, conf.gline_duration, reason, now, now, 1);
+ /* We do not prepend AUTO here so it can be done in the blacklist file. */
+ gline_add(self->name, target, conf.gline_duration, reason, now, now, 0, 1);
}
/* Figure out the base part of a DNS blacklist hostname. */