This file is indexed.

postinst is in postgrey 1.35-1.

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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#! /bin/sh
# postinst script for postgrey

set -e

# lintian: postinst-does-not-load-confmodule
. /usr/share/debconf/confmodule

case "$1" in
    configure)
        DBDIR='/var/lib/postgrey'

        getent passwd postgrey > /dev/null || \
            adduser --system --home "$DBDIR" --no-create-home \
                    --disabled-password --group postgrey
        # migration from old 'nogroup' postgrey (1.23-1 and earlier):
        getent group postgrey > /dev/null || \
            addgroup --system postgrey

        install -d -o postgrey -g postgrey -m 0700 "$DBDIR"

        ucf --debconf-ok --three-way \
            /usr/share/postgrey/whitelist_clients \
            /etc/postgrey/whitelist_clients
        ucf --debconf-ok --debconf-ok --three-way \
            /usr/share/postgrey/whitelist_recipients \
            /etc/postgrey/whitelist_recipients
        ucf --debconf-ok --three-way \
            /usr/share/postgrey/postgrey-default \
            /etc/default/postgrey
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)

    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

# Automatically added by dh_installinit
if [ -x "/etc/init.d/postgrey" ]; then
	update-rc.d postgrey defaults >/dev/null
fi
if [ -x "/etc/init.d/postgrey" ] || [ -e "/etc/init/postgrey.conf" ]; then
	invoke-rc.d postgrey start || exit $?
fi
# End automatically added section


# without this, debconf hangs after end of postinst.
db_stop

exit 0