This file is indexed.

postrm is in mail-stack-delivery 1:2.0.19-0ubuntu1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

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
#!/bin/sh
set -e

POSTFIX_BCKFILE="/var/backups/mail-stack-delivery/main.cf-backup"

PATH=/usr/sbin:$PATH
export PATH

if [ "$1" = "remove" -o "$1" = "purge" ]; then
	# Restore postfix configuration
	if [ "$1" = "remove" ]; then
		if which postconf >/dev/null && [ -f "${POSTFIX_BCKFILE}" ]; then
			while read line; do
				postconf -e "$line"
			done < "${POSTFIX_BCKFILE}"
			rm -f "${POSTFIX_BCKFILE}"
		fi
	fi
    if [ -x "/etc/init.d/dovecot" ]; then
        if [ -x /usr/sbin/invoke-rc.d ]; then
            invoke-rc.d dovecot restart
        else
            service dovecot restart 
        fi
    fi
	if [ -x "/etc/init.d/postfix" ]; then
       	if [ -x /usr/sbin/invoke-rc.d ]; then
            invoke-rc.d postfix restart
       	else
            service postfix restart
       	fi
	fi
fi