imap-download: chown maildir to fetchmail
This commit is contained in:
parent
43f0bc8026
commit
05b3936940
1 changed files with 3 additions and 1 deletions
|
@ -13,7 +13,8 @@ if [[ "${EUID}" -ne 0 ]]; then
|
|||
exit 1;
|
||||
fi
|
||||
|
||||
dir_newmail="/tmp/maildir/Mail/new";
|
||||
dir_mail_root="/tmp/maildir";
|
||||
dir_newmail="${dir_mail_root}/Mail/new";
|
||||
target_dir="/mnt/output";
|
||||
|
||||
fetchmail_uid="$(id -u "fetchmail")";
|
||||
|
@ -70,6 +71,7 @@ log_msg() {
|
|||
|
||||
|
||||
mkdir -p "${dir_newmail}";
|
||||
chown -R "${fetchmail_uid}:${fetchmail_gid}" "${dir_mail_root}";
|
||||
|
||||
# Moves an attachment to the output directory as the target uid/gid.
|
||||
# chowns the file before moving.
|
||||
|
|
Loading…
Reference in a new issue