This file is indexed.

/usr/share/courier/webadmin/admin-34fax.pl is in courier-faxmail 0.66.1-1ubuntu4.

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
#!/usr/bin/perl
#
# TITLE: Inbound FAX
#
#
# Copyright 2001 Double Precision, Inc.  See COPYING for
# distribution information.

use webadmin;

my $errstr="";

sub encode {
  my $mode=shift;
  my $hdr=shift;

  my $pid=open(REFORMIME, "-|");

  die "Content-Type: text/plain\n\n$!" unless defined $pid;

  if (!$pid)
    {
      $hdr =~ /(.*)/;
      $hdr= $1;
      my $chset="iso-8859-1";

      $chset=$1 if $ENV{"HTTP_ACCEPT_CHARSET"} =~ /^([^,\s]+)/;

      exec "$bindir/reformime", "-c", $chset, $mode, $hdr;
      exit 0;
    }

  $hdr=join("", <REFORMIME>);
  close(REFORMIME);
  chomp $hdr;
  return ($hdr);
}

if ($cgi->param("Save"))
  {
    ReplaceEnvVarConfigFile("faxnotifyrc", "DODELETE",
			    $cgi->param("DODELETE") ? "1":"0");

    ReplaceEnvVarConfigFile("faxnotifyrc", "MAILFROM",
			    $cgi->param("MAILFROM"));
    ReplaceEnvVarConfigFile("faxnotifyrc", "RCPTTO",
			    $cgi->param("RCPTTO"));
    ReplaceEnvVarConfigFile("faxnotifyrc", "FROMHDR",
			    encode("-O", $cgi->param("FROMHDR")));
    ReplaceEnvVarConfigFile("faxnotifyrc", "TOHDR",
			    encode("-O", $cgi->param("TOHDR")));
    ReplaceEnvVarConfigFile("faxnotifyrc", "SUBJECTHDR",
			    encode("-o", $cgi->param("SUBJECTHDR")));
    changed("");
    $errstr="\@SAVED\@";
  }

my $faxnotify=ReadEnvVarConfigFile("faxnotifyrc");

sub hdr {
  my $hdr=shift;

  my $pid=open(REFORMIME, "-|");

  die "Content-Type: text/plain\n\n$!" unless defined $pid;

  if (!$pid)
    {
      $hdr =~ /(.*)/;

      exec "$bindir/reformime", "-h", $1;
      exit 0;
    }

  $hdr=join("", <REFORMIME>);
  close(REFORMIME);
  chomp $hdr;
  return (htmlescape($hdr));
}

display_form("admin-34fax.html",
	     {
	      "ERROR" => $errstr,
	      "DODELETE" => ("<input type=\"checkbox\" name=\"DODELETE\""
			     . ($$faxnotify{"DODELETE"} ? " checked=\"checked\" />":" />")),
	      "MAILFROM" => $$faxnotify{"MAILFROM"},
	      "RCPTTO" => $$faxnotify{"RCPTTO"},
	      "FROMHDR" => hdr($$faxnotify{"FROMHDR"}),
	      "TOHDR" => hdr($$faxnotify{"TOHDR"}),
	      "SUBJECTHDR" => hdr($$faxnotify{"SUBJECTHDR"})

	     }
	    );