diff --git a/README.md b/README.md index bebcdd4..a6e1e39 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ Open the `config/config.json` file in the run directory, edit a few configuratio # Mail Client Configuration -POP3 Server Address : [Your Domain] +POP3 Server Address : pop.[Your Domain] POP3 Port: 110/995(SSL) diff --git a/README_CN.md b/README_CN.md index 0debc65..ea5b2e5 100644 --- a/README_CN.md +++ b/README_CN.md @@ -115,7 +115,7 @@ PMail是一个追求极简部署流程、极致资源占用的个人域名邮箱 # 第三方邮件客户端配置 -POP3地址: [你的域名] +POP3地址: pop.[你的域名] POP3端口: 110/995(SSL) diff --git a/server/config/config.go b/server/config/config.go index ca23e86..2999610 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -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" diff --git a/server/pop3_server/pop3server.go b/server/pop3_server/pop3server.go index 8ff9644..edf1f91 100644 --- a/server/pop3_server/pop3server.go +++ b/server/pop3_server/pop3server.go @@ -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") diff --git a/server/services/setup/dns.go b/server/services/setup/dns.go index b6d81e4..6282fcd 100644 --- a/server/services/setup/dns.go +++ b/server/services/setup/dns.go @@ -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}, diff --git a/server/services/setup/ssl/ssl.go b/server/services/setup/ssl/ssl.go index 848b383..9a79bd4 100644 --- a/server/services/setup/ssl/ssl.go +++ b/server/services/setup/ssl/ssl.go @@ -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)