Koozali.org: home of the SME Server

smeserver-geoip

Offline ReetP

  • *
  • 3,731
  • +5/-0
smeserver-geoip
« on: June 14, 2018, 12:37:52 AM »
I noticed a while back that the v1 DBs from Maxmind were going EOL. No more updates so they are going to get out of date.

I decided to try and update this contrib to use the new v2 DBs.

Sometimes you wonder why you bother!!

Anyway, the long & short is I have just about persuaded it to work.

I have a cosmetic logging bug to fix, but the core code seems to work.

See this bug for details:
https://bugs.contribs.org/show_bug.cgi?id=9033

There is an rpm in my repo for testing (see the bug)

I have seen that spamassasin and esmith-proftpd depend on the old v1 DBs so I can't just remove them. I'll look at that in due course.

Please have a go at testing. VMs/non production boxes ONLY.

Comments on the bug.

I'll try and get this out PDQ.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: smeserver-geoip
« Reply #1 on: June 14, 2018, 12:43:30 AM »
P.S. note that I am no developer.

But I have hacked together some code, built an rpm, and soon enough will push it to the build server for your delectation and delight.

I have read and learned, been helped and encouraged, and I am still pretty dumb.

But I can do it.

Just shows what you can do with some perseverance.

So can you.....
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Jean-Philippe Pialasse

  • *
  • 2,761
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: smeserver-geoip
« Reply #2 on: June 14, 2018, 02:56:41 AM »
John,

You are too humble. Thank you for your effort, it thanks to few people trying and trying again that we have some new software!

Offline TerryF

  • grumpy old man
  • *
  • 1,826
  • +6/-0
Re: smeserver-geoip
« Reply #3 on: June 14, 2018, 11:08:42 AM »
Basically there,
--
qui scribit bis legit

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: smeserver-geoip
« Reply #4 on: June 19, 2018, 12:02:51 AM »
Awwww - love ya guys ;-)

OK, think I have it cracked. need to upload to buildlsys and see if I can wreck a few installations now ;-)

Thanks for all the help, especially Mr 'Tester' Terry F himself :-)
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline TerryF

  • grumpy old man
  • *
  • 1,826
  • +6/-0
Re: smeserver-geoip
« Reply #5 on: June 19, 2018, 11:20:25 AM »
OK, think I have it cracked. need to upload to buildlsys and see if I can wreck a few installations now ;-)

Anyone who want to test don't forget to include the openfusion repo, see wiki
yum --enablerepo=openfusion install perl-GeoIP2

As it stands looking the goods. As far as my setup goes cant see anything in logs that would be contradictory..

Removed previous install, updated to latest as per reetspetit repo

Will look at a formal verification when rpm makes its way to smetest or smeupdates-testing

and enough of the love :-)
--
qui scribit bis legit

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: smeserver-geoip
« Reply #6 on: June 19, 2018, 03:55:54 PM »
Should be in smetest shortly. Mirros might take a while to sync.

Openfusion repo details here:

https://wiki.contribs.org/Openfusion

The hopefully:

yum --enablerepo=openfusion,smetest install perl-GeoIP2 smeserver-geoip

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Jean-Philippe Pialasse

  • *
  • 2,761
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: smeserver-geoip
« Reply #7 on: June 19, 2018, 03:59:41 PM »
I would rather sugest:

Code: [Select]
yum  install smeserver-extrarepositories-openfusion
signal-event yum-modify
config set UnsavedChanges no

yum --enablerepo=openfusion install perl-GeoIP2

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: smeserver-geoip
« Reply #8 on: June 19, 2018, 04:44:54 PM »
I would rather sugest:

Code: [Select]
yum  install smeserver-extrarepositories-openfusion
signal-event yum-modify
config set UnsavedChanges no

yum --enablerepo=openfusion install perl-GeoIP2

Class - thanks for that. Wiki needs amending then !
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Drifting

  • ****
  • 431
  • +0/-0
Re: smeserver-geoip
« Reply #9 on: June 30, 2018, 03:21:27 PM »
Sorry to butt in.

But am I safe to try this on my little home server? On average I am getting 300-400 hits per day from Russia and North Korea. Must think my surname is Trump?

Best wishes Paul
Infamy, Infamy, they all have it in for me!

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: smeserver-geoip
« Reply #10 on: June 30, 2018, 04:03:12 PM »
Should be good. I'm running it.....

Just read the bug, and note the update rpm if you use mailstats that fixes the mail warning.

Let us know if you have any issues.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline TerryF

  • grumpy old man
  • *
  • 1,826
  • +6/-0
Re: smeserver-geoip
« Reply #11 on: June 30, 2018, 09:43:55 PM »
I've been slack :-) full verification just needs someone to confirm all is good in the areas of mail handling, testing of latest rpm did not throw up any gotchas (that I found anyway) as John said should be good, when mail behaviour is confirmed then I can finish it :-) so if you load iy up and things are all good put a comment in the bug to that effect and you will have helpwed in the verification, thanks
--
qui scribit bis legit

Offline Drifting

  • ****
  • 431
  • +0/-0
Re: smeserver-geoip
« Reply #12 on: July 26, 2018, 11:16:13 AM »
Should be good. I'm running it.....

Just read the bug, and note the update rpm if you use mailstats that fixes the mail warning.

Let us know if you have any issues.

Really sorry, but I have read through the wiki, and am confused as to the install procedure? I get the part about the perl geoip2, just not sure if I should then follow the contrib install?

Can I have a blow by blow for the dummies of this world? me that is!

Paul.
Infamy, Infamy, they all have it in for me!

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: smeserver-geoip
« Reply #13 on: July 26, 2018, 03:38:08 PM »
You will need the OpenFusion repo to pull in various items.

Code: [Select]
yum  install smeserver-extrarepositories-openfusion
signal-event yum-modify
config set UnsavedChanges no

Code: [Select]
yum --enablerepo=openfusion,smetest install perl-GeoIP2 smeserver-geoip
That should pull everything in.

Better do a post-upgrade/reboot after.

The bug for this update is here:

https://bugs.contribs.org/show_bug.cgi?id=9033

Note that if you run mail stats you will get an error thrown and need an updated file see:

https://bugs.contribs.org/show_bug.cgi?id=10523#c16

If you have my repo installed you can do (don't do update from this repo or you will suffer a lot of breakages !):

Code: [Select]
yum --enablerepo=reetp install perl-IO-Socket-INET6
Or safe just grab the file from here:

https://www.reetspetit.com/smeserver/6/repoview/perl-IO-Socket-INET6.html

Code: [Select]
wget https://www.reetspetit.com/smeserver/6/x86_64/perl-IO-Socket-INET6-2.67-1.el6.sme.art.noarch.rpm
And

Code: [Select]
yum localinstall perl-IO-Socket-INET6-2.67-1.el6.sme.art.noarch.rpm
Ask if you have questions. Report breakage to the bug please :-)
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Drifting

  • ****
  • 431
  • +0/-0
Re: smeserver-geoip
« Reply #14 on: July 29, 2018, 06:53:07 AM »
Thank you for that, all installed fine, will report back any problems.

Paul
Infamy, Infamy, they all have it in for me!