156 lines
6.8 KiB
Text
156 lines
6.8 KiB
Text
case "${ACTION}" in
|
|
post)
|
|
# a shell version of hier.c
|
|
set -e
|
|
chownmod() { chown $1 $3 && chmod $2 $3; }
|
|
|
|
install -d -m0755 -o root -g _sqmail var/qmail
|
|
|
|
install -d -m0755 -o root -g _sqmail etc/qmail
|
|
install -d -m2755 -o _alias -g _sqmail etc/qmail/alias
|
|
install -d -m0755 -o root -g _sqmail etc/qmail/control
|
|
install -d -m0755 -o root -g _sqmail etc/qmail/users
|
|
install -d -m0700 -o _sqmtls -g _nofiles etc/qmail/ssl
|
|
|
|
install -d -m0750 -o _qmailq -g _sqmail var/qmail/queue
|
|
install -d -m0700 -o _qmailq -g _sqmail var/qmail/queue/pid
|
|
install -d -m0700 -o _qmailq -g _sqmail var/qmail/queue/intd
|
|
install -d -m0750 -o _qmailq -g _sqmail var/qmail/queue/todo
|
|
install -d -m0700 -o _qmails -g _sqmail var/qmail/queue/bounce
|
|
|
|
install -d -m0750 -o _qmailq -g _sqmail var/qmail/queue/mess
|
|
install -d -m0700 -o _qmails -g _sqmail var/qmail/queue/info
|
|
install -d -m0700 -o _qmails -g _sqmail var/qmail/queue/local
|
|
install -d -m0700 -o _qmails -g _sqmail var/qmail/queue/remote
|
|
|
|
for i in $(seq 0 22); do
|
|
install -d -m0750 -o _qmailq -g _sqmail var/qmail/queue/mess/$i
|
|
install -d -m0750 -o _qmailq -g _sqmail var/qmail/queue/todo/$i
|
|
install -d -m0700 -o _qmailq -g _sqmail var/qmail/queue/intd/$i
|
|
install -d -m0700 -o _qmails -g _sqmail var/qmail/queue/info/$i
|
|
install -d -m0700 -o _qmails -g _sqmail var/qmail/queue/local/$i
|
|
install -d -m0700 -o _qmails -g _sqmail var/qmail/queue/remote/$i
|
|
done
|
|
|
|
install -d -m0750 -o _qmailq -g _sqmail var/qmail/queue/lock
|
|
[ -f var/qmail/queue/lock/tcpto ] ||
|
|
dd if=/dev/zero bs=1024 count=1 status=none |
|
|
install -m0644 -o _qmailr -g _sqmail /dev/stdin var/qmail/queue/lock/tcpto
|
|
[ -f var/qmail/queue/lock/sendmutex ] ||
|
|
install -m0600 -o _qmails -g _sqmail /dev/null var/qmail/queue/lock/sendmutex
|
|
[ -p var/qmail/queue/lock/trigger ] || mkfifo var/qmail/queue/lock/trigger
|
|
chownmod _qmails:_sqmail 0622 var/qmail/queue/lock/trigger
|
|
|
|
chownmod _qmailq:_sqmail 4711 usr/bin/qmail-queue
|
|
chownmod root:_sqmail 0700 usr/bin/qmail-lspawn
|
|
chownmod root:_sqmail 0700 usr/bin/qmail-start
|
|
chownmod root:_sqmail 0711 usr/bin/qmail-getpw
|
|
chownmod root:_sqmail 0711 usr/bin/qmail-local
|
|
chownmod root:_sqmail 0711 usr/bin/qmail-remote
|
|
chownmod root:_sqmail 0711 usr/bin/qmail-smtpam
|
|
chownmod root:_sqmail 0711 usr/bin/qmail-rspawn
|
|
chownmod root:_sqmail 0711 usr/bin/qmail-clean
|
|
chownmod root:_sqmail 0711 usr/bin/qmail-send
|
|
chownmod root:_sqmail 0711 usr/bin/qmail-todo
|
|
chownmod root:_sqmail 0711 usr/bin/splogger
|
|
chownmod root:_sqmail 0700 usr/bin/qmail-newu
|
|
chownmod root:_sqmail 0700 usr/bin/qmail-newmrh
|
|
|
|
chownmod root:_sqmail 6711 usr/bin/qmail-authuser
|
|
chownmod root:_sqmail 6711 usr/bin/qmail-vmailuser
|
|
chownmod root:_sqmail 0711 usr/bin/qmail-badloadertypes
|
|
chownmod root:_sqmail 0711 usr/bin/qmail-badmimetypes
|
|
chownmod root:_sqmail 0711 usr/bin/qmail-recipients
|
|
chownmod root:_sqmail 0711 usr/bin/qmail-mfrules
|
|
chownmod root:_sqmail 0755 usr/bin/qmail-mrtg
|
|
chownmod root:_sqmail 0755 usr/bin/qmail-mrtg-queue
|
|
|
|
chownmod root:_sqmail 0711 usr/bin/qmail-pw2u
|
|
chownmod root:_sqmail 0755 usr/bin/qmail-inject
|
|
chownmod root:_sqmail 0755 usr/bin/qmail-showctl
|
|
chownmod root:_sqmail 0755 usr/bin/qmail-qread
|
|
chownmod root:_sqmail 0755 usr/bin/qmail-qstat
|
|
chownmod root:_sqmail 0755 usr/bin/qmail-tcpto
|
|
chownmod root:_sqmail 0755 usr/bin/qmail-tcpok
|
|
chownmod root:_sqmail 0755 usr/bin/qmail-pop3d
|
|
chownmod root:_sqmail 0711 usr/bin/qmail-popup
|
|
chownmod root:_sqmail 0755 usr/bin/qmail-qmqpc
|
|
chownmod root:_sqmail 0755 usr/bin/qmail-qmqpd
|
|
chownmod root:_sqmail 0755 usr/bin/qmail-qmtpd
|
|
chownmod root:_sqmail 0755 usr/bin/qmail-smtpd
|
|
|
|
chownmod root:_sqmail 0755 usr/bin/predate
|
|
chownmod root:_sqmail 0755 usr/bin/datemail
|
|
chownmod root:_sqmail 0755 usr/bin/mailsubj
|
|
chownmod root:_sqmail 0755 usr/bin/sendmail
|
|
chownmod root:_sqmail 0755 usr/bin/qreceipt
|
|
|
|
chownmod root:_sqmail 0755 usr/bin/qbiff
|
|
chownmod root:_sqmail 0755 usr/bin/forward
|
|
chownmod root:_sqmail 0755 usr/bin/preline
|
|
chownmod root:_sqmail 0755 usr/bin/condredirect
|
|
chownmod root:_sqmail 0755 usr/bin/bouncesaying
|
|
chownmod root:_sqmail 0755 usr/bin/except
|
|
chownmod root:_sqmail 0755 usr/bin/maildirmake.sqmail
|
|
chownmod root:_sqmail 0755 usr/bin/maildir2mbox
|
|
chownmod root:_sqmail 0755 usr/bin/maildirwatch
|
|
|
|
chownmod root:_sqmail 0755 usr/bin/fastforward
|
|
chownmod root:_sqmail 0755 usr/bin/printforward
|
|
chownmod root:_sqmail 0755 usr/bin/setforward
|
|
chownmod root:_sqmail 0755 usr/bin/newaliases
|
|
chownmod root:_sqmail 0755 usr/bin/printmaillist
|
|
chownmod root:_sqmail 0755 usr/bin/setmaillist
|
|
chownmod root:_sqmail 0755 usr/bin/newinclude
|
|
|
|
chownmod root:_sqmail 0755 usr/bin/srsforward
|
|
chownmod root:_sqmail 0755 usr/bin/srsreverse
|
|
|
|
chownmod root:_sqmail 0755 usr/bin/ipmeprint
|
|
chownmod root:_sqmail 0755 usr/bin/spfquery
|
|
chownmod root:_sqmail 0755 usr/bin/dnscname
|
|
chownmod root:_sqmail 0755 usr/bin/dnsfq
|
|
chownmod root:_sqmail 0755 usr/bin/dnsip
|
|
chownmod root:_sqmail 0755 usr/bin/dnsmxip
|
|
chownmod root:_sqmail 0755 usr/bin/dnsptr
|
|
chownmod root:_sqmail 0755 usr/bin/dnstxt
|
|
chownmod root:_sqmail 0755 usr/bin/hostname
|
|
|
|
chownmod root:_sqmail 0755 usr/bin/columnt
|
|
chownmod root:_sqmail 0755 usr/bin/ddist
|
|
chownmod root:_sqmail 0755 usr/bin/deferrals
|
|
chownmod root:_sqmail 0755 usr/bin/failures
|
|
chownmod root:_sqmail 0755 usr/bin/matchup
|
|
chownmod root:_sqmail 0755 usr/bin/recipients
|
|
chownmod root:_sqmail 0755 usr/bin/rhosts
|
|
chownmod root:_sqmail 0755 usr/bin/rxdelay
|
|
chownmod root:_sqmail 0755 usr/bin/senders
|
|
chownmod root:_sqmail 0755 usr/bin/successes
|
|
chownmod root:_sqmail 0755 usr/bin/suids
|
|
chownmod root:_sqmail 0755 usr/bin/tai64nfrac
|
|
chownmod root:_sqmail 0755 usr/bin/xqp
|
|
chownmod root:_sqmail 0755 usr/bin/xrecipient
|
|
chownmod root:_sqmail 0755 usr/bin/xsender
|
|
chownmod root:_sqmail 0755 usr/bin/zddist
|
|
chownmod root:_sqmail 0755 usr/bin/zdeferrals
|
|
chownmod root:_sqmail 0755 usr/bin/zfailures
|
|
chownmod root:_sqmail 0755 usr/bin/zfailures
|
|
chownmod root:_sqmail 0755 usr/bin/zoverall
|
|
chownmod root:_sqmail 0755 usr/bin/zrecipients
|
|
chownmod root:_sqmail 0755 usr/bin/zrhosts
|
|
chownmod root:_sqmail 0755 usr/bin/zrxdelay
|
|
chownmod root:_sqmail 0755 usr/bin/zsenders
|
|
chownmod root:_sqmail 0755 usr/bin/zsendmail
|
|
chownmod root:_sqmail 0755 usr/bin/zsuccesses
|
|
chownmod root:_sqmail 0755 usr/bin/zsuids
|
|
|
|
ln -sf ../../usr/bin var/qmail/bin
|
|
ln -sf ../../etc/qmail/alias var/qmail/alias
|
|
ln -sf ../../etc/qmail/control var/qmail/control
|
|
ln -sf ../../etc/qmail/users var/qmail/users
|
|
ln -sf ../../etc/qmail/ssl var/qmail/ssl
|
|
ln -sf ../../etc/sv var/qmail/svc
|
|
chgrp -h _sqmail var/qmail/bin var/qmail/alias var/qmail/control \
|
|
var/qmail/users var/qmail/ssl var/qmail/svc
|
|
;;
|
|
esac
|