post_install() {
  # /etc/fetchmail must be owned by fetchmail for daemon to work.
  echo "If you run fetchmail as a daemon and not a cron job"
  echo "then 'chown fetchmail /etc/fetchmailrc'"
  getent passwd fetchmail >/dev/null || usr/sbin/useradd -u 90 -g nobody \
      -d '/var/lib/fetchmail' -c 'Fetchmail daemon' -s /bin/false fetchmail
  if [[ ! -d run/fetchmail ]]; then
    usr/bin/systemd-tmpfiles --create fetchmail.conf
  fi
}

post_upgrade() {
  getent passwd fetchmail >/dev/null || usr/sbin/useradd -u 90 -g nobody \
      -d '/var/lib/fetchmail' -c 'Fetchmail daemon' -s /bin/false fetchmail

  if [[ ! -d run/fetchmail ]]; then
    usr/bin/systemd-tmpfiles --create fetchmail.conf
  fi
}
