mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-18 18:17:03 +00:00
add reject from origin domain feature (#375)
Add a new feature to be able to reject email *from* specific domains. Co-authored-by: Cyril DUPONT <cyd@9bis.com>
This commit is contained in:
@@ -22,9 +22,10 @@ func TestManagerEmitsMessageStoredEvent(t *testing.T) {
|
||||
listener := extHost.Events.AfterMessageStored.AsyncTestListener("manager", 1)
|
||||
|
||||
// Attempt to deliver a message to generate event.
|
||||
origin, _ := sm.AddrPolicy.ParseOrigin("from@example.com")
|
||||
if _, err := sm.Deliver(
|
||||
&policy.Recipient{},
|
||||
"from@example.com",
|
||||
origin,
|
||||
[]*policy.Recipient{},
|
||||
"prefix",
|
||||
[]byte("From: from@example.com\n\ntest email"),
|
||||
|
||||
Reference in New Issue
Block a user