imap-download: chown maildir to fetchmail

This commit is contained in:
Starbeamrainbowlabs 2021-05-26 22:20:22 +01:00
parent 43f0bc8026
commit 05b3936940
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -13,7 +13,8 @@ if [[ "${EUID}" -ne 0 ]]; then
exit 1; exit 1;
fi fi
dir_newmail="/tmp/maildir/Mail/new"; dir_mail_root="/tmp/maildir";
dir_newmail="${dir_mail_root}/Mail/new";
target_dir="/mnt/output"; target_dir="/mnt/output";
fetchmail_uid="$(id -u "fetchmail")"; fetchmail_uid="$(id -u "fetchmail")";
@ -70,6 +71,7 @@ log_msg() {
mkdir -p "${dir_newmail}"; 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. # Moves an attachment to the output directory as the target uid/gid.
# chowns the file before moving. # chowns the file before moving.