You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Alex Regan <my...@gmail.com> on 2015/05/14 15:56:54 UTC

PerMsgStatus & Util warnings

Hi,

I have v3.4.1 with amavisd v2.9.1 on fedora20 and receiving the 
following warnings:

May 13 23:32:31 mail01 amavis[17306]: (17306-10) _WARN: plugin: eval 
failed: Undefined subroutine 
&Mail::SpamAssassin::Util::RegistrarBoundaries::trim_domain called at 
/usr/share/perl5/vendor_perl/Mail/SpamAssassin/Util.pm line 1236.

May 13 23:35:43 mail01 amavis[17386]: (17386-12) _WARN: Use of 
uninitialized value in concatenation (.) or string at 
/usr/share/perl5/vendor_perl/Mail/SpamAssassin/PerMsgStatus.pm line 3082.

I thought I remembered this issue being discussed some time ago, but 
couldn't find any recent references to it. It looks like it happens just 
in the course of processing messages with no other information around 
these lines. I also don't know when it first started. Thought someone 
might have some ideas?

Thanks,
Alex

Re: PerMsgStatus & Util warnings

Posted by Mark Martinec <Ma...@ijs.si>.
Alex Regan wrote:

> Please open a bug report (one should do, even though these are two
>> independent issues).
> 
> Bug filed, thanks so much.
> 
> https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7195


Great, thanks. Please also try the posted patch and see if that
resolves the first type of a warning (the 'Undefined subroutine').

   Mark

Re: PerMsgStatus & Util warnings

Posted by Alex Regan <my...@gmail.com>.
Hi,

On 05/14/2015 10:58 AM, Mark Martinec wrote:
>>> I have v3.4.1 with amavisd v2.9.1 on fedora20 and receiving the
>>> following warnings:
>>>
>>> May 13 23:32:31 mail01 amavis[17306]: (17306-10) _WARN: plugin: eval
>>> failed: Undefined subroutine
>>> &Mail::SpamAssassin::Util::RegistrarBoundaries::trim_domain called at
>>> /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Util.pm line 1236.
>>>
>>> May 13 23:35:43 mail01 amavis[17386]: (17386-12) _WARN: Use of
>>> uninitialized value in concatenation (.) or string at
>>> /usr/share/perl5/vendor_perl/Mail/SpamAssassin/PerMsgStatus.pm line
>>> 3082.
>
> The second warning is independent from the first, I'm seeing these too.
>
> It's because the RegistryBoundaries::uri_to_domain returns undef
> when it sees %hh encoding in an URL, and the caller then tries to
> concatenate it with 'dummy@', which produces this warning.
> Seems harmless but annoying, should be fixed.
>
> Please open a bug report (one should do, even though these are two
> independent issues).

Bug filed, thanks so much.

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

Alex


>
>    Mark

Re: PerMsgStatus & Util warnings

Posted by Mark Martinec <Ma...@ijs.si>.
>> I have v3.4.1 with amavisd v2.9.1 on fedora20 and receiving the
>> following warnings:
>> 
>> May 13 23:32:31 mail01 amavis[17306]: (17306-10) _WARN: plugin: eval
>> failed: Undefined subroutine
>> &Mail::SpamAssassin::Util::RegistrarBoundaries::trim_domain called at
>> /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Util.pm line 1236.
>> 
>> May 13 23:35:43 mail01 amavis[17386]: (17386-12) _WARN: Use of
>> uninitialized value in concatenation (.) or string at
>> /usr/share/perl5/vendor_perl/Mail/SpamAssassin/PerMsgStatus.pm line
>> 3082.

The second warning is independent from the first, I'm seeing these too.

It's because the RegistryBoundaries::uri_to_domain returns undef
when it sees %hh encoding in an URL, and the caller then tries to
concatenate it with 'dummy@', which produces this warning.
Seems harmless but annoying, should be fixed.

Please open a bug report (one should do, even though these are two
independent issues).

   Mark

Re: PerMsgStatus & Util warnings

Posted by Dave Wreski <dw...@guardiandigital.com>.
Hi,

>>> $self->{main}->{registryboundaries}->uri_to_domain($fubar);
>>
>> This appears to fix DecodeShortURLs.pm
>>
>> --- DecodeShortURLs.pm.orig     2015-05-15 11:51:44.688835663 -0400
>> +++ DecodeShortURLs.pm  2015-05-15 11:39:35.020499066 -0400
>> @@ -486,7 +486,8 @@
>>       [Mail::SpamAssassin::Util::uri_list_canonify (undef, $uri)];
>>
>>     foreach (@{$info->{cleaned}}) {
>> -    my ($dom, $host) = Mail::SpamAssassin::Util::uri_to_domain($_);
>> +    my ($dom, $host) =
>> $info->{main}->{registryboundaries}->uri_to_domain($_);
>>
>>       if ($dom && !$info->{domains}->{$dom}) {
>>         # 3.4 compatibility as per Marc Martinec
>>
>
> For reference here too. Here's a working patch. Do not modify code at
> random.  :-)

Thank you for posting the complete patch this time :-)

Alex

>
>
> --- DecodeShortURLs.pm.orig     2015-05-15 19:19:07.000000000 +0300
> +++ DecodeShortURLs.pm  2015-05-15 19:20:19.000000000 +0300
> @@ -446,7 +446,7 @@
>
>     # At this point we have a new URL in $response
>     $pms->got_hit('HAS_SHORT_URL');
> -  _add_uri_detail_list($pms, $location);
> +  $self->_add_uri_detail_list($pms, $location);
>
>     # Set chained here otherwise we might mark a disabled page or
>     # redirect back to the same host as chaining incorrectly.
> @@ -458,7 +458,7 @@
>       my($host) = ($short_url =~ /^(https?:\/\/\S+)\//);
>       $location = "$host/$location";
>       dbg("Looks like a local redirection: $short_url => $location");
> -    _add_uri_detail_list($pms, $location);
> +    $self->_add_uri_detail_list($pms, $location);
>       return $location;
>     }
>
> @@ -490,7 +490,7 @@
>   # Beware.  Code copied from PerMsgStatus get_uri_detail_list().
>   # Stolen from GUDO.pm
>   sub _add_uri_detail_list {
> -  my ($pms, $uri) = @_;
> +  my ($self, $pms, $uri) = @_;
>     my $info;
>
>     # Cache of text parsed URIs, as previously used by get_uri_detail_list().
> @@ -502,7 +502,7 @@
>       [Mail::SpamAssassin::Util::uri_list_canonify (undef, $uri)];
>
>     foreach (@{$info->{cleaned}}) {
> -    my ($dom, $host) = Mail::SpamAssassin::Util::uri_to_domain($_);
> +    my ($dom, $host) = $self->{main}->{registryboundaries}->uri_to_domain($_);
>
>       if ($dom && !$info->{domains}->{$dom}) {
>         # 3.4 compatibility as per Marc Martinec
>

Re: PerMsgStatus & Util warnings

Posted by Henrik K <he...@hege.li>.
On Fri, May 15, 2015 at 11:55:38AM -0400, Alex Regan wrote:
> Hi,
> 
> >>>>Yes, it does appear to silence the warning. I'm also using
> >>>>DecodeShortURLs. I'll update the ticket.
> >>>
> >>>If you can please also open a ticket for the plugins you are using to
> >>>update their code, that would be helpful as well.
> >>
> >>Kartsten's GUDO plugin also uses  uri_to_domain
> >>
> >>What do we have to replace that function with?
> >
> >
> >Mail::SpamAssassin::Util::uri_to_domain($fubar)
> >
> >->
> >
> >$self->{main}->{registryboundaries}->uri_to_domain($fubar);
> 
> This appears to fix DecodeShortURLs.pm
> 
> --- DecodeShortURLs.pm.orig     2015-05-15 11:51:44.688835663 -0400
> +++ DecodeShortURLs.pm  2015-05-15 11:39:35.020499066 -0400
> @@ -486,7 +486,8 @@
>      [Mail::SpamAssassin::Util::uri_list_canonify (undef, $uri)];
> 
>    foreach (@{$info->{cleaned}}) {
> -    my ($dom, $host) = Mail::SpamAssassin::Util::uri_to_domain($_);
> +    my ($dom, $host) =
> $info->{main}->{registryboundaries}->uri_to_domain($_);
> 
>      if ($dom && !$info->{domains}->{$dom}) {
>        # 3.4 compatibility as per Marc Martinec
> 

For reference here too. Here's a working patch. Do not modify code at
random.  :-)


--- DecodeShortURLs.pm.orig     2015-05-15 19:19:07.000000000 +0300
+++ DecodeShortURLs.pm  2015-05-15 19:20:19.000000000 +0300
@@ -446,7 +446,7 @@

   # At this point we have a new URL in $response
   $pms->got_hit('HAS_SHORT_URL');
-  _add_uri_detail_list($pms, $location);
+  $self->_add_uri_detail_list($pms, $location);

   # Set chained here otherwise we might mark a disabled page or
   # redirect back to the same host as chaining incorrectly.
@@ -458,7 +458,7 @@
     my($host) = ($short_url =~ /^(https?:\/\/\S+)\//);
     $location = "$host/$location";
     dbg("Looks like a local redirection: $short_url => $location");
-    _add_uri_detail_list($pms, $location);
+    $self->_add_uri_detail_list($pms, $location);
     return $location;
   }

@@ -490,7 +490,7 @@
 # Beware.  Code copied from PerMsgStatus get_uri_detail_list().
 # Stolen from GUDO.pm
 sub _add_uri_detail_list {
-  my ($pms, $uri) = @_;
+  my ($self, $pms, $uri) = @_;
   my $info;

   # Cache of text parsed URIs, as previously used by get_uri_detail_list().
@@ -502,7 +502,7 @@
     [Mail::SpamAssassin::Util::uri_list_canonify (undef, $uri)];

   foreach (@{$info->{cleaned}}) {
-    my ($dom, $host) = Mail::SpamAssassin::Util::uri_to_domain($_);
+    my ($dom, $host) = $self->{main}->{registryboundaries}->uri_to_domain($_);

     if ($dom && !$info->{domains}->{$dom}) {
       # 3.4 compatibility as per Marc Martinec

Re: PerMsgStatus & Util warnings

Posted by Alex Regan <my...@gmail.com>.
Hi,

>>>> Yes, it does appear to silence the warning. I'm also using
>>>> DecodeShortURLs. I'll update the ticket.
>>>
>>> If you can please also open a ticket for the plugins you are using to
>>> update their code, that would be helpful as well.
>>
>> Kartsten's GUDO plugin also uses  uri_to_domain
>>
>> What do we have to replace that function with?
>
>
> Mail::SpamAssassin::Util::uri_to_domain($fubar)
>
> ->
>
> $self->{main}->{registryboundaries}->uri_to_domain($fubar);

This appears to fix DecodeShortURLs.pm

--- DecodeShortURLs.pm.orig     2015-05-15 11:51:44.688835663 -0400
+++ DecodeShortURLs.pm  2015-05-15 11:39:35.020499066 -0400
@@ -486,7 +486,8 @@
      [Mail::SpamAssassin::Util::uri_list_canonify (undef, $uri)];

    foreach (@{$info->{cleaned}}) {
-    my ($dom, $host) = Mail::SpamAssassin::Util::uri_to_domain($_);
+    my ($dom, $host) = 
$info->{main}->{registryboundaries}->uri_to_domain($_);

      if ($dom && !$info->{domains}->{$dom}) {
        # 3.4 compatibility as per Marc Martinec



Re: PerMsgStatus & Util warnings

Posted by Henrik K <he...@hege.li>.
On Fri, May 15, 2015 at 03:43:26PM +0200, Axb wrote:
> On 15.05.2015 15:02, Kevin A. McGrail wrote:
> >On 5/15/2015 8:59 AM, Alex Regan wrote:
> >>
> >>>>I do have a third party plugin that is calling uri_to_domain.
> >>>>It is located at the following URL:
> >>>>
> >>>>    https://github.com/smfreegard/DecodeShortURLs
> >>>>
> >>>>I'm mentioning this because the bug that was raised for this has the
> >>>>following comment:
> >>>>
> >>>>    "KAM: Please let us know if you are using a 3rd party plugin
> >>>>because
> >>>>      we'd like to make sure the authors noticed the change in 3.4.1."
> >>>>    https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7195
> >>>
> >>>
> >>>Thanks, useful. If you have a chance please try the small patch there
> >>>(just adds the:  use Mail::SpamAssassin::Util::RegistrarBoundaries;
> >>>line in Util.pm) and see if it helps.
> >>
> >>Yes, it does appear to silence the warning. I'm also using
> >>DecodeShortURLs. I'll update the ticket.
> >
> >If you can please also open a ticket for the plugins you are using to
> >update their code, that would be helpful as well.
> 
> Kartsten's GUDO plugin also uses  uri_to_domain
> 
> What do we have to replace that function with?


Mail::SpamAssassin::Util::uri_to_domain($fubar)

->

$self->{main}->{registryboundaries}->uri_to_domain($fubar);

Re: PerMsgStatus & Util warnings

Posted by Joe Quinn <jq...@pccc.com>.
On 5/15/2015 10:00 AM, Joe Quinn wrote:
> On 5/15/2015 9:49 AM, Kevin A. McGrail wrote:
>> On 5/15/2015 9:43 AM, Axb wrote:
>>> Kartsten's GUDO plugin also uses uri_to_domain
>>>
>>> What do we have to replace that function with?
>>
>> The uri_to_domain is now in 
>> Mail::SpamAssassin::RegistryBoundaries::uri_to_domain.
>>
>> Reiterating the announcement:
>>
>> Notable Internal changes
>> ------------------------
>>
>> Mail::SpamAssassin::Util::RegistrarBoundaries is being replaced by
>> Mail::SpamAssassin::RegistryBoundaries so that new TLDs can be updated
>> via 20_aux_tlds.cf delivered via sa-update.
>>
>> The $VALID_TLDS_RE global in registrar boundaries is deprecated but kept
>> for third-party plugin compatibility.  It may be removed in a future
>> release. See Mail::SpamAssassin::Plugin::FreeMail for an example of the
>> new way of abtaining a valid list of TLDs.
>>
>> The following functions and variables will be removed in the next
>> release after 3.4.1 excepting any emergency break/fix releases
>> immediately after 3.4.1:
>>   Mail::SpamAssassin::Util::RegistrarBoundaries::is_domain_valid
>>   Mail::SpamAssassin::Util::RegistrarBoundaries::trim_domain
>>   Mail::SpamAssassin::Util::RegistrarBoundaries::split_domain
>>   Mail::SpamAssassin::Util::uri_to_domain
>>   Mail::SpamAssassin::Util::RegistrarBoundaries::US_STATES
>> Mail::SpamAssassin::Util::RegistrarBoundaries::THREE_LEVEL_DOMAINS
>> Mail::SpamAssassin::Util::RegistrarBoundaries::TWO_LEVEL_DOMAINS
>>   Mail::SpamAssassin::Util::RegistrarBoundaries::VALID_TLDS_RE
>>   Mail::SpamAssassin::Util::RegistrarBoundaries::VALID_TLDS
>>
>> This change should only affect 3rd party plugin authors who will need
>> to update their code to utilize Mail::SpamAssassin::RegistryBoundaries.
> Also from RegistrarBoundaries:
>
> =item $domain = trim_domain($fqdn)
> [snip]
> This function has been moved !!! See 
> Mail::SpamAssassin::RegistryBoundaries !!!
> This is left as transition fallback for third party plugins.
> It will be removed in the future.
> =cut
Er, misread AXB's email. In any event, it's pretty thoroughly documented 
so programmers should notice immediately when their function calls start 
vanishing.

Re: PerMsgStatus & Util warnings

Posted by Joe Quinn <jq...@pccc.com>.
On 5/15/2015 9:49 AM, Kevin A. McGrail wrote:
> On 5/15/2015 9:43 AM, Axb wrote:
>> Kartsten's GUDO plugin also uses uri_to_domain
>>
>> What do we have to replace that function with?
>
> The uri_to_domain is now in 
> Mail::SpamAssassin::RegistryBoundaries::uri_to_domain.
>
> Reiterating the announcement:
>
> Notable Internal changes
> ------------------------
>
> Mail::SpamAssassin::Util::RegistrarBoundaries is being replaced by
> Mail::SpamAssassin::RegistryBoundaries so that new TLDs can be updated
> via 20_aux_tlds.cf delivered via sa-update.
>
> The $VALID_TLDS_RE global in registrar boundaries is deprecated but kept
> for third-party plugin compatibility.  It may be removed in a future
> release. See Mail::SpamAssassin::Plugin::FreeMail for an example of the
> new way of abtaining a valid list of TLDs.
>
> The following functions and variables will be removed in the next
> release after 3.4.1 excepting any emergency break/fix releases
> immediately after 3.4.1:
>   Mail::SpamAssassin::Util::RegistrarBoundaries::is_domain_valid
>   Mail::SpamAssassin::Util::RegistrarBoundaries::trim_domain
>   Mail::SpamAssassin::Util::RegistrarBoundaries::split_domain
>   Mail::SpamAssassin::Util::uri_to_domain
>   Mail::SpamAssassin::Util::RegistrarBoundaries::US_STATES
> Mail::SpamAssassin::Util::RegistrarBoundaries::THREE_LEVEL_DOMAINS
>   Mail::SpamAssassin::Util::RegistrarBoundaries::TWO_LEVEL_DOMAINS
>   Mail::SpamAssassin::Util::RegistrarBoundaries::VALID_TLDS_RE
>   Mail::SpamAssassin::Util::RegistrarBoundaries::VALID_TLDS
>
> This change should only affect 3rd party plugin authors who will need
> to update their code to utilize Mail::SpamAssassin::RegistryBoundaries.
Also from RegistrarBoundaries:

=item $domain = trim_domain($fqdn)
[snip]
This function has been moved !!! See 
Mail::SpamAssassin::RegistryBoundaries !!!
This is left as transition fallback for third party plugins.
It will be removed in the future.
=cut


Re: PerMsgStatus & Util warnings

Posted by "Kevin A. McGrail" <KM...@PCCC.com>.
On 5/15/2015 9:43 AM, Axb wrote:
> Kartsten's GUDO plugin also uses  uri_to_domain
>
> What do we have to replace that function with?

The uri_to_domain is now in 
Mail::SpamAssassin::RegistryBoundaries::uri_to_domain.

Reiterating the announcement:

Notable Internal changes
------------------------

Mail::SpamAssassin::Util::RegistrarBoundaries is being replaced by
Mail::SpamAssassin::RegistryBoundaries so that new TLDs can be updated
via 20_aux_tlds.cf delivered via sa-update.

The $VALID_TLDS_RE global in registrar boundaries is deprecated but kept
for third-party plugin compatibility.  It may be removed in a future
release. See Mail::SpamAssassin::Plugin::FreeMail for an example of the
new way of abtaining a valid list of TLDs.

The following functions and variables will be removed in the next
release after 3.4.1 excepting any emergency break/fix releases
immediately after 3.4.1:
   Mail::SpamAssassin::Util::RegistrarBoundaries::is_domain_valid
   Mail::SpamAssassin::Util::RegistrarBoundaries::trim_domain
   Mail::SpamAssassin::Util::RegistrarBoundaries::split_domain
   Mail::SpamAssassin::Util::uri_to_domain
   Mail::SpamAssassin::Util::RegistrarBoundaries::US_STATES
   Mail::SpamAssassin::Util::RegistrarBoundaries::THREE_LEVEL_DOMAINS
   Mail::SpamAssassin::Util::RegistrarBoundaries::TWO_LEVEL_DOMAINS
   Mail::SpamAssassin::Util::RegistrarBoundaries::VALID_TLDS_RE
   Mail::SpamAssassin::Util::RegistrarBoundaries::VALID_TLDS

This change should only affect 3rd party plugin authors who will need
to update their code to utilize Mail::SpamAssassin::RegistryBoundaries.


Re: PerMsgStatus & Util warnings

Posted by Axb <ax...@gmail.com>.
On 15.05.2015 15:02, Kevin A. McGrail wrote:
> On 5/15/2015 8:59 AM, Alex Regan wrote:
>>
>>>> I do have a third party plugin that is calling uri_to_domain.
>>>> It is located at the following URL:
>>>>
>>>>     https://github.com/smfreegard/DecodeShortURLs
>>>>
>>>> I'm mentioning this because the bug that was raised for this has the
>>>> following comment:
>>>>
>>>>     "KAM: Please let us know if you are using a 3rd party plugin
>>>> because
>>>>       we'd like to make sure the authors noticed the change in 3.4.1."
>>>>     https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7195
>>>
>>>
>>> Thanks, useful. If you have a chance please try the small patch there
>>> (just adds the:  use Mail::SpamAssassin::Util::RegistrarBoundaries;
>>> line in Util.pm) and see if it helps.
>>
>> Yes, it does appear to silence the warning. I'm also using
>> DecodeShortURLs. I'll update the ticket.
>
> If you can please also open a ticket for the plugins you are using to
> update their code, that would be helpful as well.

Kartsten's GUDO plugin also uses  uri_to_domain

What do we have to replace that function with?


Re: PerMsgStatus & Util warnings

Posted by "Kevin A. McGrail" <KM...@PCCC.com>.
On 5/15/2015 8:59 AM, Alex Regan wrote:
>
>>> I do have a third party plugin that is calling uri_to_domain.
>>> It is located at the following URL:
>>>
>>>     https://github.com/smfreegard/DecodeShortURLs
>>>
>>> I'm mentioning this because the bug that was raised for this has the
>>> following comment:
>>>
>>>     "KAM: Please let us know if you are using a 3rd party plugin 
>>> because
>>>       we'd like to make sure the authors noticed the change in 3.4.1."
>>>     https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7195
>>
>>
>> Thanks, useful. If you have a chance please try the small patch there
>> (just adds the:  use Mail::SpamAssassin::Util::RegistrarBoundaries;
>> line in Util.pm) and see if it helps.
>
> Yes, it does appear to silence the warning. I'm also using 
> DecodeShortURLs. I'll update the ticket. 

If you can please also open a ticket for the plugins you are using to 
update their code, that would be helpful as well.

Regards,
KAM

Re: PerMsgStatus & Util warnings

Posted by Alex Regan <my...@gmail.com>.
Hi,

>> May 15 12:34:41 smtp-syd mimedefang-multiplexor[30108]:
>> t4F2YYjZ003229: Slave 6 stderr: plugin: eval failed: Undefined
>> subroutine &Mail::SpamAssassin::Util::RegistrarBoundaries::trim_domain
>> called at /usr/share/perl5/Mail/SpamAssassin/Util.pm line 1236.
>>
>> I'm using The SpamAssassin Debian package (which is version 3.4.1-1).
>>
>> I do have a third party plugin that is calling uri_to_domain.
>> It is located at the following URL:
>>
>>     https://github.com/smfreegard/DecodeShortURLs
>>
>> And is linked to from the SpamAssassin Custom Plugins wiki page:
>>
>>     https://wiki.apache.org/spamassassin/CustomPlugins
>>
>> Here is the offending line:
>>
>>     jimb@smtp-syd:~$ grep uri_to_domain
>> /etc/spamassassin/DecodeShortURLs.pm
>>         my ($dom, $host) = Mail::SpamAssassin::Util::uri_to_domain($_);
>>
>> I'm mentioning this because the bug that was raised for this has the
>> following comment:
>>
>>     "KAM: Please let us know if you are using a 3rd party plugin because
>>       we'd like to make sure the authors noticed the change in 3.4.1."
>>     https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7195
>
>
> Thanks, useful. If you have a chance please try the small patch there
> (just adds the:  use Mail::SpamAssassin::Util::RegistrarBoundaries;
> line in Util.pm) and see if it helps.

Yes, it does appear to silence the warning. I'm also using 
DecodeShortURLs. I'll update the ticket.

Thanks,
Alex



>
>    Mark

RE: PerMsgStatus & Util warnings

Posted by Mark Martinec <Ma...@ijs.si>.
Jim Barber wrote:

>> From: Mark Martinec [mailto:Mark.Martinec+sa@ijs.si]
>> Are you using some third-party SpamAssasin plugin that relies on the
>> deprecated subroutine Mail::SpamAssassin::Util::uri_to_domain ?
> 
> I'm getting the same error:
> 
> May 15 12:34:41 smtp-syd mimedefang-multiplexor[30108]:
> t4F2YYjZ003229: Slave 6 stderr: plugin: eval failed: Undefined
> subroutine &Mail::SpamAssassin::Util::RegistrarBoundaries::trim_domain
> called at /usr/share/perl5/Mail/SpamAssassin/Util.pm line 1236.
> 
> I'm using The SpamAssassin Debian package (which is version 3.4.1-1).
> 
> I do have a third party plugin that is calling uri_to_domain.
> It is located at the following URL:
> 
> 	https://github.com/smfreegard/DecodeShortURLs
> 
> And is linked to from the SpamAssassin Custom Plugins wiki page:
> 
> 	https://wiki.apache.org/spamassassin/CustomPlugins
> 
> Here is the offending line:
> 
> 	jimb@smtp-syd:~$ grep uri_to_domain 
> /etc/spamassassin/DecodeShortURLs.pm
> 	    my ($dom, $host) = Mail::SpamAssassin::Util::uri_to_domain($_);
> 
> I'm mentioning this because the bug that was raised for this has the
> following comment:
> 
> 	"KAM: Please let us know if you are using a 3rd party plugin because
>       we'd like to make sure the authors noticed the change in 3.4.1."
> 	https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7195


Thanks, useful. If you have a chance please try the small patch there
(just adds the:  use Mail::SpamAssassin::Util::RegistrarBoundaries;
line in Util.pm) and see if it helps.

   Mark

RE: PerMsgStatus & Util warnings

Posted by Jim Barber <ji...@primaryhealthcare.com.au>.
> From: Mark Martinec [mailto:Mark.Martinec+sa@ijs.si] 
> 
> Are you using some third-party SpamAssasin plugin that relies on the
> deprecated subroutine Mail::SpamAssassin::Util::uri_to_domain ?
> 

I'm getting the same error:

May 15 12:34:41 smtp-syd mimedefang-multiplexor[30108]: t4F2YYjZ003229: Slave 6 stderr: plugin: eval failed: Undefined subroutine &Mail::SpamAssassin::Util::RegistrarBoundaries::trim_domain called at /usr/share/perl5/Mail/SpamAssassin/Util.pm line 1236.

I'm using The SpamAssassin Debian package (which is version 3.4.1-1).

I do have a third party plugin that is calling uri_to_domain.
It is located at the following URL:

	https://github.com/smfreegard/DecodeShortURLs

And is linked to from the SpamAssassin Custom Plugins wiki page:

	https://wiki.apache.org/spamassassin/CustomPlugins

Here is the offending line:

	jimb@smtp-syd:~$ grep uri_to_domain /etc/spamassassin/DecodeShortURLs.pm 
	    my ($dom, $host) = Mail::SpamAssassin::Util::uri_to_domain($_);

I'm mentioning this because the bug that was raised for this has the following comment:

	"KAM: Please let us know if you are using a 3rd party plugin because we'd like to make sure the authors noticed the change in 3.4.1."
	https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7195

Regards,
Jim.

Re: PerMsgStatus & Util warnings

Posted by Mark Martinec <Ma...@ijs.si>.
Alex Regan wrote:

> I have v3.4.1 with amavisd v2.9.1 on fedora20 and receiving the
> following warnings:
> 
> May 13 23:32:31 mail01 amavis[17306]: (17306-10) _WARN: plugin: eval
> failed: Undefined subroutine
> &Mail::SpamAssassin::Util::RegistrarBoundaries::trim_domain called at
> /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Util.pm line 1236.
> 
> May 13 23:35:43 mail01 amavis[17386]: (17386-12) _WARN: Use of
> uninitialized value in concatenation (.) or string at
> /usr/share/perl5/vendor_perl/Mail/SpamAssassin/PerMsgStatus.pm line
> 3082.
> 
> I thought I remembered this issue being discussed some time ago, but
> couldn't find any recent references to it. It looks like it happens
> just in the course of processing messages with no other information
> around these lines. I also don't know when it first started. Thought
> someone might have some ideas?

Are you using some third-party SpamAssasin plugin that relies on the
deprecated subroutine Mail::SpamAssassin::Util::uri_to_domain ?

Please try the patch below:

=======
--- Mail/SpamAssassin/Util.pm~  2015-04-28 21:56:49.000000000 +0200
+++ Mail/SpamAssassin/Util.pm   2015-05-14 16:26:23.198104251 +0200
@@ -49,4 +49,5 @@

  use Mail::SpamAssassin::Logger;
+use Mail::SpamAssassin::Util::RegistrarBoundaries;  # deprecated

  BEGIN {
=======


Mark