X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Freceive.in;h=eb101a4029fe5cf681c1c5f2b6fe60ceb8c62c61;hb=9e803ce96df6418dcf56ef0b229a34ef6dd0a980;hp=e978365888ae2d24dca8af2f196aaed24066370c;hpb=31dfd8f7b2a88904ad197924c5c756ba27bec0a1;p=debbugs.git diff --git a/scripts/receive.in b/scripts/receive.in index e978365..eb101a4 100755 --- a/scripts/receive.in +++ b/scripts/receive.in @@ -1,16 +1,14 @@ -#!/usr/bin/perl -w -# $Id: receive.in,v 1.11 2001/08/18 01:32:28 doogie Exp $ +#!/usr/bin/perl +# $Id: receive.in,v 1.17 2005/07/24 18:42:41 don Exp $ # usage: mail is piped directly into program #set umask in order to have group-writable incoming/* -#umask 002; +#umask(002); -#load configuration file -$config_path = '/org/bugs.debian.org/etc'; -#$lib_path = '/org/bugs.debian.org/scripts'; +use Debbugs::Config qw(:globals :text); +my $lib_path = $gLibPath; -require "$config_path/config"; -$ENV{'PATH'} = '/org/bugs.debian.org/scripts:'.$ENV{'PATH'}; +$ENV{'PATH'} = '/usr/lib/debbugs:'.$ENV{'PATH'}; #set source of mail delivery #sets any prefix needed to get mailer to add it to error mail @@ -28,7 +26,6 @@ if ( $gMailer eq 'exim' ) s/\>//; s/\) { print(FILE) || &failure("write temporary file: $!"); } close(FILE) || &failure("close temporary file: $!"); -rename("T.$id","I$queue.$id") || &failure("rename spool message: $!"); +my $prefix; +if ($gSpamScan) { + $prefix = 'S'; +} else { + $prefix = 'I'; +} +rename("T.$id","$prefix$queue.$id") || &failure("rename spool message: $!"); exit(0);