network/opensmtpd: Fixup some spooldir ownership and perms

This should ease the transition for upgrades of earlier versions.

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
Robby Workman 2016-12-25 11:11:37 -06:00 committed by Willy Sudiarto Raharjo
parent ac6fdf8061
commit 68a5cd7330
No known key found for this signature in database
GPG key ID: 887B8374D7333381

View file

@ -140,6 +140,19 @@ sed -i "s,/etc/mail/,/etc/opensmtpd/,g" $PKG/etc/opensmtpd/smtpd.conf.new
# Create (but don't clobber) the aliases file
cat $CWD/aliases > $PKG/etc/opensmtpd/aliases.new
# Create some other required directories with proper ownership and permissions
mkdir -p $PKG/var/spool/smtpd/corrupt $PKG/var/spool/smtpd/incoming \
$PKG/var/spool/smtpd/offline $PKG/var/spool/smtpd/purge \
$PKG/var/spool/smtpd/queue $PKG/var/spool/smtpd/temporary
chown root:smtpq $PKG/var/spool/smtpd/offline
chown smtpq:root $PKG/var/spool/smtpd/corrupt $PKG/var/spool/smtpd/incoming \
$PKG/var/spool/smtpd/purge $PKG/var/spool/smtpd/queue \
$PKG/var/spool/smtpd/temporary
chmod 0700 $PKG/var/spool/smtpd/corrupt $PKG/var/spool/smtpd/incoming \
$PKG/var/spool/smtpd/queue $PKG/var/spool/smtpd/temporary
chmod 0770 $PKG/var/spool/smtpd/offline
chmod 0750 $PKG/var/spool/smtpd/purge
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done