1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2026-01-09 04:31:55 +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:
Steve Atkins
2025-03-17 15:54:30 +00:00
committed by GitHub
parent 4c8c8e7744
commit 9904399d24
3 changed files with 13 additions and 15 deletions

View File

@@ -75,6 +75,11 @@ func (a *Addressing) NewRecipient(address string) (*Recipient, error) {
// ParseOrigin parses an address into a Origin. This is used for parsing MAIL FROM argument,
// not To headers.
func (a *Addressing) ParseOrigin(address string) (*Origin, error) {
if address == "" {
return &Origin{
addrPolicy: a,
}, nil
}
local, domain, err := ParseEmailAddress(address)
if err != nil {
return nil, err