with localserve, in queue, when "delivering" to the sender account, mark domain "localhost" as dkimverified

may be useful for testing, e.g. for rulesets to deliver messages to mailboxes other than Inbox.
This commit is contained in:
Mechiel Lukkien 2024-04-16 19:25:56 +02:00
parent 0a10283de0
commit 8654a1f901
No known key found for this signature in database
3 changed files with 4 additions and 3 deletions

2
doc.go
View file

@ -770,7 +770,7 @@ with:
- "timeout": no response (for an hour) - "timeout": no response (for an hour)
If the localpart begins with "mailfrom" or "rcptto", the error is returned If the localpart begins with "mailfrom" or "rcptto", the error is returned
during those commands instead of during "data". If the localpart beings with during those commands instead of during "data". If the localpart begins with
"queue", the submission is accepted but delivery from the queue will fail. "queue", the submission is accepted but delivery from the queue will fail.
usage: mox localserve usage: mox localserve

View file

@ -59,7 +59,7 @@ with:
- "timeout": no response (for an hour) - "timeout": no response (for an hour)
If the localpart begins with "mailfrom" or "rcptto", the error is returned If the localpart begins with "mailfrom" or "rcptto", the error is returned
during those commands instead of during "data". If the localpart beings with during those commands instead of during "data". If the localpart begins with
"queue", the submission is accepted but delivery from the queue will fail. "queue", the submission is accepted but delivery from the queue will fail.
` `
golog.SetFlags(0) golog.SetFlags(0)
@ -166,7 +166,7 @@ during those commands instead of during "data". If the localpart beings with
golog.Printf(`- "timeout": no response (for an hour).`) golog.Printf(`- "timeout": no response (for an hour).`)
golog.Print("") golog.Print("")
golog.Print(`if the localpart begins with "mailfrom" or "rcptto", the error is returned`) golog.Print(`if the localpart begins with "mailfrom" or "rcptto", the error is returned`)
golog.Print(`during those commands instead of during "data". if the localpart beings with`) golog.Print(`during those commands instead of during "data". if the localpart begins with`)
golog.Print(`"queue", the submission is accepted but delivery from the queue will fail.`) golog.Print(`"queue", the submission is accepted but delivery from the queue will fail.`)
golog.Print("") golog.Print("")
golog.Print(" smtp://localhost:1025 - receive email") golog.Print(" smtp://localhost:1025 - receive email")

View file

@ -1549,6 +1549,7 @@ func deliver(log mlog.Log, resolver dns.Resolver, m0 Msg) {
EHLOValidation: store.ValidationPass, EHLOValidation: store.ValidationPass,
MailFromValidation: store.ValidationPass, MailFromValidation: store.ValidationPass,
MsgFromValidation: store.ValidationDMARC, MsgFromValidation: store.ValidationDMARC,
DKIMDomains: []string{"localhost"},
ReceivedRequireTLS: qm.RequireTLS != nil && *qm.RequireTLS, ReceivedRequireTLS: qm.RequireTLS != nil && *qm.RequireTLS,
Size: qm.Size, Size: qm.Size,
MsgPrefix: qm.MsgPrefix, MsgPrefix: qm.MsgPrefix,