for localserve delivery from queue, use the recipient address for finding delivery rules, not sender address

This commit is contained in:
Mechiel Lukkien 2024-04-21 15:07:50 +02:00
parent 0047f09e2b
commit 71c0bd2dd1
No known key found for this signature in database

View file

@ -1557,7 +1557,7 @@ func deliver(log mlog.Log, resolver dns.Resolver, m0 Msg) {
var err error
var mb store.Mailbox
acc.WithWLock(func() {
dest := conf.Destinations[qm.Sender().String()]
dest := conf.Destinations[qm.Recipient().String()]
err = acc.DeliverDestination(log, dest, &dm, msgFile)
if err != nil {
err = fmt.Errorf("delivering message: %v", err)