Milter-greylist: GeoIP is not available

Hello Team,

Today, came across with the mail log below that says:
milter-greylist: GeoIP is not available

I tried to search in the Virtualmin Search box, however, I do not see any related settings that I can correct the said error message.

So far, I came across to the thread below, https://virtualmin.com/node/40631

sudo apachectl -M | grep geoip
geoip_module (shared)

However, I can still see the same message milter-greylist: GeoIP is not available on my Ubuntu 16.

Does have any have resources that I can dig in and see where to start fixing the said message.

TA

Hi, have a look at this thread.


I will copy/paste the discussion for the future reference in case link dies.

Q: GeoIP is not available

Please add a configuration option to disable GeoIP.

Fedora is packaging milter-greylist with GeoIP enabled at compile time, but
the user may not have a GeoIP account; in that case syslog gets lots of
“GeoIP is not available” messages.

A:

You don’t need a GeoIP account.
The problem is that the greylist.conf file from the RPM doesn’t have
the correct path to the installed GeoIP database

You need :

geoipdb “/usr/share/GeoIP/GeoIP.dat”

in your /etc/mail/greylist.conf file

Using the provided “geoipupdate” to get a newer database will fail
with a “Invalid UserID” message, and the correct Requires aren’t in
the GeoIP RPM to pull in the modules needed by the perl scripts
included, so they don’t work either.

You can go to the maxmind website and download a newer copy of the
database manually fairly easily.

Install the modules for the perl script -

sudo yum install perl-libwww-perl

then

sudo perl /usr/share/doc/GeoIP-1.4.3/fetch-geoipdata.pl
Fetching GeoIP.dat from http://www.maxmind.com/download/geoip/
database/GeoIP.dat.gz
GeoIP database updated. Old copy is at GeoIP.dat.20080326

or add that to your monthly cron jobs.
The free database is updated monthly.

2 Likes