Skip to content

Commit

Permalink
feature/2.6.5 (#202)
Browse files Browse the repository at this point in the history
1、添加web后台DNS设置引导
  • Loading branch information
Jinnrry authored Sep 15, 2024
1 parent 6b123ff commit dbb671d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/services/setup/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package setup

import (
"fmt"
"strings"

"github.com/Jinnrry/pmail/i18n"
"github.com/Jinnrry/pmail/services/auth"
"github.com/Jinnrry/pmail/utils/context"
Expand All @@ -27,6 +29,7 @@ func GetDNSSettings(ctx *context.Context) (map[string][]*DNSItem, error) {

for _, domain := range configData.Domains {
ret[domain] = []*DNSItem{
{Type: "A", Host: strings.ReplaceAll(configData.WebDomain, "."+configData.Domain, ""), Value: ip.GetIp(), TTL: 3600, Tips: i18n.GetText(ctx.Lang, "ip_taps")},
{Type: "A", Host: "smtp", Value: ip.GetIp(), TTL: 3600, Tips: i18n.GetText(ctx.Lang, "ip_taps")},
{Type: "A", Host: "pop", Value: ip.GetIp(), TTL: 3600, Tips: i18n.GetText(ctx.Lang, "ip_taps")},
{Type: "A", Host: "@", Value: ip.GetIp(), TTL: 3600, Tips: i18n.GetText(ctx.Lang, "ip_taps")},
Expand Down

0 comments on commit dbb671d

Please sign in to comment.