[Mimedefang] FW: MIME Digests

Barry Byrne barry.byrne at wbtsystems.com
Mon Aug 12 12:26:00 EDT 2002


Excerpt from my mimedefang-filter:

  if ((-s "./INPUTMSG") <= (200 * 1024)) {
    my($hits, $req, $names, $report) = spam_assassin_check();
    my $level = $hits;
      # Build a 'star' rating from 0 - 20;
    if ( $level < 0 ) { $level = 0 }
    if ( $level > 20 ) { $level = 20 }
    my $stars = '*' x $level;
    if ($hits >= $req) {
      my $fixed_report = $report;
      $fixed_report =~ s/\n+\z//g;       # fixes for multiline header
      $fixed_report =~ s/\n/\n\t/g;      # to stop sendmail complaining
      action_add_header("X-Spam-Status", "Yes, hits=$hits required=$req");
      action_add_header("X-Spam-Level", "$stars ($hits)");
      action_add_header("X-Spam-Report","$fixed_report");
    } else {
      action_add_header("X-Spam-Status", "No, hits=$hits required=$req");
      action_add_header("X-Spam-Level", "$stars ($hits)");
    }
  }

--
Barry Byrne, IT Manager,
WBT Systems, Block 2, Harcourt Centre
Harcourt Street, Dublin 2, Ireland


> -----Original Message-----
> From: mimedefang-admin at lists.roaringpenguin.com
> [mailto:mimedefang-admin at lists.roaringpenguin.com]On Behalf Of Jeff
> Grossman
> Sent: 12 August 2002 17:06
> To: mimedefang at lists.roaringpenguin.com
> Subject: Re: [Mimedefang] FW: MIME Digests
> 
> 
> on 8/12/02 8:41 AM, Barry Byrne at barry.byrne at wbtsystems.com wrote:
> 
> > I just add the SA report to the headers - less intrusive for 
> most users and
> > still there if they want it.
> 
> Okay, how do I just have the report in the headers and not in the actual
> message?
> 
> Thanks,
> Jeff
> -- 
> Jeff Grossman (jeff at grossman.name)
> 
> _______________________________________________
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
> 



More information about the MIMEDefang mailing list