This file is indexed.

/usr/share/doc/iselect/examples/melm/melm is in iselect 1.4.0-3.

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
#!/usr/bin/perl
##
##  MetaELM -- ELM frontend
##  Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved. 
##

require 5.003;

use Date::Parse;
use Date::Format;

#
#   configuration
#
$melmrc = "$ENV{'HOME'}/.melmrc";

#
#   read rc-file
#
if (not -f $melmrc) {
    print STDERR "** mElm:Error: no ``$melmrc'' found. Please create one first.\n";
    exit(1);
}
@MAILFOLDER = ();
open(RC, "<$melmrc") || die;
while (<RC>) {
    next if (m|^\s*$|);
    next if (m|^\s*#.*$|);
    if (m|^\s*(/\S+)\s+(.+?)\s*$|) {
        push(@MAILFOLDER, { FOLDER => $1, NAME => $2 });
    }
    else {
        print STDERR "** mElm:Error: bad RC-file entry:\n";
        print STDERR "** mElm:Error: $_";
        exit(1);
    }
}
close(RC);

#
#   determine informations
#
foreach $entry (@MAILFOLDER) {
    ($name, $folder) = ($entry->{NAME}, $entry->{FOLDER});
    @F = `from -f $folder`;
    $time = $F[$#F];
    $time =~ s|^From\s+\S+\s+(.+)\s*|$1|;
    $time = str2time($time);
    $entry->{TIME} = $time;
    $entry->{MAILS} = $#F+1;
}

#
#   processing loop
#
$pos = 4;
while (1) {
    $L = '"" ' .
         '"Available Folders: '. sprintf("%d", $#MAILFOLDER + 1) .'" ' .
         '"" ';
    $n = 1;
    foreach $entry (@MAILFOLDER) {
        ($name, $folder, $time, $mails) = 
            ($entry->{NAME}, $entry->{FOLDER}, $entry->{TIME}, $entry->{MAILS});
        $L .= sprintf("\"%2d  %-20s  (%3d) %s %2d <S:elm -f $folder>\" ", $n++, $name, $mails, time2str("%a", $time), time2str("%d", $time));
    }
    $L .= "'' ";
    $L .= "'_____________________________________________________' ";
    $L .= "'' ";
    $L .= "'Help: <up>,<down> .......... browse folder list' ";
    $L .= "'      <return>,<right> ..... select folder (run ELM)' ";
    $L .= "'      q,<left> ............. quit' ";

    $rc=`iselect -n "MetaELM 1.0.0" -t "Electronic Mail Folders" -p$pos -P $L`;
    if ($rc eq '') {
        print "**Exit\n";
        last;
    }
    $rc =~ m|^(\d+):(.*)|;
    ($pos, $cmd) = ($1, $2);
    system($cmd);

    #   update entry
    $entry = $MAILFOLDER[$pos-4];
    $folder = $entry->{FOLDER};
    @F = `from -f $folder`;
    $time = $F[$#F];
    $time =~ s|^From\s+\S+\s+(.+)\s*|$1|;
    $time = str2time($time);
    $entry->{TIME} = $time;
    $entry->{MAILS} = $#F+1;
}

#   die gracefully
exit(0);

##EOF##