收紧邮件协议认证并加固环境文件
Security Checks / security (push) Waiting to run

This commit is contained in:
xuans committed 2026-09-15 23:18:15 +08:00
1 parent 8d09a1ad49
commit 038f425f2d
7 files changed
+47 -17

No files matched your search

+2 -2
View File
@@ -84,9 +84,9 @@ if [ ! -e /etc/smail/smail.env ]; then
# 只创建默认根目录;已存在的文件始终保留部署人员的自定义环境配置。
umask 0077
printf '%s\n' 'SMAIL_ROOT=/opt/smail' > /etc/smail/smail.env
chown root:root /etc/smail/smail.env
chmod 0600 /etc/smail/smail.env
fi
chown root:root /etc/smail/smail.env
chmod 0600 /etc/smail/smail.env
for directory in config data ssl log plugins; do
target="$runtime_dir/$directory"
# 内置插件在临时沙箱中展开,只兼容已存在的历史插件目录。
+1
View File
@@ -7,6 +7,7 @@ Wants=network-online.target
Type=simple
User=smail
Group=smail
EnvironmentFile=/etc/smail/smail.env
# 运行环境仅由 root 可读写的独立文件提供,避免在 unit 中混入部署环境配置。
EnvironmentFile=/etc/smail/smail.env
WorkingDirectory=/opt/smail