postinst is in esmtp 1.2-15.
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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | #!/bin/sh
set -e
. /usr/share/debconf/confmodule
db_get esmtp/overwriteconfig
OverwriteConfig="$RET"
if test -s /etc/esmtprc -a "$OverwriteConfig" = "false"
then
exit 0
fi
db_get esmtp/hostname
HostName="$RET"
db_get esmtp/hostport
HostPort="$RET"
db_get esmtp/username
UserName="$RET"
db_get esmtp/password
Password="$RET"
db_get esmtp/starttls
StartTLS="$RET"
db_get esmtp/certificate_passphrase
CertificatePassphrase="$RET"
db_get esmtp/mda
case "$RET" in
procmail)
MDA='/usr/bin/procmail -d %T'
;;
maildrop)
MDA='/usr/bin/maildrop'
;;
esac
exec 1>/etc/esmtprc
if test "$OverwriteConfig" = "true"
then
echo "### This file is auto-generated using debconf on install. ###"
echo "### Any changes made will be overwritten on next upgrade. ###"
echo "#"
fi
echo "# Config file for ESMTP sendmail"
echo
echo "# The SMTP host and service (port)"
echo "hostname=$HostName:$HostPort"
echo
echo "# SECURITY WARNING: Do NOT set username and password in the system wide"
echo "# configuration file unless you are the only user of this machine. See"
echo "# esmtprc(5)."
echo
echo "# The user name"
test -z "$UserName" && echo -n "#"
echo "username=$UserName"
echo
echo "# The password"
test -z "$UserName" && echo -n "#"
echo "password=$Password"
echo
echo "# Whether to use Starttls"
test "$StartTLS" = "disabled" && echo -n "#"
echo "starttls=$StartTLS"
echo
echo "# The certificate passphrase"
test -z "$CertificatePassphrase" && echo -n "#"
echo "certificate_passphrase=$CertificatePassphrase"
echo
echo "# The Mail Delivery Agent"
test -z "$MDA" && echo -n "#"
echo "mda=\"$MDA\""
|