Stop sending to bouncing addresses
Closes #432 (closed)
What does this MR do?
Use the data collected by the mail bounce handler (written to
fs_email_bounces) in mailqueuerunner to not send out emails to bouncing addresses.
Here, I implemented "two" rules:
- Do not send to addresses where a single hard bounce has been recorded ever (since ~2016)
- Do not send to addresses where at least two soft bounces (full, temporary failure) have been recorded in the last month
How confident are you it won't break things if deployed?
manual tests look good. Manual tests for after deployment: Mailqueuerunner needs to be restarted when mysql goes away. New systemd service should help with that.
Links to related issues
- added a test, or explain why one is not needed/possible...
- no unrelated changes
- asked someone for a code review
- joined #foodsharing-beta channel at https://slackin.yunity.org
- added an entry to CHANGELOG.md (description, merge request link, username(s))