smtp3: 迁移 smtp.ini 至 CLI args,修复 .env 加载与 TLS SNI
- smtp3/src/main.cpp: 移除 confs 依赖(fetch_config_from_confs/merge_ini), 扩展 CLI 参数至 16 项(--instance/--log-level/--smtp-port/--code-len 等), 配置优先级改为 CLI > 环境变量 > 默认值 - smtp3/_run.sh: 新增 ../smtp/.env 加载(与 Python smtp_v2.py 共用凭据), 传递 "",移除 sleep 1 - smtp3/src/main.cpp: SmtpClient 添加 SSL_set_tlsext_host_name (SNI) - core/services.yaml: 回退到 smtp (Python),smtp3 待生产验证后切换 - confs/configs/smtp.ini: 已删除(配置迁入 services.yaml CLI args) - README.md: 移除 smtp.ini 表行,更新部署安全约定 - _inst.sh: 新增 inst_module "smtp3"
This commit is contained in:
1 parent
80969adc9b
commit
3eafc15602
6 files changed
+65
-112
No files matched your search
+11
-2
@@ -1,4 +1,13 @@
|
||||
#!/bin/bash
|
||||
cd "$(dirname "$0")" || exit
|
||||
sleep 1
|
||||
exec ./smtp3.bin
|
||||
|
||||
# 加载 SMTP 凭据(与 Python smtp_v2.py 共用 ../smtp/.env)
|
||||
# .env 格式:KEY=VALUE(# 开头为注释),set -a 自动 export
|
||||
ENV_FILE="../smtp/.env"
|
||||
if [ -f "$ENV_FILE" ]; then
|
||||
set -a
|
||||
. "$ENV_FILE" 2>/dev/null
|
||||
set +a
|
||||
fi
|
||||
|
||||
exec ./smtp3.bin "$@"
|
||||
Reference in new issue
Block a user