This file is indexed.

/usr/share/courier/webadmin/admin-35fax.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
 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
133
134
135
136
137
138
139
140
141
#!/usr/bin/perl
#
# TITLE: Outbound FAX
#
#
# Copyright 2002 Double Precision, Inc.  See COPYING for
# distribution information.

use webadmin;

my $errstr="";
local $changed=0;

if ($cgi->param("Save"))
{
  my $rc="";

  if ($cgi->param("DIALPLAN") eq "NANPA")
    {
      my $areacode=$cgi->param("nanpa_areacode");
      my @areacode10=grep(/./, split (/\s+/, $cgi->param("nanpa_10digit")));
      my $local_pfix=$cgi->param("nanpa_local_prefix");
      my $long_pfix=$cgi->param("nanpa_long_prefix");
      my $intl_pfix=$cgi->param("nanpa_intl_prefix");

      $areacode =~ s/\s//g;
      $local_pfix =~ s/\s//g;
      $long_pfix =~ s/\s//g;
      $intl_pfix =~ s/\s//g;

      $errstr =~ "\@BADAREACODE\@" unless $areacode =~ /^\d\d\d$/;

      $errstr =~ "\@BADPREFIX\@" if $local_pfix =~ /^1/;

      grep {
	$errstr =~ "\@BADAREACODE\@" unless $_ =~ /^\d\d\d$/;}
	@areacode10;

      $rc .= "webadmin-dialplan      nanpa\n\n" .
	"webadmin-nanpa-areacode     $areacode\n" .
	"webadmin-nanpa-10digit      " . join("-", @areacode10) . "\n" .
	"webadmin-nanpa-local-prefix $local_pfix\n" .
	"webadmin-nanpa-long-prefix  $long_pfix\n" .
	"webadmin-nanpa-intl-prefix  $intl_pfix\n" .
	"webadmin-nanpa-local-011    " . ($cgi->param("nanpa_local_011")
					  ? "1\n":"\n") .
	"webadmin-nanpa-esmtp-011    " . ($cgi->param("nanpa_esmtp_011")
					  ? "1\n\n":"\n\n");

      $rc .= "rw^*    1               \$9\n";
      $rc .= "rw^     011             1011\$9\n";
      $rc .= "rw^     n11             1\n";
      $rc .= "rw^     1011            011\$9\n";
      $rc .= "rw      (nnnnnnn)       $areacode\$1\n";

      foreach ("2", "3", "4", "5", "6", "7", "8", "9")
	{
	  $rc .= "accept   $_" . "nnnnnnnnn   local\n";
	  $rc .= "accept   $_" . "nnnnnnnnn   esmtp\n";
	}

      $rc .= "accept^ 011    local\n" if $cgi->param("nanpa_local_011");
      $rc .= "accept^ 011    esmtp\n" if $cgi->param("nanpa_esmtp_011");

      $rc .= "rw^    (.)       1\$1\$9\n";
      $rc .= "rw^    1011      011\$9\n";

      if ($#areacode10 < 0)
	{
	  $rc .= "rw^    1$areacode      $local_pfix\$9\n";
	}
      else
	{
	  $rc .= "rw^    1$areacode      $local_pfix$areacode\$9\n";
	}

      foreach (@areacode10)
	{
	  $rc .= "rw^    1$_      $local_pfix$_\$9\n";
	}

      $rc .= "rw^    1         $long_pfix\$9\n";
      $rc .= "rw^    011       $intl_pfix" . "011\$9\n";
    }
  else
    {
      $rc .= "webadmin-dialplan\tother\n\n" .

	"accept^  .    local\n" .
	"accept^  .    esmtp\n";
    }

  unless ($errstr =~ /./)
    {
      my %section;

      $section{'faxrc'}=$rc;

      SaveKWConfigFile("faxrc", \%section);
      changed("courier restart");
      $changed=1;
    }
}

$errstr="\@SAVED\@" if $changed;

my $faxrc=ReadKWConfigFile("faxrc");

$$faxrc{"webadmin-nanpa-local-prefix"} =~ s/\@/\&#64;/g;
$$faxrc{"webadmin-nanpa-long-prefix"} =~ s/\@/\&#64;/g;
$$faxrc{"webadmin-nanpa-intl-prefix"} =~ s/\@/\&#64;/g;
$$faxrc{"webadmin-nanpa-10digit"} =~ s/-/ /g;

display_form("admin-35fax.html",
	     {

	      "DIALNANPA" => ('<input type="radio" name="DIALPLAN" value="NANPA"'
			      . ($$faxrc{"webadmin-dialplan"} eq "nanpa" ?
				 " checked=\"checked\" />":" />")),
	      "DIALOTHER" => ('<input type="radio" name="DIALPLAN" value="OTHER"'
			      . ($$faxrc{"webadmin-dialplan"} eq "other" ?
				 " checked=\"checked\" />":" />")),
	      "NANPA_AREACODE" => $$faxrc{"webadmin-nanpa-areacode"},
	      "NANPA_10DIGIT" => $$faxrc{"webadmin-nanpa-10digit"},
	      "NANPA_LOCAL_PREFIX" => $$faxrc{"webadmin-nanpa-local-prefix"},
	      "NANPA_LONG_PREFIX" => (
				      $$faxrc{"webadmin-nanpa-long-prefix"} ?
				      $$faxrc{"webadmin-nanpa-long-prefix"}:"1"
				     ),
	      "NANPA_INTL_PREFIX" => $$faxrc{"webadmin-nanpa-intl-prefix"},

	      "NANPA_LOCAL_011" =>
	      ('<input type="checkbox" name="nanpa_local_011"'
	       . ( $$faxrc{"webadmin-nanpa-local-011"} ? " checked=\"checked\" />":" />")),
	      "NANPA_ESMTP_011" =>
	      ('<input type="checkbox" name="nanpa_esmtp_011"'
	       . ( $$faxrc{"webadmin-nanpa-esmtp-011"} ? " checked=\"checked\" />":" />")),

	      "ERROR" => $errstr
	     }
	    );