This file is indexed.

/usr/share/pyshared/MailPing/mail.py is in mailping 0.0.4ubuntu5+really0.0.4-3ubuntu1.

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

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
from email.Parser import Parser as EmailParser

def getID(path):
    f = file(path)
    p = EmailParser()
    msg = p.parse(f, True)
    f.close()

    subj = msg.get('Subject')
    if subj is not None:
        if subj.startswith('Mail ping '):
            subj = subj[len('Mail ping '):]
        else:
            subj = None
    return subj

class TemplateMustNotHaveFieldError(Exception):
    """Probe email template must not have this field"""

    def __str__(self):
        return '%s: %r, %r' % (self.__doc__,
                               self[0],
                               self[1])

def setMsgField(msg, field, value):
    if msg[field] is not None:
        raise TemplateMustNotHaveFieldError, (field, msg[field])
        
    msg[field] = value

def setID(msg, ident):
    setMsgField(msg, 'Subject', 'Mail ping %s' % ident)