postinst is in smartlist 3.15-25build1.
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 57  | #!/bin/sh
set -e
LISTHOME="/var/list"
LISTID=38
if [ ! -f $LISTHOME/.etc/rc.init ]; then
  if [ -f /etc/mailname ]; then
    HOST="`cat /etc/mailname`"
  else
    HOST="`hostname --fqdn`"
  fi
  cat $LISTHOME/.etc/rc.init.dist | sed \
    -e "s/listmaster=/listmaster=listman/g" \
    -e "s/INSERT.YOUR.MAIL.DOMAIN.HERE/$HOST/g" \
    > $LISTHOME/.etc/rc.init
  chown list:list $LISTHOME/.etc/rc.init
fi
if ! grep -q "^# ---SmartList" /etc/aliases; then
cat << FIN >> /etc/aliases
# ---SmartList Begin
listman:	root
# Please, put list aliases here, and don't delete Begin or End lines.
# This way they will removed automatically if you purge this package.
# ---SmartList End
FIN
set +e
newaliases
set -e
fi
true
if dpkg --compare-versions "$2" lt-nl "3.15-21"; then
  awk '
  {
    if ($0 ~ "^listaddr=") {
      print "listid=$list.$domain"
      print $0
    }
    else {
      print $0
    }
  }' $LISTHOME/.etc/rc.init > $LISTHOME/.etc/rc.init.updated
  mv $LISTHOME/.etc/rc.init.updated $LISTHOME/.etc/rc.init
  chown list:list $LISTHOME/.etc/rc.init
fi
if [ "$1" = "configure" ] && [ "$2" = "" ]; then
  if [ ! -f $LISTHOME/.etc/reject ]; then
    touch $LISTHOME/.etc/reject
    chown list:list $LISTHOME/.etc/reject
    chmod 660 $LISTHOME/.etc/reject
  fi
fi
 |