Ideally, the frequency would be something that could be set by a config variable, and each bounce would individually age out when it hit the age limit. But, to do that we'd need to create a new table to track the bounces and a lot of logic, so it's probably not worth it. I think instead, arbitrarily just zeroing everything every N days gets us fairly close to the same thing:
1. We add a config variable called, say, $cfg->bounces_resetdays, which takes an integer representing how many days we should go between resetting the bouncecounts.
2. We add a cron task that runs once daily. It uses a value in interaction_config to determine the last time it zeroed the bouncecounts, and by comparing that and $cfg->bounces_resetdays, it's determines whether to zero stuff out on this cron run or not.
3. If $cfg->bounces_resetdays = 0, or false, the cron task exits early and never resets them.
Ideally, the frequency would be something that could be set by a config variable, and each bounce would individually age out when it hit the age limit. But, to do that we'd need to create a new table to track the bounces and a lot of logic, so it's probably not worth it. I think instead, arbitrarily just zeroing everything every N days gets us fairly close to the same thing:
1. We add a config variable called, say, $cfg->bounces_ resetdays, which takes an integer representing how many days we should go between resetting the bouncecounts.
2. We add a cron task that runs once daily. It uses a value in interaction_config to determine the last time it zeroed the bouncecounts, and by comparing that and $cfg->bounces_ resetdays, it's determines whether to zero stuff out on this cron run or not.
3. If $cfg->bounces_ resetdays = 0, or false, the cron task exits early and never resets them.