I'm configuring a custom made mail queue. The thing is there can be errors sending mail. Normally, one won't know the reason why the mail didn't reach it's destination. So the most simplistic solution is to try to send the mail again. Here are some algorithms i know from mouth:
- Duplicate the time in queue for next retry starting at some time: 1 min, 2 min, 4 min, etc.
- Specify a series of intervals (which are a general case of the previous option): 5 min, 5 min, 10 min, 30 min, etc.
At some point it'll be pointless to try sending the mail again. Anyway, the system includes a log for non-sent mail.
What do you know about good practices round this matter? What is a "good" hold interval? At least, which facts should i take in account to choose the intervals?