feat: add guided mail server installer

This commit is contained in:
zxyszx
2026-08-03 22:39:51 +08:00
parent 2f7494e5e6
commit da888234b9
18 changed files with 689 additions and 67 deletions
+7
View File
@@ -14,12 +14,19 @@ import (
"strings"
"time"
"unicode"
"unicode/utf8"
"github.com/microcosm-cc/bluemonday"
)
type HTMLPolicy struct{ policy *bluemonday.Policy }
const minimumPasswordLength = 6
func hasMinimumPasswordLength(password string) bool {
return utf8.RuneCountInString(password) >= minimumPasswordLength
}
func NewHTMLPolicy() *HTMLPolicy {
p := bluemonday.UGCPolicy()
p.AllowElements("html", "head", "body", "center", "font")