From f2f3dba74e9e3ffb429240529c9c1e4b8050cb60 Mon Sep 17 00:00:00 2001 From: ThiefMaster Date: Tue, 2 Feb 2010 14:42:42 +0100 Subject: [PATCH] Also use AUTO for mod-blacklist glines. --- src/mod-blacklist.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mod-blacklist.c b/src/mod-blacklist.c index c06ef7d..0e4b58b 100644 --- a/src/mod-blacklist.c +++ b/src/mod-blacklist.c @@ -142,8 +142,11 @@ dnsbl_hit(struct sar_request *req, struct dns_header *hdr, struct dns_rr *rr, un 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); @@ -190,6 +193,7 @@ blacklist_check_user(struct userNode *user) target[0] = '*'; target[1] = '@'; strcpy(target + 2, host); + /* 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, 1); } -- 2.20.1