Skip to content

Commit 4d688c5

Browse files
DerLinkmanmilkmakereastonmanFreddleSpl0it
authored
2024-11a (#6160)
* 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 <[email protected]> * 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 <[email protected]> --------- Co-authored-by: milkmaker <[email protected]> Co-authored-by: Easton Man <[email protected]> Co-authored-by: FreddleSpl0it <[email protected]>
1 parent 0a58aa2 commit 4d688c5

File tree

4 files changed

+168
-33
lines changed

4 files changed

+168
-33
lines changed

data/web/debug.php

+13-9
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@
2323
$vmail_df = explode(',', (string)json_decode(docker('post', 'dovecot-mailcow', 'exec', $exec_fields), true));
2424

2525
// containers
26-
$containers = (array) docker('info');
27-
if ($clamd_status === false) unset($containers['clamd-mailcow']);
28-
if ($solr_status === false) unset($containers['solr-mailcow']);
29-
ksort($containers);
30-
foreach ($containers as $container => $container_info) {
26+
$containers_info = (array) docker('info');
27+
if ($clamd_status === false) unset($containers_info['clamd-mailcow']);
28+
if ($solr_status === false) unset($containers_info['solr-mailcow']);
29+
ksort($containers_info);
30+
$containers = array();
31+
foreach ($containers_info as $container => $container_info) {
32+
if (!isset($container_info['State']) || !is_array($container_info['State']) || !isset($container_info['State']['StartedAt'])){
33+
continue;
34+
}
3135
date_default_timezone_set('UTC');
3236
$StartedAt = date_parse($container_info['State']['StartedAt']);
3337
if ($StartedAt['hour'] !== false) {
@@ -42,15 +46,15 @@
4246
try {
4347
$user_tz = new DateTimeZone(getenv('TZ'));
4448
$date->setTimezone($user_tz);
45-
$started = $date->format('r');
49+
$container_info['State']['StartedAtHR'] = $date->format('r');
4650
} catch(Exception $e) {
47-
$started = '?';
51+
$container_info['State']['StartedAtHR'] = '?';
4852
}
4953
}
5054
else {
51-
$started = '?';
55+
$container_info['State']['StartedAtHR'] = '?';
5256
}
53-
$containers[$container]['State']['StartedAtHR'] = $started;
57+
$containers[$container] = $container_info;
5458
}
5559

5660
// get mailcow data

data/web/lang/lang.zh-cn.json

+123-22
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"exclude": "拒绝对象 (Regex)",
6464
"full_name": "全称",
6565
"gal": "全球地址簿",
66-
"gal_info": "<b>全球地址簿</b>包含了域名下的所有对象,并且此行为不能被用户更改。如果关闭,用户的 \"空闲/繁忙\" 的状态将无法在 SOGo 中显示。 <b>重启 SOGo 服务以应用更改。</b>",
66+
"gal_info": "全球地址簿包含了域名下的所有对象,并且此行为不能被用户更改。如果关闭,用户的 \"空闲/繁忙\" 的状态将无法在 SOGo 中显示。 <b>重启 SOGo 服务以应用更改。</b>",
6767
"generate": "生成",
6868
"goto_ham": "学习为<span class=\"text-success\"><b>非垃圾邮件</b></span>",
6969
"goto_null": "静默丢弃邮件",
@@ -146,7 +146,7 @@
146146
"arrival_time": "到达时间 (服务器时间)",
147147
"authed_user": "已认证用户",
148148
"ays": "确定继续操作?",
149-
"ban_list_info": "以下为被封禁的 IP 列表: <b>网络 (剩余封禁时间) - [操作]</b>。<br />被取消封禁的 IP 将会在几秒之内从封禁列表中移除<br />红色标签表示因黑名单而导致的永久封禁",
149+
"ban_list_info": "以下为被封禁的 IP 列表: <b>网络 (剩余封禁时间) - [操作]</b>。<br />被取消封禁的 IP 将会在几秒之内从封禁列表中移除<br />红色标签表示因黑名单而导致的永久封禁",
150150
"change_logo": "更改 Logo",
151151
"configuration": "配置",
152152
"convert_html_to_text": "将 HTML 转换为纯文本内容",
@@ -292,7 +292,7 @@
292292
"rsettings_preset_2": "允许管理员接收垃圾邮件",
293293
"rsettings_preset_3": "只允许指定的发件人发信 (例如只允许内部邮箱发送)",
294294
"rsettings_preset_4": "禁用域名的 Rspamd 服务",
295-
"rspamd_com_settings": "设置名称将会自动生成,请看参考下方的示例预设。查看<a href=\"https://rspamd.com/doc/configuration/settings.html#settings-structure\" target=\"_blank\">Rspamd 文档</a>以了解更多的细节",
295+
"rspamd_com_settings": "设置名称将会自动生成,请看参考下方的示例预设。查看<a href=\"https://rspamd.com/doc/configuration/settings.html#settings-structure\" target=\"_blank\">Rspamd 文档</a>以了解更多的细节",
296296
"rspamd_global_filters": "全局过滤规则",
297297
"rspamd_global_filters_agree": "我会小心谨慎的!",
298298
"rspamd_global_filters_info": "全局过滤规则包含了不同类型的全局黑名单和白名单。",
@@ -353,7 +353,7 @@
353353
"password_reset_tmpl_html": "HTML 模版",
354354
"password_reset_tmpl_text": "文字模版",
355355
"password_settings": "密码设定",
356-
"restore_template": "留空以恢复预设模版",
356+
"restore_template": "留空以恢复预设模版",
357357
"ip_check": "IP 检查",
358358
"ip_check_disabled": "IP 检查已禁用。你可透过以下路径启用<br> <strong>系统 > 配置 > 选项 > 页面自定义</strong>",
359359
"queue_unban": "解除封禁",
@@ -481,7 +481,21 @@
481481
"template_exists": "模板 %s 已存在",
482482
"template_name_invalid": "模板名称无效",
483483
"cors_invalid_method": "制定的允许模式无效",
484-
"cors_invalid_origin": "指定的允许原无效"
484+
"cors_invalid_origin": "指定的允许原无效",
485+
"reset_token_limit_exceeded": "Reset token 数量已达上限。请稍后再尝试。",
486+
"extended_sender_acl_denied": "缺少设置外部发送者地址的 ACL",
487+
"img_dimensions_exceeded": "图片超出最大图片大小",
488+
"img_size_exceeded": "图片超过最大文件大小",
489+
"invalid_reset_token": "不合法的 reset token",
490+
"password_reset_invalid_user": "未找到此信箱或未设置恢复邮箱",
491+
"password_reset_na": "密码恢复目前无法使用。请联系您的管理员。",
492+
"recovery_email_failed": "无法发送恢复邮件。请联系您的管理员。",
493+
"template_id_invalid": "Template ID %s 无效",
494+
"to_invalid": "收件人不能为空",
495+
"webauthn_authenticator_failed": "找不到所选的 authenticator",
496+
"webauthn_publickey_failed": "没有为选定的身份验证器保存公钥",
497+
"webauthn_username_failed": "所选的 authenticator 属于另一个账户",
498+
"demo_mode_enabled": "演示模式已开启"
485499
},
486500
"debug": {
487501
"chart_this_server": "图表 (此服务器)",
@@ -516,7 +530,13 @@
516530
"error_show_ip": "无法解析公网IP地址",
517531
"show_ip": "显示公网IP",
518532
"update_available": "有可用更新",
519-
"update_failed": "无法检查更新"
533+
"update_failed": "无法检查更新",
534+
"architecture": "结构",
535+
"container_stopped": "已停止",
536+
"current_time": "系统时间",
537+
"timezone": "时区",
538+
"no_update_available": "系统已经是最新版本",
539+
"wip": "正在施工中"
520540
},
521541
"diagnostics": {
522542
"cname_from_a": "来自 A/AAAA 记录的值。但只要记录指向正确的资源即可。",
@@ -640,7 +660,31 @@
640660
"title": "编辑对象",
641661
"unchanged_if_empty": "如果不更改则留空",
642662
"username": "用户名",
643-
"validate_save": "验证并保存"
663+
"validate_save": "验证并保存",
664+
"domain_footer_info_vars": {
665+
"from_name": "{= from_name =} - 信件中的 From name 字段,例如对于 \"Mailcow &lt;[email protected]&gt;\" 来说它是 \"Mailcow\"",
666+
"auth_user": "{= auth_user =} - MTA 指定的经过认证的用户名",
667+
"from_user": "{= from_user =} - 信件中的 From user 字段,例如对于 \"[email protected]\" 来说它是 \"moo\"",
668+
"from_addr": "{= from_addr =} - 信件中的 From address 字段",
669+
"from_domain": "{= from_domain =} - 信件中的 From domain 字段",
670+
"custom": "{= foo =} - 如果信箱有一个自定义属性 \"foo\" 的值为 \"bar\", 它将返回 \"bar\""
671+
},
672+
"created_on": "创建于",
673+
"custom_attributes": "自定义属性",
674+
"mailbox_rename": "重命名信箱",
675+
"mailbox_rename_agree": "我已经创建了一个备份。",
676+
"mailbox_rename_warning": "重要! 重命名信箱之前请先创建备份。",
677+
"mailbox_rename_alias": "自动创建别名",
678+
"mailbox_rename_title": "新本地信箱的名字",
679+
"password_recovery_email": "密码重置邮箱",
680+
"domain_footer": "域页脚",
681+
"domain_footer_html": "HTML footer",
682+
"domain_footer_info": "Domain-wide footers 会被加入到该 domain 下的地址发出的所有邮件中。 <br> 下列变量可以在 footer 中使用:",
683+
"domain_footer_plain": "纯文字 footer",
684+
"domain_footer_skip_replies": "在回信中忽略 footer",
685+
"footer_exclude": "从 footer 中排除",
686+
"last_modified": "上次修改时间",
687+
"pushover_sound": "声音"
644688
},
645689
"fido2": {
646690
"confirm": "确认",
@@ -675,13 +719,14 @@
675719
"header": {
676720
"administration": "配置和管理",
677721
"apps": "应用",
678-
"debug": "系统信息",
722+
"debug": "信息",
679723
"email": "E-Mail",
680724
"mailcow_config": "配置",
681725
"quarantine": "隔离",
682726
"restart_netfilter": "重启 netfilter",
683727
"restart_sogo": "重启 SOGo",
684-
"user_settings": "用户设置"
728+
"user_settings": "用户设置",
729+
"mailcow_system": "系统"
685730
},
686731
"info": {
687732
"awaiting_tfa_confirmation": "等待 TFA 确认",
@@ -695,7 +740,14 @@
695740
"mobileconfig_info": "请使用邮箱用户登录以下载 Apple 连接描述文件。",
696741
"other_logins": "Key 登录",
697742
"password": "密码",
698-
"username": "用户名"
743+
"username": "用户名",
744+
"forgot_password": "> 忘记密码?",
745+
"back_to_mailcow": "返回到 mailcow",
746+
"new_password": "新密码",
747+
"new_password_confirm": "确认新密码",
748+
"reset_password": "重置密码",
749+
"request_reset_password": "请求重置密码",
750+
"invalid_pass_reset_token": "密码重置 token 无效或已过期。<br> 请重新获取新的密码重置链接。"
699751
},
700752
"mailbox": {
701753
"action": "操作",
@@ -799,9 +851,9 @@
799851
"recipient_map": "收件人映射",
800852
"recipient_map_info": "收件人映射用于在邮件被发送前替换收件人的地址。",
801853
"recipient_map_new": "新收件人",
802-
"recipient_map_new_info": "新收件人必须为合法的邮箱地址",
854+
"recipient_map_new_info": "新收件人必须为合法的邮箱地址",
803855
"recipient_map_old": "原收件人",
804-
"recipient_map_old_info": "原收件人必须为合法的邮箱地址",
856+
"recipient_map_old_info": "原收件人必须为合法的邮箱地址",
805857
"recipient_maps": "收件人映射",
806858
"relay_all": "中继所有收件人",
807859
"remove": "删除",
@@ -818,7 +870,7 @@
818870
"sieve_preset_5": "自动回复 (休假)",
819871
"sieve_preset_6": "拒绝接收邮件并通知",
820872
"sieve_preset_7": "重定向邮件并保留或删除",
821-
"sieve_preset_8": "删除发件人发送给自己别名地址的邮件",
873+
"sieve_preset_8": "重定向来自特定发件人的邮件,标记为已读并放入子文件夹中",
822874
"sieve_preset_header": "请看下方的示例预设。 查看 <a href=\"https://en.wikipedia.org/wiki/Sieve_(mail_filtering_language)\" target=\"_blank\">Sieve Wikipedia 页面 (英文)</a>以了解更多细节。",
823875
"sogo_visible": "SOGo 别名显示",
824876
"sogo_visible_n": "在 SOGo 中隐藏别名",
@@ -860,10 +912,20 @@
860912
"mailbox_templates": "邮箱模板",
861913
"gal": "全局地址列表",
862914
"max_aliases": "最大别名数",
863-
"max_mailboxes": "最大可能的邮箱数"
915+
"max_mailboxes": "最大可能的邮箱数",
916+
"created_on": "建立于",
917+
"force_pw_update": "强制在下一次登陆时更新密码",
918+
"add_template": "新增模板",
919+
"goto_ham": "学习为 <b> 非垃圾邮件 </b>",
920+
"goto_spam": "学习为 <b> 垃圾邮件 </b>",
921+
"last_modified": "上次修改时间",
922+
"max_quota": "每个信箱的最大容量配额",
923+
"relay_unknown": "转发未知信箱",
924+
"templates": "模板",
925+
"template": "模板"
864926
},
865927
"oauth2": {
866-
"access_denied": "请作为邮箱所有者登录以使用 OAuth2 授权",
928+
"access_denied": "请作为邮箱所有者登录以使用 OAuth2 授权",
867929
"authorize_app": "授权应用",
868930
"deny": "拒绝",
869931
"permit": "授权应用",
@@ -926,7 +988,19 @@
926988
},
927989
"queue": {
928990
"queue_manager": "队列管理器",
929-
"delete": "全部删除"
991+
"delete": "全部删除",
992+
"info": "邮件队列包含所有等待投递的邮件。如果邮件长时间停留在邮件队列中,系统会自动将其删除。<br>对应的邮件错误信息会提供有关邮件无法送达的原因。",
993+
"flush": "刷新队列",
994+
"legend": "邮件队列操作功能:",
995+
"ays": "请确认您要删除当前队列中的所有项目。",
996+
"deliver_mail": "投递",
997+
"deliver_mail_legend": "尝试重新投递选中的邮件。",
998+
"hold_mail": "保留",
999+
"hold_mail_legend": "保持选中的邮件。(不继续投递)",
1000+
"show_message": "显示内容",
1001+
"unban": "队列解除限制",
1002+
"unhold_mail": "取消保持",
1003+
"unhold_mail_legend": "允许选中的邮件继续投递。(需要在保持状态)"
9301004
},
9311005
"ratelimit": {
9321006
"disabled": "禁用",
@@ -994,7 +1068,7 @@
9941068
"nginx_reloaded": "Nginx 已重新启动",
9951069
"object_modified": "已保存对象 %s 更改",
9961070
"password_policy_saved": "已成功保存密码规则",
997-
"pushover_settings_edited": "已成功设置 Pushover,请重新校验凭证",
1071+
"pushover_settings_edited": "Pushover 设置已保存,请重新校验凭证",
9981072
"qlearn_spam": "消息 ID %s 已被学习为垃圾邮件并被删除",
9991073
"queue_command_success": "成功执行配额命令",
10001074
"recipient_map_entry_deleted": "已删除接收人映射 ID %s",
@@ -1018,7 +1092,17 @@
10181092
"verified_fido2_login": "FIDO2 登录验证成功",
10191093
"verified_totp_login": "TOTP 登录验证成功",
10201094
"verified_webauthn_login": "WebAuthn 登录验证成功",
1021-
"verified_yotp_login": "Yubico OTP 登录验证成功"
1095+
"verified_yotp_login": "Yubico OTP 登录验证成功",
1096+
"domain_footer_modified": "对域 footer %s 的修改已保存",
1097+
"cors_headers_edited": "CORS 设置已保存",
1098+
"ip_check_opt_in_modified": "IP 检查已保存",
1099+
"f2b_banlist_refreshed": "黑名单 ID 已成功刷新。",
1100+
"mailbox_renamed": "信箱 %s 已被重命名为 %s",
1101+
"password_changed_success": "密码重置成功",
1102+
"recovery_email_sent": "重置邮件已发送至 %s",
1103+
"template_added": "新增了模板 %s",
1104+
"template_modified": "模板 %s 的修改已保存",
1105+
"template_removed": "模板 ID %s 已删除"
10221106
},
10231107
"tfa": {
10241108
"api_register": "%s 使用了 Yubico Cloud API,请<a href=\"https://upgrade.yubico.com/getapikey/\" target=\"_blank\">在此</a>为你的密钥获取 API 密钥",
@@ -1045,7 +1129,8 @@
10451129
"webauthn": "WebAuthn 认证",
10461130
"waiting_usb_auth": "<i>等待 USB 设备中...</i><br><br>现在请触碰你的 WebAuthn USB 设备上的按钮。",
10471131
"waiting_usb_register": "<i>等待 USB 设备中...</i><br><br>请在上方输入你的密码并请触碰你的 WebAuthn USB 设备上的按钮以确认注册该 WebAuthn 设备。",
1048-
"yubi_otp": "Yubico OTP 认证"
1132+
"yubi_otp": "Yubico OTP 认证",
1133+
"authenticators": "验证器(Authenticators)"
10491134
},
10501135
"user": {
10511136
"action": "操作",
@@ -1062,7 +1147,7 @@
10621147
"alias_valid_until": "有效至",
10631148
"aliases_also_send_as": "同时允许发送为",
10641149
"aliases_send_as_all": "已关闭发件人可访性检查的域名和域名别名",
1065-
"app_hint": "应用密码是你登录 <b>IMAP 和 SMTP</b> 时的可选替代密码,用户名仍然保持不变。<br>应用密码不适用于 SOGo (包括 ActiveSync) ",
1150+
"app_hint": "应用密码是你登录 <b>IMAP 和 SMTP</b> 时的可选替代密码,用户名仍然保持不变。<br>应用密码不适用于 SOGo (包括 ActiveSync)",
10661151
"allowed_protocols": "允许使用的协议",
10671152
"app_name": "应用名称",
10681153
"app_passwds": "应用密码",
@@ -1206,7 +1291,12 @@
12061291
"weeks": "",
12071292
"with_app_password": "包含应用密码",
12081293
"year": "",
1209-
"years": ""
1294+
"years": "",
1295+
"pw_recovery_email": "密码重置邮箱",
1296+
"password_reset_info": "如果不提供密码重置邮箱,此功能将无法使用。",
1297+
"pushover_sound": "声音",
1298+
"value": "",
1299+
"attribute": "属性"
12101300
},
12111301
"warning": {
12121302
"cannot_delete_self": "不能删除已登录的用户",
@@ -1233,6 +1323,17 @@
12331323
"last": "最后一页",
12341324
"previous": "上一页",
12351325
"next": "下一页"
1236-
}
1326+
},
1327+
"aria": {
1328+
"sortDescending": ": 激活以降序对列进行排序",
1329+
"sortAscending": ": 激活以升序对列进行排序"
1330+
},
1331+
"decimal": ".",
1332+
"emptyTable": "表中没有可用的数据",
1333+
"infoFiltered": "(从 _MAX_ 个总条目中过滤)",
1334+
"thousands": ",",
1335+
"lengthMenu": "显示 _MENU_ 条目",
1336+
"loadingRecords": "加载中...",
1337+
"zeroRecords": "未找到符合条件的记录"
12371338
}
12381339
}

docker-compose.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ services:
112112
- rspamd
113113

114114
php-fpm-mailcow:
115-
image: mailcow/phpfpm:1.91
115+
image: mailcow/phpfpm:1.91.1
116116
command: "php-fpm -d date.timezone=${TZ} -d expose_php=0"
117117
depends_on:
118118
- redis-mailcow
@@ -177,7 +177,7 @@ services:
177177
- phpfpm
178178

179179
sogo-mailcow:
180-
image: mailcow/sogo:1.127
180+
image: mailcow/sogo:1.127.1
181181
environment:
182182
- DBNAME=${DBNAME}
183183
- DBUSER=${DBUSER}

update.sh

+30
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,34 @@ detect_bad_asn() {
275275
fi
276276
}
277277

278+
fix_broken_dnslist_conf() {
279+
280+
# Fixing issue: #6143. To be removed in a later patch
281+
282+
local file="${SCRIPT_DIR}/data/conf/postfix/dns_blocklists.cf"
283+
# Check if the file exists
284+
if [[ ! -f "$file" ]]; then
285+
return 1
286+
fi
287+
288+
# Check if the file contains the autogenerated comment
289+
if grep -q "# Autogenerated by mailcow" "$file"; then
290+
# Ask the user if custom changes were made
291+
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"
292+
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"
293+
read -p "Do you want to delete the file now and let mailcow regenerate it properly? " response
294+
if [[ "${response}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
295+
rm "$file"
296+
echo -e "\e[32mdns_blocklists.cf has been deleted and will be properly regenerated"
297+
return 0
298+
else
299+
echo -e "\e[35mOk, not deleting it! Please make sure you take a look at postfix upon start then..."
300+
return 2
301+
fi
302+
fi
303+
304+
}
305+
278306
############## End Function Section ##############
279307

280308
# Check permissions
@@ -437,6 +465,8 @@ source mailcow.conf
437465

438466
detect_docker_compose_command
439467

468+
fix_broken_dnslist_conf
469+
440470
DOTS=${MAILCOW_HOSTNAME//[^.]};
441471
if [ ${#DOTS} -lt 1 ]; then
442472
echo -e "\e[31mMAILCOW_HOSTNAME (${MAILCOW_HOSTNAME}) is not a FQDN!\e[0m"

0 commit comments

Comments
 (0)