From e319d3291fb8be957f84cffc6d1f29e8c78a2d5b Mon Sep 17 00:00:00 2001 From: Karel Balej Date: Wed, 23 Oct 2024 19:03:53 +0200 Subject: [PATCH] reply: consider the From address too when checking aliases This sets the likely usually desired From address when replying to a previously sent email and does not compose To the alias instead (unless reply-to-self is enabled). Changelog-fixed: Aliases are now taken into account correctly when replying to own messages such as from the Sent folder or via a mailing list. Signed-off-by: Karel Balej Acked-by: Robin Jarry --- commands/msg/reply.go | 1 + 1 file changed, 1 insertion(+) diff --git a/commands/msg/reply.go b/commands/msg/reply.go index bfcebfca..4cbd27c8 100644 --- a/commands/msg/reply.go +++ b/commands/msg/reply.go @@ -274,6 +274,7 @@ func chooseFromAddr(conf *config.AccountConfig, msg *models.MessageInfo) *mail.A } rec := newAddrSet() + rec.AddList(msg.Envelope.From) rec.AddList(msg.Envelope.To) rec.AddList(msg.Envelope.Cc) // test the from first, it has priority over any present alias -- 2.45.2