summarylogtreecommitdiffstats
path: root/opensmtpd-git.install
blob: fa48be11860ab8423015164a81bce5480a37ed30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
post_install() {
  if [ $(getent group _smtpd > /dev/null) ]; then
    groupadd -r _smtpd
  fi;
  if [ $(getent passwd _smtpd > /dev/null) ]; then
    useradd -c "SMTPD Daemon" -r -g _smtpd -d /var/empty -s /sbin/nologin _smtpd
  fi;
  if [ $(getent passwd _smtpq > /dev/null) ]; then
    useradd "SMTPD queue user" -r -g _smtpd -d /var/empty -s /sbin/nologin _smtpq
  fi;
  if [ $(getent passwd _smtpf > /dev/null) ]; then
    useradd "SMTPD filter user" -r -g _smtpd -d /var/empty -s /sbin/nologin _smtpq
  fi;

  chown -R _smtpd:_smtpd /etc/mail
}

post_upgrade() {
  post_install
}