msmtp-scripts: Fix spool/lock dir permissions
If the spool or lock dir exist before msmtp's initscript runs we need to modify the permisions to be appropriate instead of just bailing, otherwise non-root can't send mail. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
This commit is contained in:
parent
3c15d410a9
commit
b9cc3cf269
1 changed files with 8 additions and 4 deletions
|
@ -4,12 +4,16 @@
|
||||||
START=90
|
START=90
|
||||||
|
|
||||||
boot() {
|
boot() {
|
||||||
[ ! -d /var/spool/msmtp ] && {
|
if [ ! -d /var/spool/msmtp ]; then
|
||||||
mkdir -m1777 -p /var/spool/msmtp
|
mkdir -m1777 -p /var/spool/msmtp
|
||||||
}
|
else
|
||||||
|
chmod 1777 /var/spool/msmtp
|
||||||
|
fi
|
||||||
|
|
||||||
[ ! -d /var/lock/msmtp ] && {
|
if [ ! -d /var/lock/msmtp ]; then
|
||||||
mkdir -m1777 -p /var/lock/msmtp
|
mkdir -m1777 -p /var/lock/msmtp
|
||||||
}
|
else
|
||||||
|
chmod 1777 /var/spool/msmtp
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue