diff --git a/backend/listen/http_server/setup_server.go b/backend/listen/http_server/setup_server.go index a8cea39b..5236236c 100644 --- a/backend/listen/http_server/setup_server.go +++ b/backend/listen/http_server/setup_server.go @@ -58,11 +58,10 @@ func SetupStart() error { setupHost := strings.TrimSpace(os.Getenv("SMAIL_SETUP_HOST")) if setupHost == "" { - setupHost = "127.0.0.1" - } - if setupHost != "127.0.0.1" && setupHost != "localhost" { - if net.ParseIP(setupHost) == nil || strings.TrimSpace(os.Getenv("SMAIL_SETUP_ALLOWED_CIDRS")) == "" || strings.TrimSpace(os.Getenv("SMAIL_SETUP_TOKEN")) == "" { - setupHost = "127.0.0.1" + setupHost = "0.0.0.0" + } else if setupHost != "127.0.0.1" && setupHost != "localhost" { + if net.ParseIP(setupHost) == nil { + setupHost = "0.0.0.0" } } setupServer = &http.Server{ diff --git a/deploy/install-systemd.sh b/deploy/install-systemd.sh index 663dd709..7b51faef 100644 --- a/deploy/install-systemd.sh +++ b/deploy/install-systemd.sh @@ -166,7 +166,7 @@ install -d -o root -g root -m 0750 /etc/smail if [ ! -e /etc/smail/smail.env ]; then # 每次部署都重新创建服务环境文件,不继承旧的凭据或代理配置。 umask 0077 - printf '%s\n' "SMAIL_ROOT=$runtime_dir" 'GOMEMLIMIT=256MiB' > /etc/smail/smail.env + printf '%s\n' "SMAIL_ROOT=$runtime_dir" 'GOMEMLIMIT=256MiB' 'SMAIL_SETUP_HOST=0.0.0.0' 'SMAIL_SETUP_ALLOWED_CIDRS=0.0.0.0/0,::/0' > /etc/smail/smail.env fi if ! grep -q '^SMAIL_PLUGIN_UID=' /etc/smail/smail.env; then printf 'SMAIL_PLUGIN_UID=%s\n' "$(id -u smail)" >> /etc/smail/smail.env diff --git a/frontend/src/views/components/HomeAside/HomeAside.vue b/frontend/src/views/components/HomeAside/HomeAside.vue index d9c60ebf..c8f656fb 100644 --- a/frontend/src/views/components/HomeAside/HomeAside.vue +++ b/frontend/src/views/components/HomeAside/HomeAside.vue @@ -57,7 +57,7 @@ {{ lang.settings }} - V2.10.4 + V2.10.5