You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2008/07/16 11:51:55 UTC
svn commit: r677216 - in /spamassassin/trunk/build/automc: automc-by-mail
buildbot_ready run_preflight
Author: jm
Date: Wed Jul 16 02:51:54 2008
New Revision: 677216
URL: http://svn.apache.org/viewvc?rev=677216&view=rev
Log:
remove mass-check-by-mail support; nobody used it
Modified:
spamassassin/trunk/build/automc/automc-by-mail
spamassassin/trunk/build/automc/buildbot_ready
spamassassin/trunk/build/automc/run_preflight
Modified: spamassassin/trunk/build/automc/automc-by-mail
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/automc/automc-by-mail?rev=677216&r1=677215&r2=677216&view=diff
==============================================================================
--- spamassassin/trunk/build/automc/automc-by-mail (original)
+++ spamassassin/trunk/build/automc/automc-by-mail Wed Jul 16 02:51:54 2008
@@ -1,127 +1,2 @@
#!/local/perl586/bin/perl
-
-use LWP::Simple;
-use MIME::Parser;
-
-# feel free to add your name here -- or that of anyone you want
-# to allow to use this system
-my $ALLOWED_MAIL_PEOPLE = qr/^(?:
-
- jm\@jmason\.org|
- quinlan\@pathname\.com|
- maddoc\@maddoc\.net|
- lwilton\@earthlink\.net|
- duncf\@debian\.org|
- chris\@iloaf\.com
-
- )/isx;
-
-# where the files are saved
-my $OUT_DIR = "/export/home/bbmass/bymail";
-
-# URL used to trigger the buildbot to build
-my $BB_URL = 'http://buildbot.spamassassin.org/preflight/__SLAVE__'.
- '/force?username=mail&comments=__WHY__';
-
-my $WHY = 'rules received via email';
-
-# name of the Buildbot slaves to trigger
-my @SLAVES = qw(
-
- mc-fast mc-slow mc-slower
-
- );
-
-my $EXTRACT_LOG = "$OUT_DIR/extract.log";
-my $LATEST_CF = "$OUT_DIR/latest.cf";
-
-# ---------------------------------------------------------------------------
-
-use strict;
-use warnings;
-
-open (STDOUT, ">$EXTRACT_LOG") or die "cannot redir STDOUT to $EXTRACT_LOG";
-open (STDERR, ">&STDOUT") or die "cannot redir STDERR";
-chmod 0666, $EXTRACT_LOG;
-
-my $parser = new MIME::Parser;
-(-d "$OUT_DIR/tmp") || mkdir("$OUT_DIR/tmp", 0700);
-$parser->output_dir("$OUT_DIR/tmp");
-
-my $ent = $parser->parse(\*STDIN) or die "parse failed\n";
-
-print "Parsed message:
----------------------------------------------------------------------------\n";
-$ent->print(\*STDOUT);
-print "[EOM]
----------------------------------------------------------------------------\n";
-
-my $from = $ent->head()->get("From");
-if ($from =~ /<(.*?)>/) {
- $from = $1;
-}
-else {
- $from =~ s/\s*\(.*?\)\s*//;
-}
-
-# TODO: less stupid auth using SPF. this doesn't really matter all that much,
-# however, since we lint any submitted rules before using them, which should
-# catch dangerous stuff, and that lint takes place in an unpriv chroot.
-#
-if ($from !~ $ALLOWED_MAIL_PEOPLE) {
- print "$from is not on the 'allowed' list, ignoring";
- goto done;
-}
-
-foreach my $part ($ent->parts) {
- my $ctype = $part->head->get("Content-Type") || ''; chomp $ctype;
- my $disp = $part->head->get("Content-Disposition") || ''; chomp $disp;
- my $desc = $part->head->get("Content-Description") || ''; chomp $desc;
-
- my $fname;
- if ($desc && $desc =~ /\S/) {
- $fname = $desc;
- } elsif ($disp && $disp =~ /filename=\"([^\"]+)\"/) {
- $fname = $1;
- } elsif ($disp && $disp =~ /filename=\'([^\']+)\'/) {
- $fname = $1;
- } elsif ($disp && $disp =~ /filename=([^\;\s]+)/) {
- $fname = $1;
- }
- $fname =~ s/^\s*//; $fname =~ s/\s*$//;
-
- print "part: fname=$fname, type=$ctype, disp=$disp\n";
-
- if ($ctype !~ /^text.plain\b/) {
- print "skipping part: not text/plain\n";
- next;
- }
-
- if (!$fname || $fname !~ /\.cf$/) {
- print "skipping part: filename doesn't end in '.cf'\n";
- next;
- }
-
- open (SAVE, ">$LATEST_CF") or die "cannot save to $LATEST_CF";
-
- print SAVE $part->bodyhandle()->as_string();
- close SAVE or die "cannot write to $LATEST_CF";
- chmod 0666, "$LATEST_CF";
-
- system ("ls -l $LATEST_CF");
-
- foreach my $slave (@SLAVES) {
- my $url = $BB_URL;
- my $why = $WHY; $why =~ s/\s+/%20/gs;
- $url =~ s/__SLAVE__/$slave/gs;
- $url =~ s/__WHY__/$why/gs;
-
- print "invoking force-build: $url\n";
- get($url);
- }
-}
-
-done:
-$ent->purge();
-exit;
-
+die "rules-by-mail no longer supported";
Modified: spamassassin/trunk/build/automc/buildbot_ready
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/automc/buildbot_ready?rev=677216&r1=677215&r2=677216&view=diff
==============================================================================
--- spamassassin/trunk/build/automc/buildbot_ready (original)
+++ spamassassin/trunk/build/automc/buildbot_ready Wed Jul 16 02:51:54 2008
@@ -1,8 +1,6 @@
#!/usr/bin/perl
my $BBMHOME = '/export/home/bbmass';
-my $BYMAILLOG = '/export/home/bbmass/bymail/extract.log';
-my $BYMAILCF = '/export/home/bbmass/bymail/latest.cf';
my $RULEQAURL = 'http://ruleqa.spamassassin.org/';
# where do the reporting scripts get run from?
@@ -48,26 +46,6 @@
# system ("svn info --non-interactive > masses/svninfo.tmp");
system ("svn info > masses/svninfo.tmp < /dev/null");
- # mass-check-by-mail support
- # only use files that are < 1 hour old
- #
- if (-f $BYMAILCF && -M $BYMAILCF < (1/24)) {
- print "\nFound recent rules-by-mail rules file, will mass-check:\n\n";
- system ("ls -l $BYMAILCF");
- system ("cp $BYMAILCF masses/mailed.cf");
- print "".("-" x 75)."\n";
- system ("cat masses/mailed.cf");
- print "".("-" x 75)."\n";
-
- if (-f $BYMAILLOG) {
- print "\nRules-by-mail extraction log:\n\n";
- system ("ls -l $BYMAILLOG");
- system ("cat $BYMAILLOG");
- }
- } else {
- unlink "masses/mailed.cf";
- }
-
# if (!perform_singleton_actions()) {
# # give the "winning" slave time to do the work we also need done
# print "sleeping for 60 seconds so that corpus is rebuilt\n";
Modified: spamassassin/trunk/build/automc/run_preflight
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/automc/run_preflight?rev=677216&r1=677215&r2=677216&view=diff
==============================================================================
--- spamassassin/trunk/build/automc/run_preflight (original)
+++ spamassassin/trunk/build/automc/run_preflight Wed Jul 16 02:51:54 2008
@@ -3,8 +3,6 @@
use strict;
sub run;
-my $BYMAILCF = '/export/home/bbmass/bymail/latest.cf';
-
# Mar 6 2007 jm: use the "Cool Tools" Solaris-optimized perl
my $perl = '/usr/local/bin/perl';
@@ -61,25 +59,6 @@
run "ls -l tstrules";
-# lint those rule files, and abort if they fail; this is a sanity check
-# now that we have mailed-in rules used in this mass-check
-#
-# Feb 20 2007 jm: actually, go ahead and mass-check anyway. Note that
-# the "make test" continuous integration buildbot will issue warnings
-# about the lint failure, so we don't need to do that here.
-#
-if (run ("../spamassassin --lint -x -C tstrules", 1) != 0) {
- warn "*** lint failed; performing mass-check ANYWAY! ***\n\n";
-
- # still, delete the mailed-in stuff.
- warn "Deleting 'mailed.cf', if it exists.\n";
- unlink $BYMAILCF;
- unlink "tstrules/70_mailed.cf";
-
-} else {
- print "lint passed.\n";
-}
-
# create the user_prefs file for the mass-check. Settings: turn off Bayes;
# turn off the auto-whitelist.