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 Let's Encrypt not auto renew issue. Optimized dedicated IP config generations.
Jackb12bd60ff04c
diff --git a/core/internal/service/domains/ssl.go b/core/internal/service/domains/ssl.goindex 1af774e0..11b8eade 100644--- a/core/internal/service/domains/ssl.go+++ b/core/internal/service/domains/ssl.go@@ -351,6 +351,7 @@ func AutoRenewSSL(ctx context.Context) {}for _, domain := range domainList {+ domain = public.FormatMX(domain)certInfo, err = mail_service.NewCertificate().GetSSLInfo(domain)if err == nil && certInfo.Endtime > 0 {remain := certInfo.Endtime - int(time.Now().Unix())diff --git a/core/internal/service/multi_ip_domain/config_manager.go b/core/internal/service/multi_ip_domain/config_manager.goindex 863700b5..c1f80d3f 100644--- a/core/internal/service/multi_ip_domain/config_manager.go+++ b/core/internal/service/multi_ip_domain/config_manager.go@@ -420,10 +420,11 @@ func (m *ConfigManager) modifyPostfixNetworksText(lines []string, configs []map[return lines, fmt.Errorf("postfix-billionmail networks section not found")}- // Add default billionmail-network configuration- result = append(result, " billionmail-network:")- result = append(result, " aliases:")- result = append(result, " - postfix")+ // Add default billionmail-network configuration with fixed IP+ result = append(result, " billionmail-network:")+ result = append(result, " aliases:")+ result = append(result, " - postfix")+ result = append(result, " ipv4_address: 172.66.1.100")// Add custom network configurationsfor _, cfg := range configs {@@ -439,10 +440,10 @@ func (m *ConfigManager) modifyPostfixNetworksText(lines []string, configs []map[continue}- result = append(result, fmt.Sprintf(" %s:", networkName))- result = append(result, " aliases:")- result = append(result, fmt.Sprintf(" - %s", aliases))- result = append(result, fmt.Sprintf(" ipv4_address: %s", postfixIP))+ result = append(result, fmt.Sprintf(" %s:", networkName))+ result = append(result, " aliases:")+ result = append(result, fmt.Sprintf(" - %s", aliases))+ result = append(result, fmt.Sprintf(" ipv4_address: %s", postfixIP))g.Log().Debugf(context.Background(), "Added postfix network: %s -> %s (%s)", networkName, postfixIP, aliases)}@@ -679,7 +680,6 @@ func (m *ConfigManager) updateMainCf(ctx context.Context, configs []map[string]ismtpBindLine := "\nsmtp_bind_address = " + defaultBindIP + "\n"contentStr += smtpBindLine-if err := ioutil.WriteFile(PostfixMainCfPath, []byte(contentStr), 0644); err != nil {return gerror.Wrapf(err, "failed to write main.cf file: %s", PostfixMainCfPath)}