feat: restrict smtp sender address (#3637)

* fix: check if sender address is custom domain

* fix: check if sender address is custom domain

* fix: check if sender address is custom domain

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi
2022-05-16 16:08:47 +02:00
committed by GitHub
parent 40de8d5b3b
commit 5c0f527a49
39 changed files with 510 additions and 153 deletions

View File

@@ -22,7 +22,8 @@ func NewDomainPolicyAddedEvent(
ctx context.Context,
aggregate *eventstore.Aggregate,
userLoginMustBeDomain,
validateOrgDomain bool,
validateOrgDomain,
smtpSenderAddressMatchesInstanceDomain bool,
) *DomainPolicyAddedEvent {
return &DomainPolicyAddedEvent{
DomainPolicyAddedEvent: *policy.NewDomainPolicyAddedEvent(
@@ -32,6 +33,7 @@ func NewDomainPolicyAddedEvent(
DomainPolicyAddedEventType),
userLoginMustBeDomain,
validateOrgDomain,
smtpSenderAddressMatchesInstanceDomain,
),
}
}