Just insert the following code into the Spamassassin subroutine of qmail-scanner-queue.pl to fix the Subject Re-write bug. I tried finding settings for this with no avail, so why not just add some code.
############ START HERE ####################### if ($sa_status == 1) { # Did spamc say it was spam my (@RAW,@RAT); my ($head_bl,$subject_bl,$mline_bl,$linenum_bl,$spam_subject_bl); $spam_subject_bl="**** SPAM ****"; # What Message do you want to prefix to the message subject open(DAT, "$scandir/$wmaildir/new/$file_id"); # Open the current message for reading @RAW=<DAT>; close(DAT); $linenum_bl=0; # Sloppy code foreach $mline_bl (@RAW) { $linenum_bl=$linenum_bl+1; # Even sloppier chomp($mline_bl); ($head_bl,$subject_bl)=split(/:/, $mline_bl, 2); # Split each line of the message into header name and content if ($head_bl eq "Subject") { # Is the header name Subject &debug("SUBJECT OF SPAMMAIL: $subject_bl"); # Log the spam email subject @RAT[$linenum_bl]="Subject: $spam_subject_bl $subject_bl\n"; # Re-write the subject to include spam prefix } else { @RAT[$linenum_bl]="$mline_bl\n"; # This if for if the header name is NOT Subject } } open(DAT, ">$scandir/$wmaildir/new/$file_id"); # Open the current message for over writing print DAT @RAT; close(DAT); # Close the current Message } # Return to qmail-scanner-queue for qmail-injection... etc ################### END HERE ###################### Yes, I know that my coding is kind of sloppy, but it does the job. You want to insert this code just above the END of the spammassassin subroutine where it says: ##################### $stop_spamassassin_time=[gettimeofday]; $spamassassin_time = tv_interval ($start_spamassassin_time, $stop_spamassassin_time); &debug("spamassassin: finished scan of dir \"$scandir/$file_id\" in $spamassassin_time secs"); } ##################### Worked excellent from here, did its job and now OE can filter the messages. I use this now for SITE-WIDE email where I do not want to hassle the users with server side mail filters (procmail) or stop the mail completely (and maybe loose some emails). If anyone can re-write this code better or for faster execution be my guest as I did this in about 5 mins. Brandon Lehmann Networld Online Inc. 1243 Napoleon Street Fremont, OH 43420 419-334-9042 [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> www.nwonline.net > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > Carlos Kumbak > Sent: Wednesday, July 17, 2002 12:17 AM > To: [EMAIL PROTECTED] > Subject: [SAtalk] Spamassassin + QmailScanner > > > Hello > > I'm trying to use SpamAssassin 2.31 with my Mail Server, but seems > that something is wrong. > > Some SpamAssassin features are not working. The worst problem of all > is that even when SA identifies a SPAM it doesn't add the > `*****SPAM*****` to the subject. Also... the spam_level_stars doesn't > work at all... > > > Check out this: > ---------------------- > Received: from [EMAIL PROTECTED] by cadeado by uid XXXXX with > qmail-scanner-1.12 (spamassassin: 2.40. . > Clear:SA:1(14.2/5.0):. Processed in 0.683329 secs); > 14 Jul 2002 03:16:03 -0000 > X-Spam-Status: Yes, hits=14.2 required=5.0 > X-Qmail-Scanner: 1.12 (Clear:SA:1(14.2/5.0):. Processed in > 0.683329 secs) > subject: > ---------------------- > > my mail_server() > { > - Qmail > - Vpopmail > - Qmail-Scanner 1.12 > } > > snippet of my local.cf () > { > auto_whitelist_factor 0.5 > auto_whitelist_path /var/spool/spamassassin/auto-whitelist > auto_whitelist_file_mode 0666 > rewrite_subject 1 > report_header 1 > subject_tag *****SPAM***** > use_terse_report 1 > defang_mime 1 > skip_rbl_checks 0 > required_hits 5 > auto_report_threshold 30 > check_mx_attempts 3 > check_mx_delay 5 > spam_level_stars 1 > ok_languages all > } > > May anyone "show me the light" please? What am I doing wrong?? > > Thanks in advance. > > -- > Best regards, > Carlos mailto:[EMAIL PROTECTED] > > > > ------------------------------------------------------- > This sf.net email is sponsored by: Jabber - The world's > fastest growing > real-time communications platform! Don't just IM. Build it in! > http://www.jabber.com/osdn/xim > _______________________________________________ > Spamassassin-talk mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/spamassassin-talk > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk