feat(mail): Add support for multiple domains per mail service
- Add `Domains` field to MailServiceConfig for managing additional domains under single API - Implement `matchDomain` helper function for precise and subdomain matching logic - Update `GetServiceByDomain` to check both primary domain and additional domains list - Enhance EmailConfig UI to display domain count and allow comma-separated domain input - Add domains field to mail service request/response structures in API handlers - Update frontend types to include domains array in MailService interface - Improve documentation with clarification on primary vs additional domains usage - Allows single mail service API to manage multiple email domains for verification and operations
This commit is contained in:
@@ -10,12 +10,13 @@ import (
|
||||
|
||||
// MailServiceConfig 邮箱服务配置
|
||||
type MailServiceConfig struct {
|
||||
Name string `yaml:"name" json:"name"`
|
||||
APIBase string `yaml:"api_base" json:"api_base"`
|
||||
APIToken string `yaml:"api_token" json:"api_token"`
|
||||
Domain string `yaml:"domain" json:"domain"`
|
||||
EmailPath string `yaml:"email_path,omitempty" json:"email_path,omitempty"`
|
||||
AddUserAPI string `yaml:"add_user_api,omitempty" json:"add_user_api,omitempty"`
|
||||
Name string `yaml:"name" json:"name"`
|
||||
APIBase string `yaml:"api_base" json:"api_base"`
|
||||
APIToken string `yaml:"api_token" json:"api_token"`
|
||||
Domain string `yaml:"domain" json:"domain"`
|
||||
Domains []string `yaml:"domains,omitempty" json:"domains,omitempty"` // 附加域名列表(同一个API管理的多个域名)
|
||||
EmailPath string `yaml:"email_path,omitempty" json:"email_path,omitempty"`
|
||||
AddUserAPI string `yaml:"add_user_api,omitempty" json:"add_user_api,omitempty"`
|
||||
}
|
||||
|
||||
// Config 应用配置 (实时从数据库读取)
|
||||
|
||||
Reference in New Issue
Block a user