postinst is in spamassassin 3.3.2-2ubuntu1.
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  | #!/bin/sh
set -e
sa_compile() {
    # Compile, if rules have previously been compiled, and it's possible
    if [ -x /usr/bin/re2c -a -x /usr/bin/sa-compile -a -d /var/lib/spamassassin/compiled ]; then
        echo "Running sa-compile (may take a long time)"
        sa-compile --quiet
    fi
}
sa_fix_broken_gpg_key () {
    # Work around broken key caused by gpg upgrade
    if [ -f /etc/spamassassin/sa-update-keys/pubring.gpg -a -f /usr/share/doc/spamassassin/GPG.KEY ]; then
        sa-update --import /usr/share/doc/spamassassin/GPG.KEY
    fi
}
if [ "$1" = "configure" ]; then
    sa_compile
    sa_fix_broken_gpg_key
fi
if [ "$1" = "triggered" ] && [ "$2" = "perl-major-upgrade" ]; then
    sa_compile
    invoke-rc.d spamassassin restart
fi
# Automatically added by dh_installinit
if [ -x "/etc/init.d/spamassassin" ]; then
	if [ ! -e "/etc/init/spamassassin.conf" ]; then
		update-rc.d spamassassin defaults 19 21 >/dev/null
	fi
	invoke-rc.d spamassassin start || exit $?
fi
# End automatically added section
 |