* update.sh: precaution ask for deletion of dns_blocklists.cf if old format (#6154)

* [Web] Updated lang.zh-cn.json (#6151)

[Web] Updated lang.zh-cn.json

Co-authored-by: Easton Man <me@eastonman.com>

* compose: bump sogo version to include 5.11.2 (#6156)

* php: use correct php image + workaround of #6149 (#6159)

* compose: bump php-fpm container to correctly use patched c-ares

* [Web] check $containers_info contains required fields

---------

Co-authored-by: FreddleSpl0it <patschul@posteo.de>

---------

Co-authored-by: milkmaker <milkmaker@mailcow.de>
Co-authored-by: Easton Man <me@eastonman.com>
Co-authored-by: FreddleSpl0it <patschul@posteo.de>
This commit is contained in:
Niklas Meyer
2024-11-12 15:57:17 +01:00
committed by GitHub
parent 0a58aa293a
commit 4d688c5500
4 changed files with 168 additions and 33 deletions

View File

@@ -275,6 +275,34 @@ detect_bad_asn() {
fi
}
fix_broken_dnslist_conf() {
# Fixing issue: #6143. To be removed in a later patch
local file="${SCRIPT_DIR}/data/conf/postfix/dns_blocklists.cf"
# Check if the file exists
if [[ ! -f "$file" ]]; then
return 1
fi
# Check if the file contains the autogenerated comment
if grep -q "# Autogenerated by mailcow" "$file"; then
# Ask the user if custom changes were made
echo -e "\e[91mWARNING!!! \e[31mAn old version of dns_blocklists.cnf has been detected which may cause a broken postfix upon startup (see: https://github.com/mailcow/mailcow-dockerized/issues/6143)...\e[0m"
echo -e "\e[31mIf you have any custom settings in there you might copy it away and adapt the changes after the file is regenerated...\e[0m"
read -p "Do you want to delete the file now and let mailcow regenerate it properly? " response
if [[ "${response}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
rm "$file"
echo -e "\e[32mdns_blocklists.cf has been deleted and will be properly regenerated"
return 0
else
echo -e "\e[35mOk, not deleting it! Please make sure you take a look at postfix upon start then..."
return 2
fi
fi
}
############## End Function Section ##############
# Check permissions
@@ -437,6 +465,8 @@ source mailcow.conf
detect_docker_compose_command
fix_broken_dnslist_conf
DOTS=${MAILCOW_HOSTNAME//[^.]};
if [ ${#DOTS} -lt 1 ]; then
echo -e "\e[31mMAILCOW_HOSTNAME (${MAILCOW_HOSTNAME}) is not a FQDN!\e[0m"