You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by "Daryl C. W. O'Shea" <sp...@dostech.ca> on 2005/03/11 08:16:42 UTC

Re: svn commit: r157050 - in spamassassin/trunk/lib/Mail/SpamAssassin: Conf.pm Plugin/SpamCop.pm

Thanks!  Forgot to move both parts from the old patch in BZ.


quinlan@apache.org wrote:
> Author: quinlan
> Date: Thu Mar 10 23:09:41 2005
> New Revision: 157050
> 
> URL: http://svn.apache.org/viewcvs?view=rev&rev=157050
> Log:
> spamcop_max_report_size should go into the SpamCop plugin
> 
> Modified:
>     spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm
>     spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SpamCop.pm
> 
> Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm
> URL: http://svn.apache.org/viewcvs/spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm?view=diff&r1=157049&r2=157050
> ==============================================================================
> --- spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm (original)
> +++ spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm Thu Mar 10 23:09:41 2005
> @@ -991,22 +991,6 @@
>  
>  =head2 NETWORK TEST OPTIONS
>  
> -=over 4
> -
> -=item spamcop_max_report_size		(default: 50)
> -
> -The size (in kilobytes) at which SpamAssassin will truncate messages
> -reported to SpamCop.  The default is the maximum size SpamCop will
> -accept at the time of release.
> -
> -=cut
> -
> -  push (@cmds, {
> -    setting => 'spamcop_max_report_size',
> -    default => 50,
> -    type => $CONF_TYPE_NUMERIC
> -  });
> -
>  =item trusted_networks ip.add.re.ss[/mask] ...   (default: none)
>  
>  What networks or hosts are 'trusted' in your setup.  B<Trusted> in this case
> 
> Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SpamCop.pm
> URL: http://svn.apache.org/viewcvs/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SpamCop.pm?view=diff&r1=157049&r2=157050
> ==============================================================================
> --- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SpamCop.pm (original)
> +++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/SpamCop.pm Thu Mar 10 23:09:41 2005
> @@ -129,6 +129,22 @@
>      },
>    });
>  
> +=over 4
> +
> +=item spamcop_max_report_size   (default: 50)
> +
> +Messages larger than this size (in kilobytes) will be truncated in
> +report messages sent to SpamCop.  The default setting is the maximum
> +size that SpamCop will accept at the time of release.
> +
> +=cut
> +
> +  push (@cmds, {
> +    setting => 'spamcop_max_report_size',
> +    default => 50,
> +    type => $Mail::SpamAssassin::Conf::CONF_TYPE_NUMERIC
> +  });
> +
>    $conf->{parser}->register_commands(\@cmds);
>  }
>  
> @@ -203,8 +219,9 @@
>  	      );
>  
>    # truncate message
> -  if (length($original) > $self->{conf}->{spamcop_max_report_size}*1024) {
> -    substr($original,($self->{conf}->{spamcop_max_report_size}*1024)) = "\n[truncated by SpamAssassin]\n";
> +  if (length($original) > $self->{conf}->{spamcop_max_report_size} * 1024) {
> +    substr($original, ($self->{conf}->{spamcop_max_report_size} * 1024)) =
> +      "\n[truncated by SpamAssassin]\n";
>    }
>  
>    my $body = <<"EOM";
>