packages/mail/msmtp-scripts/files/msmtpq-ng-mta.init
Daniel F. Dickinson b9cc3cf269 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>
2019-08-27 06:55:04 -04:00

19 lines
307 B
Bash

#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2016 OpenWrt.org
START=90
boot() {
if [ ! -d /var/spool/msmtp ]; then
mkdir -m1777 -p /var/spool/msmtp
else
chmod 1777 /var/spool/msmtp
fi
if [ ! -d /var/lock/msmtp ]; then
mkdir -m1777 -p /var/lock/msmtp
else
chmod 1777 /var/spool/msmtp
fi
}