freedomofpress / securethenews

An automated scanner and web dashboard for tracking TLS deployment across news organizations
https://securethe.news
GNU Affero General Public License v3.0
100 stars 29 forks source link

Replace django-mailgun with django-anymail #304

Closed chigby closed 3 years ago

chigby commented 3 years ago

This PR is similar to https://github.com/freedomofpress/freedom.press/pull/625 -- we are switching from the deprecated (and now fully unavailable from PyPI) django-mailgun package to django-anymail. I have basically made all the same choices in implementing this change as in the other repository. In doing so, all of the same infrastructure changes, which I've summarized below, must be applied before we can deploy this PR.

Additional work

In order for this to work, we will need some additional infrastructure work done. I recommend that we remove the old environment variables MAILGUN_ACCESS_KEY and MAILGUN_SERVER_NAME and replace them with more correctly named MAILGUN_API_KEY and MAILGUN_SENDER_DOMAIN. The values for these variables can probably be copied over from securedrop.org's configuration.

I don't have the access to this, however, so someone else will probably have to do this prior to testing and deploying this change.

Testing and Acceptance

In my opinion, this should be tested on a staging server that directly talks to mailgun. It would probably be sufficient to deploy this branch to the sandbox and do something that sends an email.

SaptakS commented 3 years ago

I guess we will need to merge this before we can merge the PR that fixes the safety CI (because that fails run_dev and run_prod because of this) if I am not wrong.

harrislapiroff commented 3 years ago

Thanks, @SaptakS! Let's get it on staging to check once tests pass

harrislapiroff commented 3 years ago

Overriding safety check to resolve mutually unmergeable PRs