Skip to content

Commit

Permalink
target/queue: Use >= to check q.maxTries
Browse files Browse the repository at this point in the history
See #678.
  • Loading branch information
foxcpp committed Feb 12, 2024
1 parent cee5777 commit 2da4ece
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/target/queue/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ func (q *Queue) tryDelivery(meta *QueueMetadata, header textproto.Header, body b
meta.RcptErrs[rcpt] = toSMTPErr(rcptErr)

temporary := exterrors.IsTemporaryOrUnspec(rcptErr)
if !temporary || meta.TriesCount[rcpt]+1 == q.maxTries {
if !temporary || meta.TriesCount[rcpt]+1 >= q.maxTries {
delete(meta.TriesCount, rcpt)
dl.Msg("not delivered, permanent error", "rcpt", rcpt)
failedRcpts = append(failedRcpts, rcpt)
Expand Down

0 comments on commit 2da4ece

Please sign in to comment.