mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-18 18:17:03 +00:00
Accept and handle emails sent with an empty 821.From / return-path as… (#561)
* Accept and handle emails sent with an empty 821.From / return-path as it would any other email.
This commit is contained in:
@@ -78,6 +78,11 @@ func TestGreetState(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// Messages sent with a null reverse-path are unusual,
|
||||
// but valid. They are used for delivery status
|
||||
// notifications, and also for some sorts of auto-responder
|
||||
// as part of bounce storm mitigation.
|
||||
// Sections 3.6.3 and 4.5.5 of RFC 5321 discuss them.
|
||||
func TestEmptyEnvelope(t *testing.T) {
|
||||
ds := test.NewStore()
|
||||
server := setupSMTPServer(ds, extension.NewHost())
|
||||
@@ -85,14 +90,14 @@ func TestEmptyEnvelope(t *testing.T) {
|
||||
// Test out some empty envelope without blanks
|
||||
script := []scriptStep{
|
||||
{"HELO localhost", 250},
|
||||
{"MAIL FROM:<>", 501},
|
||||
{"MAIL FROM:<>", 250},
|
||||
}
|
||||
playSession(t, server, script)
|
||||
|
||||
// Test out some empty envelope with blanks
|
||||
script = []scriptStep{
|
||||
{"HELO localhost", 250},
|
||||
{"MAIL FROM: <>", 501},
|
||||
{"MAIL FROM: <>", 250},
|
||||
}
|
||||
playSession(t, server, script)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user