On 5/6/19 10:20 AM, Alex wrote:
> Hi all,
> 
> I'm looking for the GeoIP2 and IP Country packages for fedora/CentOS
> needed for the RelayCountry plugin. I believe there were some license
> changes recently that prevent them from being included with the latest
> distributions?
> 
> I believe they also have a ton of dependencies based on the last time
> I tried to build them on my own, including a bunch of maxmind modules.
> 
> Of course I could build them from CPAN, but would obviously prefer the
> ease of a package manager. The best approach for getting this all
> working would be greatly appreciated.
> 

I have found that it's best to do it either all RPM-based or all 
CPAN-based installs.  It's possible to do as many RPMs that exist then 
use CPAN for the rest but mixing is not fun with all of the different 
paths everything get's put into.  As RPMs get older and perl moves on, 
it makes CPAN installs look better and better.

I just went through this over the weekend.  I decided to download perl 
5.28.2 and compile it on my old CentOS 6 boxes that I don't have time to 
rebuild.  Honestly it's not as hard as I thought and now that I have 
compiled it with a prefix of '/usr/local' all I have to do is distribute 
a few directories to rsync the complete config from a master to about a 
dozen secondary SA boxes.

Now I can run 'cpan install GeoIP2' and as long as I have the proper 
devel packages on the master.  Everything is installed on the master and 
then is rsync'd to the secondaries (all running the same version of 
CentOS 6) along with the SA, postfix, opendmarc, opendkim, 
python-policyd-spf, sqlgrey, DCC, fail2ban, ClamAV Unofficial sigs, etc. 
  Then monit running on each box detects the change and reloads/restarts 
services after doing a config check first for that component (postfix, 
clamd, MailScanner, etc.).

FYI, I am doing my GeoIP2 updates monthly from my master and rsync'ing 
the /usr/share/GeoIP out.  Same for ClamAV Unofficial signatures, 
KAM.cf, and SA rule updates.

Dirs:
/usr/local/lib/perl5
/usr/local/lib/perl5/site_perl
/usr/local/share/man
/usr/share/spamassassin  (needed for the TextRep.pm defaults)
/root/.cpan

Then the standard SA dirs:
/var/lib/spamassassin
/etc/mail/spamassassin

Plus any others you need to throw in for add-ons.
/usr/share/GeoIP
/var/clamav
/var/dcc/whiteclnt


1. Make a backup of /etc/mail/spamassassin.
2. Stop any daemons are using spamassasssin.
3. Uninstall the spamassassin RPM if it's installed.
4. Download the perl tgz, extract, and compile it
     ./Configure -des -Dprefix=/usr/local
5. cpan install CPAN
6. cpan install all other modules including Mail::SpamAssassin
7. I copied the following files into /usr/bin from /usr/local/bin to 
overwrite the original distro location.  CentOS 7 will be /bin but it's 
symlinked to /usr/bin so it's essentially the same.

perl
perldoc
cpan
spamassassin
spamd
spamc

I tried symlinks first but some apps didn't like it.  I could have tried 
a hard link but I didn't as they can be confusing and bite you later.

-- 
David Jones

Reply via email to