Spamassassin relay country & Can't locate loadable object for module Geo::IP
Hello.
I've enabled loadplugin Mail::SpamAssassin::Plugin::RelayCountry and have the following in a custom.cf file
I ran /usr/local/cpanel/3rdparty/bin/spamassassin --lint and the following warning came up: warn: Use of uninitialized value $hasStructureInfo in numeric eq (==) at (eval 65) line 5520. Comment out Mail::SpamAssassin::Plugin::RelayCountry and the error goes away Then /usr/local/cpanel/3rdparty/bin/spamassassin --lint -D in debug mode and this is an excerpt:
Above *appears* to suggest chocks away. /scripts/restartsrv_spamd and watching the logs I see this:
Searched for Geo and get this: find /usr/local -name Geo -print ls -al /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Geo/IP.pm Anyone know what and why please: [LIST]warn: Use of uninitialized value $hasStructureInfo in numeric eq (==) at (eval 65) line 5520.
Can't locate loadable object for module Geo::IP
Oddly it appears to be triggering regardless as a message in the maillog shows:
spamd: result: RELAYCOUNTRY_GOOD
Like to remove the errors in the maillog despite it apparently working as hoped for.
Thank you.
header RELAYCOUNTRY_BAD X-Relay-Countries =~ /^(IN|CN)/
describe RELAYCOUNTRY_BAD Relayed through China or India at some point
score RELAYCOUNTRY_BAD 3.0
header RELAYCOUNTRY_GOOD X-Relay-Countries =~ /^(AU|NZ)/
describe RELAYCOUNTRY_GOOD First trusted relay is Australia or New Zealand
score RELAYCOUNTRY_GOOD -1.1
I ran /usr/local/cpanel/3rdparty/bin/spamassassin --lint and the following warning came up: warn: Use of uninitialized value $hasStructureInfo in numeric eq (==) at (eval 65) line 5520. Comment out Mail::SpamAssassin::Plugin::RelayCountry and the error goes away Then /usr/local/cpanel/3rdparty/bin/spamassassin --lint -D in debug mode and this is an excerpt:
dbg: plugin: Mail::SpamAssassin::Plugin::RelayCountry=HASH(0x41cc5a8) implements 'extract_metadata', priority 0
warn: Use of uninitialized value $hasStructureInfo in numeric eq (==) at (eval 65) line 5520.
dbg: metadata: RelayCountry: Using database: Geo::IP GEO-106FREE 20140701 Build 1 Copyright (c) 2014 MaxMind Inc All Rights Reserved
dbg: metadata: X-Relay-Countries:
dbg: check: tagrun - tag AUTHORDOMAIN is now ready, value: compiling.spamassassin.taint.org
dbg: check: tagrun - tag RELAYSTRUSTED is now ready, value:
dbg: check: tagrun - tag RELAYSUNTRUSTED is now ready, value:
dbg: check: tagrun - tag RELAYSINTERNAL is now ready, value:
dbg: check: tagrun - tag RELAYSEXTERNAL is now ready, value:
dbg: check: tagrun - tag LANGUAGES is now ready, value:
dbg: message: no encoding detected
dbg: plugin: Mail::SpamAssassin::Plugin::RelayCountry=HASH(0x41cc5a8) implements 'parsed_metadata', priority 0
dbg: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x42679f0) implements 'parsed_metadata', priority 0
dbg: plugin: Mail::SpamAssassin::Plugin::Shortcircuit=HASH(0x444dcd0) implements 'parsed_metadata', priority 0
dbg: check: tagrun - tag RELAYCOUNTRY is now ready, value: ARY:[]
Above *appears* to suggest chocks away. /scripts/restartsrv_spamd and watching the logs I see this:
Oct 30 08:16:12 andromeda spamd[582417]: Can't locate loadable object for module Geo::IP in @INC (@INC contains: /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/5.14.4/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/5.14.4 /opt/cpanel/perl5/514/site_lib/x86_64-linux-64int /opt/cpanel/perl5/514/site_lib) at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Geo/IP.pm line 42
Searched for Geo and get this: find /usr/local -name Geo -print ls -al /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Geo/IP.pm Anyone know what and why please: [LIST]
-
Hello :) Could you verify which version of cPanel is installed on this system? EX: cat /usr/local/cpanel/version
Thank you.0 -
Could you verify which version of cPanel is installed on this system
11.52.0.200 -
Hello again. Wondered if it is because one of the other modules is unavailable. Does this help? Nov 3 08:49:40.564 [171073] dbg: diag: [...] module installed: Digest::SHA1, version 2.13 Nov 3 08:49:40.564 [171073] dbg: diag: [...] module installed: HTML::Parser, version 3.71 Nov 3 08:49:40.564 [171073] dbg: diag: [...] module installed: Net::DNS, version 0.74 Nov 3 08:49:40.564 [171073] dbg: diag: [...] module installed: NetAddr::IP, version 4.072 Nov 3 08:49:40.564 [171073] dbg: diag: [...] module installed: Time::HiRes, version 1.9726 Nov 3 08:49:40.564 [171073] dbg: diag: [...] module installed: Archive::Tar, version 1.96 Nov 3 08:49:40.564 [171073] dbg: diag: [...] module installed: IO::Zlib, version 1.10 Nov 3 08:49:40.564 [171073] dbg: diag: [...] module installed: Digest::SHA1, version 2.13 Nov 3 08:49:40.565 [171073] dbg: diag: [...] module installed: MIME::Base64, version 3.14 Nov 3 08:49:40.565 [171073] dbg: diag: [...] module installed: DB_File, version 1.831 Nov 3 08:49:40.565 [171073] dbg: diag: [...] module installed: Net::SMTP, version 2.33 Nov 3 08:49:40.565 [171073] dbg: diag: [...] module installed: Mail::SPF, version v2.009 Nov 3 08:49:40.565 [171073] dbg: diag: [...] module installed: Geo::IP, version 1.45 Nov 3 08:49:40.565 [171073] dbg: diag: [...] module not installed: Net::CIDR::Lite ('require' failed) Nov 3 08:49:40.565 [171073] dbg: diag: [...] module installed: Razor2::Client::Agent, version 2.84 Nov 3 08:49:40.565 [171073] dbg: diag: [...] module not installed: IO::Socket::IP ('require' failed) Nov 3 08:49:40.565 [171073] dbg: diag: [...] module installed: IO::Socket::INET6, version 2.72 Nov 3 08:49:40.565 [171073] dbg: diag: [...] module installed: IO::Socket::SSL, version 1.988 Nov 3 08:49:40.565 [171073] dbg: diag: [...] module installed: Compress::Zlib, version 2.064 Nov 3 08:49:40.565 [171073] dbg: diag: [...] module installed: Mail::DKIM, version 0.4 Nov 3 08:49:40.565 [171073] dbg: diag: [...] module installed: DBI, version 1.633 Nov 3 08:49:40.565 [171073] dbg: diag: [...] module installed: Getopt::Long, version 2.42 Nov 3 08:49:40.566 [171073] dbg: diag: [...] module installed: LWP::UserAgent, version 6.05 Nov 3 08:49:40.566 [171073] dbg: diag: [...] module installed: HTTP::Date, version 6.02 Nov 3 08:49:40.566 [171073] dbg: diag: [...] module installed: Encode::Detect::Detector, version 1.01 Nov 3 08:49:40.566 [171073] dbg: diag: [...] module not installed: Net::Patricia ('require' failed) Nov 3 08:49:40.566 [171073] dbg: diag: [...] module installed: Net::DNS::Nameserver, version 11450 -
Does the issue persist if you manually install those modules? EX: cpan -i Net::CIDR::Lite
Thank you.0 -
Does the issue persist if you manually install those modules? EX:
cpan -i Net::CIDR::Lite
Thank you.
Thanks Michael. I installed it as per above command: Ran lint:/usr/local/cpanel/3rdparty/bin/spamassassin --lint Nov 10 18:17:44.443 [646057] warn: plugin: failed to parse plugin (from @INC): Can't locate Mail/SpamAssassin/Plugin/CIDRlight.pm in @INC (@INC contains: lib /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/5.14.4/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/5.14.4 /opt/cpanel/perl5/514/site_lib/x86_64-linux-64int /opt/cpanel/perl5/514/site_lib) at (eval 112) line 1. Nov 10 18:17:45.861 [646057] warn: Use of uninitialized value $hasStructureInfo in numeric eq (==) at (eval 65) line 5520.
Checked again (seems it's there but SA can't see it?)[root ~]# cpan -i Net::CIDR::Lite Loading internal null logger. Install Log::Log4perl for logging messages CPAN: Storable loaded ok (v2.20) Reading '/home/.cpan/Metadata' Database was generated on Tue, 10 Nov 2015 02:53:42 GMT CPAN: Module::CoreList loaded ok (v2.18) Net::CIDR::Lite is up to date (0.21).0 -
Are there spamassassin binaries located at /usr/local/bin/spamassassin or /usr/bin/spamassassin on this system? Thank you. 0 -
/usr/local/bin/spamassassin 0 -
Try moving it out of the way and linking it to the correct spamassassin binary. EX: mv /usr/local/bin/spamassassin /usr/local/bin/spamassassin-old ln -s /usr/local/cpanel/3rdparty/bin/spamassassin /usr/local/bin/spamassassin
Thank you.0 -
mv /usr/local/bin/spamassassin /usr/local/bin/spamassassin-old ln -s /usr/local/cpanel/3rdparty/bin/spamassassin /usr/local/bin/spamassassin
Thanks for this, I have followed your suggestion and now ls -l reports: /usr/local/bin/spamassassin -> /usr/local/cpanel/3rdparty/bin/spamassassin Lint still produces the following error though. [root@xxxx ~]# /usr/local/cpanel/3rdparty/bin/spamassassin --lint Nov 11 09:49:42.611 [1004248] warn: plugin: failed to parse plugin (from @INC): Can't locate Net/CIDR/Lite.pm in @INC (@INC contains: lib /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib /usr/local/cpanel /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/5.14.4/x86_64-linux-64int /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/5.14.4 /opt/cpanel/perl5/514/site_lib/x86_64-linux-64int /opt/cpanel/perl5/514/site_lib) at (eval 1204) line 1. Nov 11 09:49:43.438 [1004248] warn: Use of uninitialized value $hasStructureInfo in numeric eq (==) at (eval 65) line 5520. Incidentally, SA debug still insists that the following are not installed yet I installed all of them with cpan -i dbg: diag: [...] module not installed: Net::CIDR::Lite ('require' failed) dbg: diag: [...] module not installed: IO::Socket::IP ('require' failed) dbg: diag: [...] module not installed: Net::Patricia ('require' failed)0 -
Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome. Thank you. 0 -
Thanks Michael. #7382603 0 -
To update, the issue was addressed by installing the missing modules through the "/usr/local/cpanel/scripts/perlinstaller" command. EX: /usr/local/cpanel/scripts/perlinstaller CDB_File
Thank you.0 -
Indeed this resolved most of my troubles. This line however does persist which is GEO::IP related. "warn: Use of uninitialized value $hasStructureInfo in numeric eq (==) at (eval 65) line 5520." I have been given advice by one of the cpanel staff "The issue appears to be known and can be reviewed via Use of uninitialized value $hasStructureInfo in numeric eq (==) at (eval 34) line 5520 " Issue #156 " E-F-A/v3 " GitHub but this isn't something we'd be able to correct." Which leads very neatly onto my question. I note that there are several locations of this module on our CloudLinux CageFS server. [LIST] - /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Geo/IP.pm
- /usr/share/cagefs-skeleton/usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Geo/IP.pm If I were to patch this module manually as per the information provided at the GitHub URL above, which file should I edit? Possible to advise on this?
0 -
If I were to patch this module manually as per the information provided at the GitHub URL above, which file should I edit?
You could modify /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Geo/IP.pm but keep in-mind that updates will overwrite the file so you may need to create a hook that modifies the file each time cPanel updates: Guide to Standardized Hooks - Software Development Kit - cPanel Documentation The CageFS-skeleton directory is documented at: CageFS > Configuration > Mount Points Thank you.0
Please sign in to leave a comment.
Comments
14 comments