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
Fix the smtp service name
lotk6b45d7a2903f
diff --git a/core/internal/controller/relay/relay.go b/core/internal/controller/relay/relay.goindex afa4b34d..7f4ff7c1 100644--- a/core/internal/controller/relay/relay.go+++ b/core/internal/controller/relay/relay.go@@ -310,9 +310,10 @@ func generateRelayConfigFiles(ctx context.Context, configs []*entity.BmRelay) ersaslPasswdContent.WriteString(fmt.Sprintf("[%s]:%s %s:%s\n",config.RelayHost, config.RelayPort, config.AuthUser, decryptedPass))// Create sender_transport configuration- smtpName := "smtp"+ smtpName := "smtp_default"if config.SmtpName != "" {- smtpName = fmt.Sprintf("smtp_%s", config.SmtpName)+ cleanedSmtpName := strings.ReplaceAll(config.SmtpName, " ", "")+ smtpName = fmt.Sprintf("smtp_%s", cleanedSmtpName)}senderTransportContent.WriteString(fmt.Sprintf("%s %s:[%s]:%s\n",@@ -386,7 +387,8 @@ func updatePostfixMasterCf(ctx context.Context, configs []*entity.BmRelay) error// Generate SMTP service namesmtpName := "smtp"if config.SmtpName != "" {- smtpName = fmt.Sprintf("smtp_%s", config.SmtpName)+ cleanedSmtpName := strings.ReplaceAll(config.SmtpName, " ", "")+ smtpName = fmt.Sprintf("smtp_%s", cleanedSmtpName)} else {// Generate a unique name based on the domaindomain := regexp.MustCompile(`[^a-zA-Z0-9]+`).ReplaceAllString(config.SenderDomain, "_")