This file is indexed.

postinst is in qmail-run 2.0.2+nmu1.

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
#!/bin/sh
set -e

test "$1" = 'configure' || exit 0

stopinst() {
  cat <<-EOT >&2
	
	The hostname -f command returned: $1
	
	You must have a fully qualified domain name (fqdn) for your system
	to install the qmail and qmail-run packages.
	
	Installation aborted.
	
	EOT
  exit 1
}
	
if test ! -f /etc/aliases; then
  echo "creating default /etc/aliases..."
  cp /usr/share/qmail-run/default/aliases /etc/aliases
fi
if test ! -r /etc/mailname; then
  MAILNAME=`hostname -f`
  echo "$MAILNAME" |grep -F . >/dev/null || stopinst "$MAILNAME"
  echo "creating default /etc/mailname: \"$MAILNAME\"..."
  echo "$MAILNAME" >/etc/mailname
fi
MAILNAME=`cat /etc/mailname`
if test ! -f /var/lib/qmail/control/defaulthost; then
  echo "writing \"$MAILNAME\" to control/defaulthost..."
  echo "$MAILNAME" > /var/lib/qmail/control/defaulthost
fi

for i in root postmaster; do
  test ! -r /var/lib/qmail/alias/.qmail-$i || continue
  cat <<-EOT
	Creating ~alias/.qmail-$i to have mail to $i forwarded to
	  the user alias...
	EOT
  echo '&alias' >/var/lib/qmail/alias/.qmail-$i
done
for i in mailer-daemon abuse; do
  test ! -r /var/lib/qmail/alias/.qmail-$i || continue
  cat <<-EOT
	Creating symbolic link ~alias/.qmail-$i -> .qmail-postmaster.
	EOT
  ln -sf .qmail-postmaster /var/lib/qmail/alias/.qmail-$i
done

qmailctl cdb
newaliases

chown -R qmaill:qmail /var/log/qmail
chmod 2755 /var/log/qmail
chmod 2755 /var/log/qmail/smtpd
chmod 2755 /var/log/qmail/verify

update-service --add /etc/qmail/qmail-send
update-service --add /etc/qmail/qmail-verify
update-service --add /etc/qmail/qmail-smtpd