Skip to content

BillionMail gives you open-source MailServer, NewsLetter, Email Marketing — fully self-hosted, dev-friendly, and free from monthly fees. Join the discord: https://discord.gg/asfXzBUhZr

Adjust the subscribe_form_code file location

lotk6f41da763407
diff --git a/core/internal/service/timers/timers.go b/core/internal/service/timers/timers.go
index 03612978..fdf38f78 100644
--- a/core/internal/service/timers/timers.go
+++ b/core/internal/service/timers/timers.go
@@ -9,6 +9,7 @@ import (
"billionmail-core/internal/service/mail_service"
"billionmail-core/internal/service/maillog_stat"
"billionmail-core/internal/service/relay"
+ "billionmail-core/internal/service/settings"
"billionmail-core/internal/service/warmup"
"context"
"github.com/gogf/gf/os/gtimer"
@@ -142,6 +143,11 @@ func Start(ctx context.Context) (err error) {
// fail2ban access logs detection
gtimer.AddOnce(800*time.Millisecond, fail2ban.NewAccessLogDetection().Start)
+ // 定期获取当前访问地址是否有域名 如果BILLIONMAIL_HOSTNAME不为空或不为mail.example.com 检查值域名是否有a记录映射 切映射值与 public.GetServerIP()一致 如果一致 新建标记文件 public.AbsPath("../core/data/billionmail_hostname.json") 并在文件内写入当前hostname的值 如果不满足要求 则不写入 如果存在这个标记文件 删除标记文件
+ gtimer.Add(24*time.Hour, func() {
+ settings.CheckHostname()
+ })
+
g.Log().Debug(ctx, "All timers started successfully")
return nil
}
diff --git a/core/public/html/subscribe_form_code.html b/core/template/subscribe_form_code.html
similarity index 100%
rename from core/public/html/subscribe_form_code.html
rename to core/template/subscribe_form_code.html