This file is indexed.

/usr/lib/debbugs/receive is in debbugs 2.4.1.1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#!/usr/bin/perl
# $Id: receive.in,v 1.15 2003/01/28 23:52:08 cjwatson Exp $
# usage: mail is piped directly into program

#set umask in order to have group-writable incoming/*
#umask(002);

#load configuration file
$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
if ( $gMailer eq 'exim' ) 
{	$gBadEmailPrefix = '';
	$_ = $ENV{'LOCAL_PART'};
} elsif ( $gMailer eq 'qmail' )
{	$gBadEmailPrefix = '//';
	$_ = $ENV{'DEFAULT'};
#	$_ = $ENV{'RECIPIENT'};
#	s/^\w+-bugs--?//;
} else 
{	$gBadEmailPrefix = '';
	$_ = $ARGV[0];
	s/\>//;
	s/\<//;
}
require("/etc/debbugs/text");

#remove everything from @ to end of line
s/\@.*$//;

#convert remaining upper case to lower case
y/A-Z/a-z/;

#set up to determine command
%withbugaddressmap= ('-submit',     'B',
                   '',            'B',
                   '-maintonly',  'M',
                   '-quiet',      'Q',
                   '-forwarded',  'F',
                   '-done',       'D',
                   '-close',      'D',
		   '-request',    'R',
                   '-submitter',  'U');

%withpkgaddressmap= ('-request',     'R');

%withoutaddressmap= ('submit',     'B',
                      'bugs',       'B',
                      'maintonly',  'M',
                      'quiet',      'Q',
                      'forwarded',  'F',
                      'done',       'D',
                      'close',      'D',
                      'request',    'R',
                      'submitter',  'U',
                      'control',    'C');

#determine command
if (s/^(\d{1,9})\b//) {
    $bugnumber= $1;
    $map= $withbugaddressmap{$_};
    $addrrec= "$bugnumber$_";
} elsif (s/^(\w+)-//) {
    $bugnumber= $1;
    $map= $withpkgaddressmap{"-$_"};
    $addrrec= "$bugnumber-$_";
} else {
    $bugnumber= '';
    $map= $withoutaddressmap{$_};
    $addrrec= "$_";
}

#print no command received
if (!defined($map)) {
    print STDERR <<ENDTEXT;
$gBadEmailPrefix
$gBadEmailPrefix Unknown $gBug service address $_\@$gEmailDomain.
$gBadEmailPrefix Recognised addresses are:
$gBadEmailPrefix
$gBadEmailPrefix     General:       Read $gBug# in Subject:    $gBug# is NNNN:
$gBadEmailPrefix
$gBadEmailPrefix      request        submit  $gBug             NNNN  NNNN-submit
$gBadEmailPrefix      control        maintonly                NNNN-maintonly
$gBadEmailPrefix      owner          quiet                    NNNN-quiet
$gBadEmailPrefix      postmaster     forwarded                NNNN-forwarded
$gBadEmailPrefix                     done  close              NNNN-done  NNNN-close
$gBadEmailPrefix                     submitter                NNNN-submitter
$gBadEmailPrefix
$gBadEmailPrefix (all \@$gEmailDomain.)
$gBadEmailPrefix
$gBadEmailPrefix For instructions via the WWW see:
$gBadEmailPrefix   http://$gWebDomain/
$gBadEmailPrefix   http://$gWebDomain/Reporting$gHTMLSuffix
$gBadEmailPrefix   http://$gWebDomain/Developer$gHTMLSuffix
$gBadEmailPrefix   http://$gWebDomain/Access$gHTMLSuffix
$gTextInstructions
$gBadEmailPrefix For details of how to access $gBug report logs by email:
$gBadEmailPrefix   send \`request\@$gEmailDomain' the word \`help'
$gBadEmailPrefix
ENDTEXT
    exit(100);
}

@months=qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
($sec,$min,$hour,$mday,$mon,$year)= gmtime(time);

$queue= "$map$bugnumber";

chdir("$gSpoolDir/incoming") || &failure("chdir to spool: $!");

$id= time.$$;
open(FILE,">T.$id") || &failure("open temporary file: $!");
printf(FILE "Received: (at %s) by $gEmailDomain; %d %s %d %02d:%02d:%02d +0000\n",
       $addrrec, $mday,$months[$mon],$year+1900, $hour,$min,$sec) ||
    &failure("write header to temporary file: $!");
while(<STDIN>) { print(FILE) || &failure("write temporary file: $!"); }
close(FILE) || &failure("close temporary file: $!");

rename("T.$id","I$queue.$id") || &failure("rename spool message: $!");

exit(0);

sub failure {
    length($id) && unlink("T.$id");
    print STDERR "bugs receive failure: @_\n";
    exit(75); # EX_TEMPFAIL
}