From 8654a1f901de9589c61403f2fbcdfea3bca2d9a8 Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Tue, 16 Apr 2024 19:25:56 +0200 Subject: [PATCH] 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. --- doc.go | 2 +- localserve.go | 4 ++-- queue/queue.go | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc.go b/doc.go index c39d6bf..0e513ec 100644 --- a/doc.go +++ b/doc.go @@ -770,7 +770,7 @@ with: - "timeout": no response (for an hour) 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. usage: mox localserve diff --git a/localserve.go b/localserve.go index 2a4ddfe..b33f351 100644 --- a/localserve.go +++ b/localserve.go @@ -59,7 +59,7 @@ with: - "timeout": no response (for an hour) 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. ` 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.Print("") 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("") golog.Print(" smtp://localhost:1025 - receive email") diff --git a/queue/queue.go b/queue/queue.go index 045d680..d16f157 100644 --- a/queue/queue.go +++ b/queue/queue.go @@ -1549,6 +1549,7 @@ func deliver(log mlog.Log, resolver dns.Resolver, m0 Msg) { EHLOValidation: store.ValidationPass, MailFromValidation: store.ValidationPass, MsgFromValidation: store.ValidationDMARC, + DKIMDomains: []string{"localhost"}, ReceivedRequireTLS: qm.RequireTLS != nil && *qm.RequireTLS, Size: qm.Size, MsgPrefix: qm.MsgPrefix,