Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] GeoIP failed to lookup ip 'PRIVATE_IP'

2013-01-26 by manu@...

Frantisek Hanzlik <franta@...> wrote:

> And yes, problem is only cosmetical, but these warnings fill logs
> IMO uselessly. Any of you suggested modifications will be good.

We could do this, which remove the warning and let the user match an invalid
country. Opinions?

Index: geoip.c
===================================================================
RCS file: /cvsroot/milter-greylist/geoip.c,v
retrieving revision 1.4
diff -U 4 -r1.4 geoip.c
--- geoip.c     15 Feb 2010 16:38:03 -0000      1.4
+++ geoip.c     26 Jan 2013 06:08:05 -0000
@@ -138,10 +138,9 @@
        priv->priv_ccode = GeoIP_country_code_by_addr(geoip_handle, ipstr);
        UNLOCK(geoip_lock);
 
        if (priv->priv_ccode == NULL)
-               mg_log(LOG_DEBUG, "GeoIP failed to lookup ip '%s'", ipstr);
-
+               priv->priv_ccode = "ZZ";
 
        return;
 }
 


-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.