You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2018/01/30 20:12:55 UTC

[Bug 7541] New: Use of uninitialized value in lc at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/RegistryBoundaries.pm line 205

https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7541

            Bug ID: 7541
           Summary: Use of uninitialized value in lc at
                    /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Registr
                    yBoundaries.pm line 205
           Product: Spamassassin
           Version: 3.4 SVN branch
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: spamassassin
          Assignee: dev@spamassassin.apache.org
          Reporter: mysqlstudent@gmail.com
  Target Milestone: Undefined

I don't know what causes this or how to reproduce.

Jan 30 00:16:19 bwimail01 amavis[29768]: (29768-01) _WARN: Use of uninitialized
value in lc at
/usr/share/perl5/vendor_perl/Mail/SpamAssassin/RegistryBoundaries.pm line 205.
Jan 30 00:16:19 bwimail01 amavis[29768]: (29768-01) _WARN: plugin: eval failed:
Can't locate object method "trim_domain" via package "info@wyominghorses.net"
(perhaps you forgot to load "info@wyominghorses.net"?) at
/usr/share/perl5/vendor_perl/Mail/SpamAssassin/RegistryBoundaries.pm line 230.

   203  sub uri_to_domain {
   204    my $self = shift;
   205    my $uri = lc shift;
   206  

   227    # keep IPs intact
   228    if ($uri !~ /^\d+\.\d+\.\d+\.\d+$/) { 
   229      # get rid of hostname part of domain, understanding delegation
   230      $uri = $self->trim_domain($uri);
   231

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7541] Use of uninitialized value in lc at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/RegistryBoundaries.pm line 205

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7541

--- Comment #6 from Alex <my...@gmail.com> ---
The attached message produces the following warning when run through
spamassassin

$ spamassassin --version
SpamAssassin version 3.4.2-pre3-r1823175
  running on Perl version 5.24.3


Feb  9 22:25:29.872 [12981] warn: Use of uninitialized value in lc at
/usr/share/perl5/vendor_perl/Mail/SpamAssassin/RegistryBoundaries.pm line 202.
Feb  9 22:25:29.872 [12981] warn: plugin: eval failed: Can't locate object
method "trim_domain" via package "goldenlinkmotel@gmail.com" (perhaps you
forgot to loa
d "goldenlinkmotel@gmail.com"?) at
/usr/share/perl5/vendor_perl/Mail/SpamAssassin/RegistryBoundaries.pm line 227.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7541] Use of uninitialized value in lc at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/RegistryBoundaries.pm line 205

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7541

--- Comment #3 from Bill Cole <sa...@billmail.scconsult.com> ---
(In reply to Bill Cole from comment #2)
> No, see the line before: "uninitialized value in lc" means that there's no
> parameter left to 'shift' off the parameter stack. So, the uri_to_domain
> subroutine call is expecting 2 arguments but is only getting one. 

The most likely cause of that is something that SHOULD be calling:

      $object-> uri_to_domain("info@wyominghorses.net");

but is instead calling:

     uri_to_domain("info@wyominghorses.net");

either within the same package or in one that has imported the
Mail::SpamAssassin::RegistryBoundaries namespace (which would be weird.)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7541] Use of uninitialized value in lc at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/RegistryBoundaries.pm line 205

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7541

--- Comment #4 from Dave Jones <da...@apache.org> ---
Alex can you provide a sample email that causes this problem and add it as an
attachment to this bug?  You sent an example to me a couple of days ago but I
will let you properly redact a message that still reproduces this error.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7541] Use of uninitialized value in lc at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/RegistryBoundaries.pm line 205

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7541

--- Comment #9 from Alex <my...@gmail.com> ---
That was it, thanks very much. It's the result of the Fromnamespoof.pm plugin,
developed by Paul Stead, that I recently started using. I should have thought
to narrow down the custom changes I've made to diagnose this.

I'll contact him offline.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7541] Use of uninitialized value in lc at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/RegistryBoundaries.pm line 205

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7541

Dave Jones <da...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |davej@apache.org

--- Comment #1 from Dave Jones <da...@apache.org> ---
I am still a novice at perl but this seems like the uri variable is not
expecting an email address with an @ sign?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7541] Use of uninitialized value in lc at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/RegistryBoundaries.pm line 205

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7541

Alex <my...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mysqlstudent@gmail.com

--- Comment #5 from Alex <my...@gmail.com> ---
Created attachment 5528
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5528&action=edit
Can't locate object method "trim_domain"

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7541] Use of uninitialized value in lc at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/RegistryBoundaries.pm line 205

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7541

--- Comment #8 from Bill Cole <sa...@billmail.scconsult.com> ---
(In reply to Bill Cole from comment #7)
>My initial suspicion was a 

Completing that thought:

My initial suspicion was line 563 in the DKIM.pm plugin, where uri_to_domain is
called with another function call as its argument, which MIGHT result in a call
oddity. It looks like that's not it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7541] Use of uninitialized value in lc at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/RegistryBoundaries.pm line 205

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7541

Bill Cole <sa...@billmail.scconsult.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #10 from Bill Cole <sa...@billmail.scconsult.com> ---
Error was caused by a 3rd-party plugin.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7541] Use of uninitialized value in lc at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/RegistryBoundaries.pm line 205

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7541

--- Comment #7 from Bill Cole <sa...@billmail.scconsult.com> ---
I tried to duplicate the problem using the same 3.4.2 revision and Perl version
and could not. 

The fact that the failure message includes 'plugin:' means that this happened
inside a plugin, making it likely that this is coming from some plugin that you
have enabled which I do not. My initial suspicion was a 

Please check the message with '-D' and capture a few dozen lines of the debug
output before the error (and some after, if there is anything) and attach it
here so we can figure out where exactly the bad call is happening.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7541] Use of uninitialized value in lc at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/RegistryBoundaries.pm line 205

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7541

Bill Cole <sa...@billmail.scconsult.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sa-bugz-20080315@billmail.s
                   |                            |cconsult.com

--- Comment #2 from Bill Cole <sa...@billmail.scconsult.com> ---
No, see the line before: "uninitialized value in lc" means that there's no
parameter left to 'shift' off the parameter stack. So, the uri_to_domain
subroutine call is expecting 2 arguments but is only getting one. 


Demo of this in a very simple (hand-entered) program:

# perl
use strict;
use warnings;
sub demo {
  my $self = shift;
  my $dom = lc shift;

  print "self=$self   dom=$dom\n";
}

demo ('info@foobar.baz');
^D
Use of uninitialized value in lc at - line 5.
self=info@foobar.baz   dom=


The "Can't locate object method" message is probably because the parameter that
was passed should have been the second one.

-- 
You are receiving this mail because:
You are the assignee for the bug.