Campaign finished before emailing the entire list
Version:
- listmonk: [eg: v5.0.2]
- OS: Debian/Docker
Description of the bug and steps to reproduce: The campaign status changed to "finished" and stopped sending before all the subscribers were emailed.
Screenshots:
Logs:
2025/10/09 16:24:18.954186 manager.go:423: start processing campaign (Join the Ultimate Virtual Music Festival)
2025/10/09 16:38:51.751798 updates.go:73: new update v5.1.0 found
2025/10/09 18:45:00.131390 manager.go:501: error sending message in campaign Join the Ultimate Virtual Music Festival: subscriber 5948890: 501 Invalid RCPT TO address provided
2025/10/09 18:59:56.358001 pipe.go:232: campaign (Join the Ultimate Virtual Music Festival) finished
Additional Notes: A few other things happened during this campaign. I had originally set a sliding window limit. After correctly applying the limit for several hours, it started "sleeping" well before reaching the limit. I removed the limit, changed the concurrency rates a few times, paused and resumed the campaign at each change. Then it worked fine for hours until prematurely finishing the campaign.
References: I see that this has been a problem in the past and was patched. https://github.com/knadh/listmonk/issues/1931 https://github.com/knadh/listmonk/issues/1762
Here is yet another issue referencing this problem: https://github.com/knadh/listmonk/issues/1802
OK looking into this further here is where things might have gone wrong
listmonk=# SELECT id, name, sent, to_send, max_subscriber_id, last_subscriber_id
listmonk-# FROM campaigns
listmonk-# WHERE id = 65;
id | name | sent | to_send | max_subscriber_id | last_subscriber_id
----+------------------------------------------+---------+---------+-------------------+--------------------
65 | campaign name deducted | 1225103 | 2042970 | 7251860 | 7251860
how does listmonk determine the max_subscriber_id It seems like here it picked the wrong one and erroneously determined that it reached the end of campaign.