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

Fixed a bug that caused the container to fail to restart due to invoking the incorrect function.

Jack85060d789110
diff --git a/core/internal/service/mail_service/fix.go b/core/internal/service/mail_service/fix.go
index 9f7a5b8a..83e4f297 100644
--- a/core/internal/service/mail_service/fix.go
+++ b/core/internal/service/mail_service/fix.go
@@ -223,7 +223,7 @@ func FixRspamdDKIMSigningConfig(ctx context.Context) {
defer dk.Close()
// Restart the Rspamd container to apply the changes
- err = dk.RestartContainer(ctx, consts.SERVICES.Rspamd)
+ err = dk.RestartContainerByName(ctx, consts.SERVICES.Rspamd)
if err != nil {
g.Log().Warning(ctx, "Failed to restart Rspamd container: %v", err)
@@ -300,7 +300,7 @@ func FixDovecotSSLConfig(ctx context.Context) {
defer dk.Close()
// Restart the Dovecot container to apply the changes
- err = dk.RestartContainer(ctx, consts.SERVICES.Dovecot)
+ err = dk.RestartContainerByName(ctx, consts.SERVICES.Dovecot)
if err != nil {
g.Log().Warning(ctx, "Failed to restart Dovecot container: %v", err)
diff --git a/core/internal/service/rspamd/worker_controller.go b/core/internal/service/rspamd/worker_controller.go
index 6bb7e6b9..dd2ec5ee 100644
--- a/core/internal/service/rspamd/worker_controller.go
+++ b/core/internal/service/rspamd/worker_controller.go
@@ -66,7 +66,7 @@ static_dir = "${WWWDIR}";`)
}
// Restart the RSPAMD container
- err = dk.RestartContainer(context.Background(), consts.SERVICES.Rspamd)
+ err = dk.RestartContainerByName(context.Background(), consts.SERVICES.Rspamd)
return
}