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 <balejk@matfyz.cz>
Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
Karel Balej
2024-10-23 19:03:53 +02:00
committed by Tim Culverhouse
parent c563e0116a
commit ced514b361

View File

@@ -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