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:
Mechiel Lukkien
2024-04-28 11:03:47 +02:00
parent 6e7f15e0e4
commit e2924af8d2
3 changed files with 21 additions and 25 deletions

View File

@ -204,11 +204,9 @@ func cleanupHookRetiredSingle(log mlog.Log) {
func hookRetiredKeep(account string) time.Duration {
keep := 24 * 7 * time.Hour
if account != "" {
accConf, ok := mox.Conf.Account(account)
if ok {
keep = accConf.KeepRetiredWebhookPeriod
}
accConf, ok := mox.Conf.Account(account)
if ok {
keep = accConf.KeepRetiredWebhookPeriod
}
return keep
}