postinst is in mysqmail 0.4.9-10.1build1.
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 | #!/bin/sh
set -e
if [ "$1" != "configure" ]; then
exit 0
fi
PATH_CONF_FILE=/etc/mysqmail.conf
. /usr/share/debconf/confmodule
db_version 2.0
db_get mysqmail/conf_mysqlhost
conf_mysql_host=$RET
db_get mysqmail/conf_mysqllogin
conf_mysql_login=$RET
db_get mysqmail/conf_mysqlpass
conf_mysql_pass=$RET
db_get mysqmail/conf_mysqldb
conf_mysql_db=$RET
# Always delete the config file first.
rm -f ${PATH_CONF_FILE}
# Check debconf values.
if [ -z "${conf_mysql_host}" -o -z "${conf_mysql_login}" -o -z "${conf_mysql_pass}" -o -z "${conf_mysql_db}" ] ; then
echo "MySQL debconf configuration missing: will silently exit now."
echo "Please do dpkg-reconfigure mysqmail once DTC is installed in"
echo "order to have mysqmail working."
exit 0
fi
# Make correct unix rights before writing the file
touch ${PATH_CONF_FILE}
chmod 0640 ${PATH_CONF_FILE}
echo "#
# This is the MySQmail config file, parsed using dotconf lib
# Normaly, should be in /etc/mysqmail.conf
#
#
# Mysql server connection stuff (self explanatory)
# Do not edit: use dpkg-reconfigure mysqmail instead!
#
mysql_hostname "${conf_mysql_host}"
mysql_user "${conf_mysql_login}"
mysql_pass "${conf_mysql_pass}"
mysql_db "${conf_mysql_db}"
mysql_table_smtp_logs smtp_logs
mysql_table_pop_access pop_access
mysql_table_scoreboard email_accounting
mysql_table_domain domain
" >${PATH_CONF_FILE}
exit 0
|