Update u_e-dovecot-mail-crypt.md
Dieser Commit ist enthalten in:
Ursprung
abb2b71e9d
Commit
8c0627a6fc
1 geänderte Dateien mit 7 neuen und 3 gelöschten Zeilen
|
@ -10,9 +10,13 @@ find /var/vmail/ -type f -regextype egrep -regex '.*S=.*W=.*' | while read -r fi
|
|||
if [[ $(head -c7 "$file") == "CRYPTED" ]]; then
|
||||
doveadm fs get crypt private_key_path=/mail_crypt/ecprivkey.pem:public_key_path=/mail_crypt/ecpubkey.pem:posix:prefix=/ \
|
||||
"$file" > "/tmp/$(basename "$file")"
|
||||
if [[ -s "/tmp/$(basename "$file")" ]]; then
|
||||
chmod 600 "/tmp/$(basename "$file")"
|
||||
chown 5000:5000 "/tmp/$(basename "$file")"
|
||||
mv "/tmp/$(basename "$file")" "$file"
|
||||
else
|
||||
rm "/tmp/$(basename "$file")"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
Laden …
In neuem Issue referenzieren