MuckRock / muckrock

MuckRock's source code - Please report bugs, issues and feature requests to info@muckrock.com
https://www.muckrock.com
GNU Affero General Public License v3.0
114 stars 22 forks source link

Purge inactive emails from agency contact lists #1849

Open adriensalz opened 4 months ago

adriensalz commented 4 months ago

There are some agencies we've supported for a long enough time that they build up an large list of emails we no longer use/don't receive incoming messages from anymore. (mostly federal agencies, but it's not unusual to see this at the state or local level.) This happens when agency personnel quit or retire, services like FOIAOnline shut down, or agencies just change the way they do things in the years since we first started supporting them.

This has occasionally been an issue when Support needs to change or update an email. Some of these old emails are also errored out for one or more of the reasons above. These show up in Review Agency tasks. These emails be tied to old requests, but the underlying tasks could be easily resolved if Support updated old edge case requests to use up-to-date emails.

We also occasionally receive mail from no-reply addresses, and some of these also error out and make their way into Review Agency tasks. This leads to the same problem. Trying to solve an email error for an address we haven't used since 2018, for example, or one that can't receive incoming mail, makes these tasks more confusing, and is not a good use of Support's time or energy.

The Support team thinks it would be helpful to purge inactive emails which are more than X years old. We would also be interested in removing no-reply emails, and certain other emails, like those from foiaonline.gov domains.

Support doesn't have a preference for any specific oldness threshold, but we'd want to do this carefully in a way that doesn't break other requests or areas of the site. In theory, any purged emails we later receive mail from should be added back to the contact list once we receive a new message, but one specific concern is that previously good agency emails could be routed into Orphan tasks.

We probably don't want to roll this out across the whole site at once. It would definitely be helpful to test this with a few agencies at a time to look out for any unintended results.