修复按收件用户拦截黑名单邮件并补齐历史邮件警示
Security Checks / security (push) Waiting to run

This commit is contained in:
xuans committed 2026-09-25 01:44:44 +08:00
1 parent ed7b960921
commit 6254217972
10 files changed
+136 -10

No files matched your search

+15
View File
@@ -73,6 +73,7 @@ func NewEmailAuthentication(spfPassed, dkimPassed bool) *EmailAuthentication {
// Email is the type used for email messages
type Email struct {
EnvelopeFrom string
ReplyTo []*User
From *User
To []*User
@@ -93,6 +94,20 @@ type Email struct {
Authentication *EmailAuthentication
}
func (e *Email) SenderFilterAddresses() []string {
if e == nil {
return nil
}
addresses := []string{e.EnvelopeFrom}
if e.From != nil {
addresses = append(addresses, e.From.EmailAddress)
}
if e.Sender != nil {
addresses = append(addresses, e.Sender.EmailAddress)
}
return addresses
}
type StoredEmailFields struct {
ReplyTo string
To string