dot

packages and services management
Log | Files | Refs | README

commit 33d2f9549fc6978e90423ce887cee29b00a71c8c
parent 215b12bd8f891d0f192038cc4c541e213b7012d5
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun, 30 Dec 2018 16:59:31 +0100

make sure the premissions of qmail queue are fine

Diffstat:
Mbin/s6-mk-build | 2+-
Metc/s6-mk/qmail-send/default/setup | 60+++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
2 files changed, 56 insertions(+), 6 deletions(-)

diff --git a/bin/s6-mk-build b/bin/s6-mk-build @@ -51,5 +51,5 @@ ifthenelse { test ${type} = longrun } { cd ${sv},x forx -o 0 x { default ${modules} } importas mod x -if -t { test -f /etc/s6-mk/${base}/setup } +if -t { test -f /etc/s6-mk/${base}/${mod}/setup } /etc/s6-mk/${base}/${mod}/setup diff --git a/etc/s6-mk/qmail-send/default/setup b/etc/s6-mk/qmail-send/default/setup @@ -27,8 +27,58 @@ if { chgrp -R ${GROUP} /var/qmail } cd /var/qmail -cd queue -if { chmod -R 750 mess todo } -if { chmod -R 700 info intd local remote } -if { chown -R qmailq:${GROUP} mess intd } -if { chown -R qmails:${GROUP} info local remote todo } +if { chgrp -R sqmail . } + +if { chown -R alias alias } +if { find alias -type d -exec chmod 750 {} + } +if { find alias -type f -exec chmod 640 {} + } + +if { chown -R root control } +if { find control -type d -exec chmod 750 {} + } +if { find control -type f -exec chmod 640 {} + } + +if { chown qmailq queue } +if { chmod 750 queue } + +if { chown -R qmails queue/bounce } +if { find queue/bounce -type d -exec chmod 700 {} + } +if { find queue/bounce -type f -exec chmod 600 {} + } + +if { chown -R qmails queue/info } +if { find queue/info -type d -exec chmod 700 {} + } +if { find queue/info -type f -exec chmod 600 {} + } + +if { chown -R qmailq queue/intd } +if { find queue/intd -type d -exec chmod 700 {} + } +if { find queue/intd -type f -exec chmod 600 {} + } + +if { chown -R qmails queue/local } +if { find queue/local -type d -exec chmod 700 {} + } +if { find queue/local -type f -exec chmod 600 {} + } + +if { chown qmailq queue/lock } +if { chmod 750 queue/lock } + +if { chown -R qmails queue/lock/sendmutex } +if { chmod 600 queue/lock/sendmutex } + +if { chown qmailr queue/lock/tcpto } +if { chmod 644 queue/lock/tcpto } + +if { chown -R qmails queue/lock/trigger } +if { chmod 622 queue/lock/trigger } + +if { chown -R qmailq queue/mess } +if { find queue/mess -type d -exec chmod 750 {} + } +if { find queue/mess -type f -exec chmod 640 {} + } + +if { chown -R qmailq queue/pid } +if { chmod 700 queue/pid } + +if { chown -R qmails queue/remote } +if { find queue/remote -type d -exec chmod 700 {} + } +if { find queue/remote -type f -exec chmod 600 {} + } + +if { chown -R qmailq queue/todo } +if { find queue/todo -type d -exec chmod 750 {} + } +if { find queue/todo -type f -exec chmod 640 {} + }