Fix for folder names with spaces
Dieser Commit ist enthalten in:
Ursprung
374e126b35
Commit
376f9361a1
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
|
@ -6,7 +6,7 @@ Enter Dovecot by running `docker-compose exec dovecot-mailcow /bin/bash` in the
|
||||||
|
|
||||||
```
|
```
|
||||||
# Decrypt /var/vmail
|
# Decrypt /var/vmail
|
||||||
for file in $(find /var/vmail/ -type f -regextype egrep -regex '/.*[0-9]{10}.+,.+'); do
|
find /var/vmail/ -type f -regextype egrep -regex '/.*[0-9]{10}.+,.+' | while read file; do
|
||||||
if [[ $(head -c7 "$file") == "CRYPTED" ]]; then
|
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=/ \
|
doveadm fs get crypt private_key_path=/mail_crypt/ecprivkey.pem:public_key_path=/mail_crypt/ecpubkey.pem:posix:prefix=/ \
|
||||||
"$file" > "/tmp/$(basename "$file")"
|
"$file" > "/tmp/$(basename "$file")"
|
||||||
|
@ -17,7 +17,7 @@ fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Encrypt /var/vmail
|
# Encrypt /var/vmail
|
||||||
for file in $(find /var/vmail/ -type f -regextype egrep -regex '/.*[0-9]{10}.+,.+'); do
|
find /var/vmail/ -type f -regextype egrep -regex '/.*[0-9]{10}.+,.+' | while read file; do
|
||||||
if [[ $(head -c7 "$file") != "CRYPTED" ]]; then
|
if [[ $(head -c7 "$file") != "CRYPTED" ]]; then
|
||||||
doveadm fs put crypt private_key_path=/mail_crypt/ecprivkey.pem:public_key_path=/mail_crypt/ecpubkey.pem:posix:prefix=/ \
|
doveadm fs put crypt private_key_path=/mail_crypt/ecprivkey.pem:public_key_path=/mail_crypt/ecpubkey.pem:posix:prefix=/ \
|
||||||
"$file" "$file"
|
"$file" "$file"
|
||||||
|
|
Laden …
In neuem Issue referenzieren