mirror of
https://github.com/mjl-/mox.git
synced 2025-07-13 08:54:38 +03:00
ensure senderaccount is always set for messages in queue
before, the smtpserver that queued a dsn would set an empty senderaccount, which was interpreted in a few places as the globally configured postmaster cacount. the empty senderaccount would be used by the smtpserver that queued a dsn with null return path. we now set the postmaster account when we add a message to the queue. more code in the queue pretty much needs a non-empty senderaccount, such as the filters when listing, and the suppression list.
This commit is contained in:
@ -56,7 +56,7 @@ func queueDSN(ctx context.Context, log mlog.Log, c *conn, rcptTo smtp.Path, m ds
|
||||
}
|
||||
qm := queue.MakeMsg(smtp.Path{}, rcptTo, has8bit, smtputf8, int64(len(buf)), m.MessageID, nil, reqTLS, time.Now(), m.Subject)
|
||||
qm.DSNUTF8 = bufUTF8
|
||||
if err := queue.Add(ctx, c.log, "", f, qm); err != nil {
|
||||
if err := queue.Add(ctx, c.log, mox.Conf.Static.Postmaster.Account, f, qm); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user