weakforced and GeoIP lookups

Neil Cook neil.cook at open-xchange.com
Tue May 14 20:48:49 EEST 2019


Hi Tobi,

it should just work, but depends on the OS version.

./configure —help tells you all the configure options, including:

--with-maxminddb-includedir
                          path to maxminddb include directory [default=auto]
--with-maxminddb-libdir path to maxminddb library directory [default=auto]

Neil

> On 14 May 2019, at 17:44, Tobi via dovecot <dovecot at dovecot.org> wrote:
> 
> Hi Neil
> 
> according to yum list installed I have
> 
>> libmaxminddb-devel.x86_64             1.2.0-1.el7              @epel
> 
> but I checked the saved output from my former ./configure command and found
> 
>> checking for GEOIP... no
> 
> but even running a new autoreconf -i and ./configure after a make clean
> it still shows that GEOIP is not found.
> 
> Does the lib has to explicitly specified as argument like
> 
>> --with-maxminddb-libdir
> 
> to configure?
> 
> 
> Cheers
> 
> tobi
> Am 14.05.19 um 17:14 schrieb Neil Cook via dovecot:
>> Hi Tobi,
>> 
>> This looks like you haven’t included the libmaxmind libraries before
>> running configure. GeoIP support is only compiled in if it finds the
>> right libs.
>> 
>> This would be libmaxminddb-dev on Ubuntu for example.
>> 
>> Neil
>> 
>>>> Hi list
>>>> 
>>>> hope it's okay to ask weakforced questions here as well, but I could not
>>>> find a dedicated mailinglist for wforce.
>>>> 
>>>> I want to enable GeoIP lookups in my wforce daemon. In a first step I
>>>> installed luarocks and lua-compat53 to install mmdblua module.
>>>> Then I added
>>>> 
>>>> newGeoIP2DB("country", "/usr/local/share/GeoIP/GeoLite2-Country.mmdb")
>>>> local mygeodb = getGeoIP2DB("country")
>>>> if(mygeodb:lookupCountry(lt.remote) == 'XX')
>>>> then
>>>>   return -1, "country blocked", "country blocked", { country="XX" }
>>>> end
>>>> 
>>>> to wforce.conf and tried to restart wforce but that ends up in a
>>>> 
>>>>> Fatal Lua error: [string "chunk"]:28: attempt to call global
>>>>> 'newGeoIP2DB' (a nil value)
>>>> 
>>>> Any ideas what I could be missing here?
>>>> 
>>>> Cheers
>>>> 
>>>> tobi
>>> 
>>> 
>>> Neil Cook
>>> neil.cook at open-xchange.com <mailto:neil.cook at open-xchange.com> <mailto:neil.cook at open-xchange.com <mailto:neil.cook at open-xchange.com>>
>>> 
>>> -------------------------------------------------------------------------------------
>>> Open-Xchange AG, Rollnerstr. 14, 90408 Nuremberg, District Court
>>> Nuremberg HRB 24738
>>> Managing Board: Rafael Laguna de la Vera, Carsten Dirks, Michael
>>> Knapstein, Stephan Martin 
>>> Chairman of the Board: Richard Seibt
>>> 
>>> European Office: 
>>> Open-Xchange GmbH, Olper Huette 5f, D-57462 Olpe, Germany, District
>>> Court Siegen, HRB 8718 
>>> Managing Director: Frank Hoberg
>>> 
>>> US Office: 
>>> Open-Xchange. Inc., 530 Lytton Avenue, Palo Alto, CA 94301, USA 
>>> -------------------------------------------------------------------------------------
>>> 
>> 
>> 
>> Neil Cook
>> neil.cook at open-xchange.com <mailto:neil.cook at open-xchange.com> <mailto:neil.cook at open-xchange.com <mailto:neil.cook at open-xchange.com>>
>> 
>> -------------------------------------------------------------------------------------
>> Open-Xchange AG, Rollnerstr. 14, 90408 Nuremberg, District Court
>> Nuremberg HRB 24738
>> Managing Board: Rafael Laguna de la Vera, Carsten Dirks, Michael
>> Knapstein, Stephan Martin 
>> Chairman of the Board: Richard Seibt
>> 
>> European Office: 
>> Open-Xchange GmbH, Olper Huette 5f, D-57462 Olpe, Germany, District
>> Court Siegen, HRB 8718 
>> Managing Director: Frank Hoberg
>> 
>> US Office: 
>> Open-Xchange. Inc., 530 Lytton Avenue, Palo Alto, CA 94301, USA 
>> -------------------------------------------------------------------------------------


Neil Cook
neil.cook at open-xchange.com

-------------------------------------------------------------------------------------
Open-Xchange AG, Rollnerstr. 14, 90408 Nuremberg, District Court Nuremberg HRB 24738
Managing Board: Rafael Laguna de la Vera, Carsten Dirks, Michael Knapstein, Stephan Martin 
Chairman of the Board: Richard Seibt

European Office: 
Open-Xchange GmbH, Olper Huette 5f, D-57462 Olpe, Germany, District Court Siegen, HRB 8718 
Managing Director: Frank Hoberg

US Office: 
Open-Xchange. Inc., 530 Lytton Avenue, Palo Alto, CA 94301, USA 
-------------------------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20190514/74a0c582/attachment.html>


More information about the dovecot mailing list