Mailing List Archive

Warnings when enabling URILocalBL plugin
I'm getting warnings when enabling Mail::SpamAssassin::Plugin::URILocalBL:

warn: Use of uninitialized value in subroutine entry at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/RelayCountry.pm line 219.
warn: plugin: eval failed: Can't use string ("") as a subroutine ref while "strict refs" in use at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/RelayCountry.pm line 219.
warn: Use of uninitialized value $countries in split at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/RelayCountry.pm line 274.

I have these GeoIP packages installed:

GeoIP-1.6.5-1.el6.x86_64
GeoIP-devel-1.6.5-1.el6.x86_64
GeoIP-GeoLite-data-2018.04-1.el6.noarch
GeoIP-GeoLite-data-extra-2018.04-1.el6.noarch
geoipupdate-2.2.1-2.el6.x86_64
perl-Geo-IP-1.38-1.el6.rf.x86_64
perl-Geo-IPfree-0.8-1.el6.rf.noarch

Anything missing?

Quinn
Re: Warnings when enabling URILocalBL plugin [ In reply to ]
On 11/8/18 1:18 AM, Quinn Comendant wrote:
> I'm getting warnings when enabling Mail::SpamAssassin::Plugin::URILocalBL:
>
> warn: Use of uninitialized value in subroutine entry at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/RelayCountry.pm line 219.
> warn: plugin: eval failed: Can't use string ("") as a subroutine ref while "strict refs" in use at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/RelayCountry.pm line 219.
> warn: Use of uninitialized value $countries in split at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/RelayCountry.pm line 274.
>
> I have these GeoIP packages installed:
>
> GeoIP-1.6.5-1.el6.x86_64
> GeoIP-devel-1.6.5-1.el6.x86_64
> GeoIP-GeoLite-data-2018.04-1.el6.noarch
> GeoIP-GeoLite-data-extra-2018.04-1.el6.noarch
> geoipupdate-2.2.1-2.el6.x86_64
> perl-Geo-IP-1.38-1.el6.rf.x86_64
> perl-Geo-IPfree-0.8-1.el6.rf.noarch
>
> Anything missing?
>
> Quinn
>
Try running with spamassassin -D and post the results, it will give us some more info.
Thanks & Cheers
Giovanni
Re: Warnings when enabling URILocalBL plugin [ In reply to ]
What are your config entries for the Geo Modules? What version of SA?
--
Kevin A. McGrail
VP Fundraising, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171


On Thu, Nov 8, 2018 at 2:05 AM Quinn Comendant <quinn@strangecode.com>
wrote:

> I'm getting warnings when enabling Mail::SpamAssassin::Plugin::URILocalBL:
>
> warn: Use of uninitialized value in subroutine entry at
> /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/RelayCountry.pm line
> 219.
> warn: plugin: eval failed: Can't use string ("") as a subroutine ref while
> "strict refs" in use at
> /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/RelayCountry.pm line
> 219.
> warn: Use of uninitialized value $countries in split at
> /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/RelayCountry.pm line
> 274.
>
> I have these GeoIP packages installed:
>
> GeoIP-1.6.5-1.el6.x86_64
> GeoIP-devel-1.6.5-1.el6.x86_64
> GeoIP-GeoLite-data-2018.04-1.el6.noarch
> GeoIP-GeoLite-data-extra-2018.04-1.el6.noarch
> geoipupdate-2.2.1-2.el6.x86_64
> perl-Geo-IP-1.38-1.el6.rf.x86_64
> perl-Geo-IPfree-0.8-1.el6.rf.noarch
>
> Anything missing?
>
> Quinn
>
Re: Warnings when enabling URILocalBL plugin [ In reply to ]
So, these warnings may be unrelated to URILocalBL: I disabled that plugin and the errors are still appearing.

I forgot to mention that I also upgraded from SA v3.3.2 to v3.4.2 at the same time. Soooo, there's that. The only change to my /etc/mail/spamassassin/ files were the addition of the v340.pre, v341.pre, and v342.pre files; I removed these and the warning still comes.

There were some changes to the code resolving GeoIP DBs in 3.4.0, which might be the cause. The 'country_db_type' and 'country_db_path' options were introduced. I've tried setting these, but it didn't help:

country_db_type GeoIP
country_db_path /usr/share/GeoIP/GeoLiteCountry.dat

My setup, briefly: running SA on CentOS 6 via spamdyke ? qmail-smtpd ? simscan ? spamc ? spamd, which is executed like:

exec /usr/bin/spamd -q -x -u vpopmail -s stderr -P -m 20 --min-spare=2 --max-spare=5 --max-conn-per-child=200 --timeout-child=40 --timeout-tcp=40

Here is the output from `spamassassin -D --lint`:
https://pastebin.com/raw/Zr7umPQv

The only GeoIP config I can find is in /etc/GeoIP.conf:

UserId 999999
LicenseKey 000000000000
ProductIds 506 517 533

Again, my GeoIP versions are pretty old:

GeoIP-1.6.5-1.el6.x86_64
GeoIP-devel-1.6.5-1.el6.x86_64
GeoIP-GeoLite-data-2018.04-1.el6.noarch
GeoIP-GeoLite-data-extra-2018.04-1.el6.noarch
geoipupdate-2.2.1-2.el6.x86_64
perl-Geo-IP-1.38-1.el6.rf.x86_64
perl-Geo-IPfree-0.8-1.el6.rf.noarch

Thanks all,

Quinn
Re: Warnings when enabling URILocalBL plugin [ In reply to ]
There are a lot of changes to GeoIP having to do with the database behind
it being deprecated. I think you might have to look at all the GeoIP stuff
and would appreciate your feedback. Bill, do you remember who was working
on all the GeoIP stuff?
--
Kevin A. McGrail
VP Fundraising, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171


On Thu, Nov 8, 2018 at 2:43 PM <quinn@strangecode.com> wrote:

> So, these warnings may be unrelated to URILocalBL: I disabled that plugin
> and the errors are still appearing.
>
> I forgot to mention that I also upgraded from SA v3.3.2 to v3.4.2 at the
> same time. Soooo, there's that. The only change to my
> /etc/mail/spamassassin/ files were the addition of the v340.pre, v341.pre,
> and v342.pre files; I removed these and the warning still comes.
>
> There were some changes to the code resolving GeoIP DBs in 3.4.0, which
> might be the cause. The 'country_db_type' and 'country_db_path' options
> were introduced. I've tried setting these, but it didn't help:
>
> country_db_type GeoIP
> country_db_path /usr/share/GeoIP/GeoLiteCountry.dat
>
> My setup, briefly: running SA on CentOS 6 via spamdyke ? qmail-smtpd ?
> simscan ? spamc ? spamd, which is executed like:
>
> exec /usr/bin/spamd -q -x -u vpopmail -s stderr -P -m 20
> --min-spare=2 --max-spare=5 --max-conn-per-child=200 --timeout-child=40
> --timeout-tcp=40
>
> Here is the output from `spamassassin -D --lint`:
> https://pastebin.com/raw/Zr7umPQv
>
> The only GeoIP config I can find is in /etc/GeoIP.conf:
>
> UserId 999999
> LicenseKey 000000000000
> ProductIds 506 517 533
>
> Again, my GeoIP versions are pretty old:
>
> GeoIP-1.6.5-1.el6.x86_64
> GeoIP-devel-1.6.5-1.el6.x86_64
> GeoIP-GeoLite-data-2018.04-1.el6.noarch
> GeoIP-GeoLite-data-extra-2018.04-1.el6.noarch
> geoipupdate-2.2.1-2.el6.x86_64
> perl-Geo-IP-1.38-1.el6.rf.x86_64
> perl-Geo-IPfree-0.8-1.el6.rf.noarch
>
> Thanks all,
>
> Quinn
Re: Warnings when enabling URILocalBL plugin [ In reply to ]
On 8 Nov 2018, at 17:26, Kevin A. McGrail wrote:

> There are a lot of changes to GeoIP having to do with the database behind
> it being deprecated. I think you might have to look at all the GeoIP stuff
> and would appreciate your feedback. Bill, do you remember who was working
> on all the GeoIP stuff?

Giovanni mostly.


--
Bill Cole
bill@scconsult.com or billcole@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Available For Hire: https://linkedin.com/in/billcole
Re: Warnings when enabling URILocalBL plugin [ In reply to ]
On Thu, Nov 08, 2018 at 01:43:15PM -0600, quinn@strangecode.com wrote:
> So, these warnings may be unrelated to URILocalBL: I disabled that plugin and the errors are still appearing.
>
...
> Here is the output from `spamassassin -D --lint`:
> https://pastebin.com/raw/Zr7umPQv
>
> perl-Geo-IP-1.38-1.el6.rf.x86_64
>
it's a bug in RelayCountry.pm that can be triggered only if GeoIP is < 1.39 (without ipv6 support).
It'is fixed in current tree and will be released with 3.4.3.

If you can use country_db_type = Fast/DB_File/GeoIP2 it will work.
I think that only IP-Country-Fast could be available due to the age of the distribution you are using;
IP-Contry-DB_File can be also easily build using cpan, GeoIP2 requires more modules and I do not know if it could
be compatible with other modules provided by the distribution you are using.
Cheers
Giovanni
Re: Warnings when enabling URILocalBL plugin [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 11/8/18 11:57 PM, Giovanni Bechis wrote:
> On Thu, Nov 08, 2018 at 01:43:15PM -0600, quinn@strangecode.com wrote:
>> So, these warnings may be unrelated to URILocalBL: I disabled that plugin and the errors are still appearing.
>>
> ...
>> Here is the output from `spamassassin -D --lint`:
>> https://pastebin.com/raw/Zr7umPQv
>>
>> perl-Geo-IP-1.38-1.el6.rf.x86_64
>>
> it's a bug in RelayCountry.pm that can be triggered only if GeoIP is < 1.39 (without ipv6 support).
> It'is fixed in current tree and will be released with 3.4.3.
>
> If you can use country_db_type = Fast/DB_File/GeoIP2 it will work.
> I think that only IP-Country-Fast could be available due to the age of the distribution you are using;
> IP-Contry-DB_File can be also easily build using cpan, GeoIP2 requires more modules and I do not know if it could
> be compatible with other modules provided by the distribution you are using.
> Cheers
> Giovanni
>
For the records, from a private email from the original submitter:
- -------------------------------------------------------------------------------
I switched to IP-Country-Fast and the errors stopped:

country_db_type Fast
country_db_path /usr/share/perl5/vendor_perl/IP/Country/Fast
- -------------------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEqg3TnG6R3qYMxl94+r7qCYlyWOUFAlvlOi4ACgkQ+r7qCYly
WOX2GxAAitfdziWp/NgBDzk5oVXM163INmHCjWeCCy7+sHVtJc8OBjh5Z9qRflM3
1csMcqpXV2AlrI4lFWnzkwIvRNvhxairgDm73G6I3RbujqP/8F7loKTESOgSFEHJ
eLoETi9Tskn0Xzrz9O+zcRa7EI5+jS0YnRLY8SJPJjZY5ioNjPT3Mp6JBp3pV8tE
XVrf8/ta4Ebi3mKCvbnZjxo12L7dZhuWZzQKbspITAHW2tXDtAh+Ff10AJiBl2vg
6KgYmyHHuOJ421k7xsoexzL8qkKtGVKX0KcLsAV42V8twZEIIiZLQ0zmj6bo3BRz
2igzeCQoH2QEY+zMJ5XU+0UPIZvuQI5rHOHTaiR6blidVvbbDVLA4ZyOjZrXy60R
Yaz8GiN9ACUcXo8uoF/UC+FTOQDnZGCze+lVF1/PxooVzi+GQIFeQpSap98lf1lu
27r7IYvjSYxDlUOnBpxJQJwpktxGtG/xs3wVdz2rXFz21wQvNz35yKQeM0Nc/lgG
bPKgxXCaXb3jGTD6p4/8m/ngjRB1sjhV/mpPROJRMUzuhVqpd+Z5HLdQHNFsf8zr
r8DABpRr6JoxU2gb/Im5KIEQFEXUCElPHmRDIHlMjkdONYmWt2863RyIgrl/Bl+M
sHqnEMgqjqJipD+jbJvOVQeCL1g9ZpF2N0y7G0LjSiCWTEJsiZc=
=dfy6
-----END PGP SIGNATURE-----