This commit is contained in:
jinnrry committed 2023-11-20 20:24:21 +08:00
1 parent a317a984a1
commit f00aa08e5d
6 files changed
+7 -6

No files matched your search

+1 -1
View File
@@ -39,7 +39,7 @@ type Config struct {
//go:embed tables/*
var tableConfig embed.FS
const Version = "2.3.1"
const Version = "2.3.2"
const DBTypeMySQL = "mysql"
const DBTypeSQLite = "sqlite"
+2 -2
View File
@@ -21,7 +21,7 @@ func StartWithTls() {
tlsConfig.Certificates = []tls.Certificate{crt}
tlsConfig.Time = time.Now
tlsConfig.Rand = rand.Reader
instanceTls = gopop.NewPop3Server(995, config.Instance.Domain, true, tlsConfig, action{})
instanceTls = gopop.NewPop3Server(995, "pop."+config.Instance.Domain, true, tlsConfig, action{})
instanceTls.ConnectAliveTime = 5 * time.Minute
log.Infof("POP3 With TLS Server Start On Port :995")
@@ -41,7 +41,7 @@ func Start() {
tlsConfig.Certificates = []tls.Certificate{crt}
tlsConfig.Time = time.Now
tlsConfig.Rand = rand.Reader
instance = gopop.NewPop3Server(110, config.Instance.Domain, false, tlsConfig, action{})
instance = gopop.NewPop3Server(110, "pop."+config.Instance.Domain, false, tlsConfig, action{})
instance.ConnectAliveTime = 5 * time.Minute
log.Infof("POP3 Server Start On Port :110")
+1
View File
@@ -27,6 +27,7 @@ func GetDNSSettings(ctx *context.Context) ([]*DNSItem, error) {
ret := []*DNSItem{
{Type: "A", Host: "smtp", Value: getIp(), TTL: 3600, Tips: i18n.GetText(ctx.Lang, "ip_taps")},
{Type: "A", Host: "pop", Value: getIp(), TTL: 3600, Tips: i18n.GetText(ctx.Lang, "ip_taps")},
{Type: "MX", Host: "-", Value: fmt.Sprintf("smtp.%s", configData.Domain), TTL: 3600},
{Type: "TXT", Host: "-", Value: "v=spf1 a mx ~all", TTL: 3600},
{Type: "TXT", Host: "default._domainkey", Value: auth.DkimGen(), TTL: 3600},
+1 -1
View File
@@ -116,7 +116,7 @@ func GenSSL(update bool) error {
myUser.Registration = reg
request := certificate.ObtainRequest{
Domains: []string{"smtp." + cfg.Domain, cfg.WebDomain},
Domains: []string{"smtp." + cfg.Domain, cfg.WebDomain, "pop." + cfg.Domain},
Bundle: true,
}
certificates, err := client.Certificate.Obtain(request)