You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Chris <cp...@embarqmail.com> on 2014/08/28 23:14:53 UTC

Reporting to SpamCop

I'm having an issue with getting SA 3.4.0 when run as spamassassin -D -r
to report spam to SpamCop. The errors I'm seeing are:

warn: Use of uninitialized value $v in concatenation (.) or string
at /usr/local/share/perl/5.18.2/Mail/SpamAssassin/Plugin/SpamCop.pm line
255.

Line 255 of the SpamCop.pm is:

  # compose message
  my $message;
  while (my ($k, $v) = each %head) {
    $message .= "$k: $v\n"; <------Line 255
  }
  $message .= "\n" . $body;

warn: Use of uninitialized value $mx in substitution (s///)
at /usr/local/share/perl/5.18.2/Mail/SpamAssassin/Plugin/SpamCop.pm line
263.

  # send message
  my $failure;
  my $mx = $head{To};
  my $hello = Mail::SpamAssassin::Util::fq_hostname() || $from;
  $mx =~ s/.*\@//; <---------Line 263
  $hello =~ s/.*\@//;

In my v310.pre file I have:

loadplugin
Mail::SpamAssassin::Plugin::SpamCop /usr/local/share/perl/5.18.2/Mail/SpamAssassin/Plugin/SpamCop.pm

I have set the SpamCop from and to addresses in the SpamCop.pm file:

setting => 'cpollock@example.com',

setting => 'submit.example@spam.spamcop.net',

Yes, I am registered at SpamCop.

AFAICT I have all the necessary modules installed, Net::DNS; Net::SMTP
and so forth.

-- 
Chris
31.11°N 97.89°W (Elev. 1092 ft)
15:54:02 up 23:36, 4 users, load average: 0.43, 0.25, 0.33
Ubuntu 14.04 LTS, kernel 3.13.0-35-generic


Re: Reporting to SpamCop

Posted by Chris <cp...@embarqmail.com>.
On Thu, 2014-08-28 at 23:49 +0200, Karsten Bräckelmann wrote:
> On Thu, 2014-08-28 at 16:14 -0500, Chris wrote:
> > I'm having an issue with getting SA 3.4.0 when run as spamassassin -D -r
> > to report spam to SpamCop. The errors I'm seeing are:
> 
> Ignoring the Perl warnings for now.
> 
> > In my v310.pre file I have:
> > 
> > loadplugin Mail::SpamAssassin::Plugin::SpamCop /usr/local/share/perl/5.18.2/Mail/SpamAssassin/Plugin/SpamCop.pm
> 
> It should never be necessary to provide the (optional) filename argument
> with stock SA plugins. Even worse, absolute paths will eventually be
> harmful.
> 
Thanks Karsten, I'll remove the path statement

> > I have set the SpamCop from and to addresses in the SpamCop.pm file:
> 
> The Perl modules are no user-serviceable parts. Do not edit them.
> 
> Moreover, the SpamCop plugin provides the spamcop_(from|to)_address
> options to set these in your configuration. See
> 
>   http://spamassassin.apache.org/doc/Mail_SpamAssassin_Plugin_SpamCop.html
> 
> > setting => 'cpollock@example.com',
> > setting => 'submit.example@spam.spamcop.net',
> 
> Wait... What exactly did you edit?
> 
> The only instances of 'setting' in SpamCop.pm are the ones used to
> register SA options. Did you replace the string spamcop_from_address
> with your email address?

This is what I edited:

=item spamcop_from_address user@example.com   (default: none)

This address is used during manual reports to SpamCop as the From:
address.  You can use your normal email address.  If this is not set, a
guess will be used as the From: address in SpamCop reports.

=cut

  push (@cmds, {
    setting => 'cpollock@example.com',
    default => 'cpollock@example.com',

=item spamcop_to_address user@example.com   (default: generic reporting
address)

Your customized SpamCop report submission address.  You need to obtain
this address by registering at C<http://www.spamcop.net/>.  If this is
not set, SpamCop reports will go to a generic reporting address for
SpamAssassin users and your reports will probably have less weight in
the SpamCop system.

=cut

  push (@cmds, {
    setting => 'submit.example@spam.spamcop.net',

I've replaced my registered submit address here with 'example'.
> 
> I have a gut feeling the Perl warnings will disappear, if you revert any
> modifications to the SpamCop.pm Perl module and set the options in your
> configuration instead...
> 
> 
Thanks Karsten, I'll give that a try again by setting in my local.cf
file.


-- 
Chris
31.11°N 97.89°W (Elev. 1092 ft)
16:54:39 up 1 day, 37 min, 4 users, load average: 0.32, 0.19, 0.22
Ubuntu 14.04 LTS, kernel 3.13.0-35-generic


Re: Reporting to SpamCop

Posted by Chris <cp...@embarqmail.com>.
On Thu, 2014-08-28 at 23:49 +0200, Karsten Bräckelmann wrote:
> On Thu, 2014-08-28 at 16:14 -0500, Chris wrote:
> > I'm having an issue with getting SA 3.4.0 when run as spamassassin -D -r
> > to report spam to SpamCop. The errors I'm seeing are:
> 
> Ignoring the Perl warnings for now.
> 
> > In my v310.pre file I have:
> > 
> > loadplugin Mail::SpamAssassin::Plugin::SpamCop /usr/local/share/perl/5.18.2/Mail/SpamAssassin/Plugin/SpamCop.pm
> 
> It should never be necessary to provide the (optional) filename argument
> with stock SA plugins. Even worse, absolute paths will eventually be
> harmful.
> 
> > I have set the SpamCop from and to addresses in the SpamCop.pm file:
> 
> The Perl modules are no user-serviceable parts. Do not edit them.
> 
> Moreover, the SpamCop plugin provides the spamcop_(from|to)_address
> options to set these in your configuration. See
> 
>   http://spamassassin.apache.org/doc/Mail_SpamAssassin_Plugin_SpamCop.html
> 
> > setting => 'cpollock@example.com',
> > setting => 'submit.example@spam.spamcop.net',
> 
> Wait... What exactly did you edit?
> 
> The only instances of 'setting' in SpamCop.pm are the ones used to
> register SA options. Did you replace the string spamcop_from_address
> with your email address?
> 
> I have a gut feeling the Perl warnings will disappear, if you revert any
> modifications to the SpamCop.pm Perl module and set the options in your
> configuration instead...
> 
> 

That was the fix Karsten, thanks very much.

Chris

-- 
Chris
31.11°N 97.89°W (Elev. 1092 ft)
17:31:15 up 1 day, 1:13, 4 users, load average: 0.18, 0.36, 0.31
Ubuntu 14.04 LTS, kernel 3.13.0-35-generic


Re: Reporting to SpamCop

Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Thu, 2014-08-28 at 16:14 -0500, Chris wrote:
> I'm having an issue with getting SA 3.4.0 when run as spamassassin -D -r
> to report spam to SpamCop. The errors I'm seeing are:

Ignoring the Perl warnings for now.

> In my v310.pre file I have:
> 
> loadplugin Mail::SpamAssassin::Plugin::SpamCop /usr/local/share/perl/5.18.2/Mail/SpamAssassin/Plugin/SpamCop.pm

It should never be necessary to provide the (optional) filename argument
with stock SA plugins. Even worse, absolute paths will eventually be
harmful.

> I have set the SpamCop from and to addresses in the SpamCop.pm file:

The Perl modules are no user-serviceable parts. Do not edit them.

Moreover, the SpamCop plugin provides the spamcop_(from|to)_address
options to set these in your configuration. See

  http://spamassassin.apache.org/doc/Mail_SpamAssassin_Plugin_SpamCop.html

> setting => 'cpollock@example.com',
> setting => 'submit.example@spam.spamcop.net',

Wait... What exactly did you edit?

The only instances of 'setting' in SpamCop.pm are the ones used to
register SA options. Did you replace the string spamcop_from_address
with your email address?

I have a gut feeling the Perl warnings will disappear, if you revert any
modifications to the SpamCop.pm Perl module and set the options in your
configuration instead...


-- 
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}