Closed opendevelopment-network closed 8 years ago
Merging #594
Option should accept list of ids that should be queued for delivery immediately. Probably would be wise to reset the "deferral" delay counter.
Oh, and another one to delete messages from queue. I see it's possible to just delete the files, but would be cool to do that via app as it will probably do proper locking.
Closed by #1460
Haraka needs an equivalent for sendmail -q
When using outgoing.js to smtp-forward or smtp-proxy mail to another server a failure/outage on the "smart host" can cause Haraka's queue to fill with backlogged mail that can't easily be cleared beyond a certain time limit. outgoing.js uses the file names to represent the time a message was queued. The lack of a mechanism to manage the queue and properly clear older messages most likely counts as a bug.
To clear a queue that has been stalled too long and attempt tp resend it, the queued message files can be renamed using a node script that borrows functions from outgoing.js and then restarts/refreshes Haraka.
(Issuing
echo 1 > config/outgoing.disabled
before running such a script can help keep the queue intact).Workarounds that prevent the issue from appearing
Solutions
Store timestamps and last delivery attempts in a database like redis/sqlite (sqlite is simple but redis may be useful for large clusters). Have outgoing.js check the queue directory and the database to manage the state of the queue. Have haraka outgoing.js trap a signal that causes it rerun/clear/update the queue.
Some design ideas and limitations inherent in the current code were discussed on #haraka IRC. This bug can server to track some of that discussion and future work on the feature.