This file is indexed.

/usr/share/doc/libnet-imap-perl/examples/imap2.pl is in libnet-imap-perl 0.02-7.

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
#!/usr/bin/perl -wI..

# This example illustrates using a callback to process "list" data.

use Net::IMAP;

my $host = '/usr/sbin/imapd';

my $imap = new Net::IMAP($host, Debug => 0)
  or die("can't connect to $host: $!\n");

$imap->set_untagged_callback('list', \&do_list);

$response = $imap->list('~/Mail/', '%')
  or warn("failed sending list command");
if ($response->status ne 'ok') {
  warn("list command returned ",
       $response->status, " ", $response->text, "\n");
}

$response = $imap->logout or die "error sending logout: $!";

sub do_list {
	my $self = shift;
	my $resp = shift;
	print "List: ", join(',', $resp->mailbox,
				  $resp->delimiter,
				  $resp->flags), "\n";
}