You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo -e "\e[33mYour server's public IP uses an AS that is blocked by Spamhaus to use their DNS public blocklists for Postfix.\e[0m"
82
+
echo -e "\e[33mmailcow did not detected a value for the variable SPAMHAUS_DQS_KEY inside mailcow.conf!\e[0m"
83
+
sleep 2
84
+
echo""
85
+
echo -e "\e[33mTo use the Spamhaus DNS Blocklists again, you will need to create a FREE account for their Data Query Service (DQS) at: https://www.spamhaus.com/free-trial/sign-up-for-a-free-data-query-service-account\e[0m"
86
+
echo -e "\e[33mOnce done, enter your DQS API key in mailcow.conf and mailcow will do the rest for you!\e[0m"
87
+
echo""
88
+
sleep 2
89
+
else
90
+
echo -e "\e[33mYour server's public IP uses an AS that is blocked by Spamhaus to use their DNS public blocklists for Postfix.\e[0m"
91
+
echo -e "\e[32mmailcow detected a Value for the variable SPAMHAUS_DQS_KEY inside mailcow.conf. Postfix will use DQS with the given API key...\e[0m"
92
+
fi
93
+
elif [ "$response"-eq 200 ];then
94
+
echo -e "\e[33mCheck completed! Your IP is \e[32mclean\e[0m"
95
+
elif [ "$response"-eq 429 ];then
96
+
echo -e "\e[33mCheck completed! \e[31mYour IP seems to be rate limited on the ASN Check service... please try again later!\e[0m"
97
+
else
98
+
echo -e "\e[31mCheck failed! \e[0mMaybe a DNS or Network problem?\e[0m"
if [[ "$REPOSITORY"=="mailcow/backup"||"$REPOSITORY"=="ghcr.io/mailcow/backup" ]];then
139
+
if [[ "$TAG"!="<none>" ]];then
140
+
continue
141
+
fi
142
+
fi
143
+
144
+
if [[ "${COMPOSE_IMAGES[@]}"=~"${REPOSITORY}:${TAG}" ]];then
145
+
continue
146
+
else
147
+
IMGS_TO_DELETE+=("$ID")
148
+
IMAGES_INFO["$ID"]="$REPOSITORY:$TAG"
149
+
fi
150
+
done
151
+
152
+
if [[ !-z${IMGS_TO_DELETE[*]} ]];then
153
+
echo"The following unused mailcow images were found:"
154
+
foridin"${IMGS_TO_DELETE[@]}";do
155
+
echo"${IMAGES_INFO[$id]} ($id)"
156
+
done
157
+
158
+
if [ -z"$FORCE" ];then
159
+
read -r -p "Do you want to delete them to free up some space? [y/N] " response
160
+
if [[ "$response"=~ ^([yY][eE][sS]|[yY])+$ ]];then
161
+
docker rmi ${IMGS_TO_DELETE[*]}
162
+
else
163
+
echo"OK, skipped."
164
+
fi
165
+
else
166
+
echo"Running in forced mode! Force removing old mailcow images..."
167
+
docker rmi ${IMGS_TO_DELETE[*]}
168
+
fi
169
+
echo -e "\e[32mFurther cleanup...\e[0m"
170
+
echo"If you want to cleanup further garbage collected by Docker, please make sure all containers are up and running before cleaning your system by executing \"docker system prune\""
171
+
fi
172
+
}
173
+
174
+
in_array() {
175
+
local e match="$1"
176
+
shift
177
+
for e;do [[ "$e"=="$match" ]] &&return 0;done
178
+
return 1
179
+
}
180
+
181
+
detect_major_update() {
182
+
if [ ${BRANCH}=="master" ];then
183
+
# Array with major versions
184
+
# Add major versions here
185
+
MAJOR_VERSIONS=(
186
+
"2025-02"
187
+
"2025-03"
188
+
"2025-08"
189
+
)
190
+
191
+
current_version=""
192
+
if [[ -f"${SCRIPT_DIR}/data/web/inc/app_info.inc.php" ]];then
193
+
current_version=$(grep 'MAILCOW_GIT_VERSION'${SCRIPT_DIR}/data/web/inc/app_info.inc.php | sed -E 's/.*MAILCOW_GIT_VERSION="([^"]+)".*/\1/')
0 commit comments