]> git.donarmstrong.com Git - debbugs.git/blobdiff - scripts/receive.in
[project @ 2002-11-17 22:45:15 by cjwatson]
[debbugs.git] / scripts / receive.in
index 53bb7d06f7f00b84595709a67025d048670d1f3a..2fe600fe55777adeb638edd3b4c3478028673179 100755 (executable)
@@ -1,12 +1,16 @@
-#!/usr/bin/perl -w
-# $Id: receive.in,v 1.7 2000/10/10 23:27:04 joy Exp $
+#!/usr/bin/perl
+# $Id: receive.in,v 1.14 2002/11/17 22:45:16 cjwatson Exp $
 # usage: mail is piped directly into program
 
 #set umask in order to have group-writable incoming/*
-#umask 002;
+#umask(002);
 
 #load configuration file
-require( '/etc/debbugs/config' );
+$config_path = '/etc/debbugs';
+#$lib_path = '/usr/lib/debbugs';
+
+require "$config_path/config";
+$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
@@ -24,7 +28,7 @@ if ( $gMailer eq 'exim' )
        s/\>//;
        s/\<//;
 }
-
+require("/etc/debbugs/text");
 
 #remove everything from @ to end of line
 s/\@.*$//;
@@ -33,17 +37,19 @@ s/\@.*$//;
 y/A-Z/a-z/;
 
 #set up to determine command
-%withnaddressmap= ('-submit',     'B',
+%withbugaddressmap= ('-submit',     'B',
                    '',            'B',
                    '-maintonly',  'M',
                    '-quiet',      'Q',
                    '-forwarded',  'F',
-                  '-fixed',      'X',
                    '-done',       'D',
                    '-close',      'D',
+                  '-request',    'R',
                    '-submitter',  'U');
 
-%withoutnaddressmap= ('submit',     'B',
+%withpkgaddressmap= ('-request',     'R');
+
+%withoutaddressmap= ('submit',     'B',
                       'bugs',       'B',
                       'maintonly',  'M',
                       'quiet',      'Q',
@@ -57,11 +63,15 @@ y/A-Z/a-z/;
 #determine command
 if (s/^(\d{1,9})\b//) {
     $bugnumber= $1;
-    $map= $withnaddressmap{$_};
+    $map= $withbugaddressmap{$_};
     $addrrec= "$bugnumber$_";
+} elsif (s/^(\w+)-//) {
+    $bugnumber= $1;
+    $map= $withpkgaddressmap{"-$_"};
+    $addrrec= "$bugnumber-$_";
 } else {
     $bugnumber= '';
-    $map= $withoutnaddressmap{$_};
+    $map= $withoutaddressmap{$_};
     $addrrec= "$_";
 }
 
@@ -88,13 +98,7 @@ $gBadEmailPrefix   http://$gWebDomain/
 $gBadEmailPrefix   http://$gWebDomain/Reporting.html
 $gBadEmailPrefix   http://$gWebDomain/Developer.html
 $gBadEmailPrefix   http://$gWebDomain/Access.html
-$gBadEmailPrefix
-$gBadEmailPrefix Instructions are available from ftp.debian.org in /debian
-$gBadEmailPrefix and at all Debian mirror sites, in the files:
-$gBadEmailPrefix  doc/bug-reporting.txt
-$gBadEmailPrefix  doc/bug-log-access.txt
-$gBadEmailPrefix  doc/bug-maint-info.txt
-$gBadEmailPrefix
+$gTextInstructions
 $gBadEmailPrefix For details of how to access $gBug report logs by email:
 $gBadEmailPrefix   send \`request\@$gEmailDomain' the word \`help'
 $gBadEmailPrefix