update to latest bstore (with support for an index on a []string: Message.DKIMDomains), and cyclic data types (to be used for Message.Part soon); also adds a context.Context to database operations.

This commit is contained in:
Mechiel Lukkien
2023-05-22 14:40:36 +02:00
parent f6ed860ccb
commit e81930ba20
58 changed files with 1970 additions and 1035 deletions

View File

@ -2,6 +2,7 @@ package smtpserver
import (
"bytes"
"context"
"crypto/sha256"
"fmt"
"io"
@ -40,7 +41,7 @@ func rejectPresent(log *mlog.Log, acc *store.Account, rejectsMailbox string, m *
var exists bool
var err error
acc.WithRLock(func() {
err = acc.DB.Read(func(tx *bstore.Tx) error {
err = acc.DB.Read(context.TODO(), func(tx *bstore.Tx) error {
mbq := bstore.QueryTx[store.Mailbox](tx)
mbq.FilterNonzero(store.Mailbox{Name: rejectsMailbox})
mb, err := mbq.Get()