Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinnrry committed Nov 20, 2023
1 parent a317a98 commit f00aa08
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ PMail是一个追求极简部署流程、极致资源占用的个人域名邮箱

# 第三方邮件客户端配置

POP3地址: [你的域名]
POP3地址: pop.[你的域名]

POP3端口: 110/995(SSL)

Expand Down
2 changes: 1 addition & 1 deletion server/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions server/pop3_server/pop3server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")

Expand Down
1 change: 1 addition & 0 deletions server/services/setup/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
2 changes: 1 addition & 1 deletion server/services/setup/ssl/ssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f00aa08

Please sign in to comment.