X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Freceive.in;h=eb101a4029fe5cf681c1c5f2b6fe60ceb8c62c61;hb=d462fe6dc7ed9faa7e1b3a7a5db14382cd90d99e;hp=5e9a57a4521de042d4535279835f705fd12721c5;hpb=853f9fa781df9c0e61b90785c8e8e5098cade557;p=debbugs.git diff --git a/scripts/receive.in b/scripts/receive.in index 5e9a57a..eb101a4 100755 --- a/scripts/receive.in +++ b/scripts/receive.in @@ -1,9 +1,14 @@ -#!/usr/bin/perl -w -# $Id: receive.in,v 1.3 1999/10/25 01:35:04 gecko 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 -#load configuration file -require( '/etc/debbugs/config' ); +#set umask in order to have group-writable incoming/* +#umask(002); + +use Debbugs::Config qw(:globals :text); +my $lib_path = $gLibPath; + +$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 @@ -22,7 +27,6 @@ if ( $gMailer eq 'exim' ) 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);