Rotate mailgun password
Two things use mailgun via SMTP and they use the same credentials:
- mastodon (
/opt/social.coop/sauce/docker/.env.production
see theSMTP_*
variables - not in change control, so edit directly on server) - the metalsmith wiki thing that runs the registration process (password in pass repo at
deployment/wiki/mailgun_password
- and user/other SMTP config in https://git.coop/social.coop/tech/ansible/-/blob/master/roles/wiki.social.coop/templates/config.js.j2 underemail.server
config path)
To rotate credentials you can:
- log into mailgun.com (creds in pass repo at
mailgun.com
) - make sure you have access to the places where you need to put the new password before changing it
- go to https://app.mailgun.com/app/sending/domains/mg.social.coop/credentials and press the rotate credential button
- get hold of the password
- update it
- for wiki:
- put it in the password store at
deployment/wiki/mailgun_password
- deploy the wiki with ansible:
ansible-playbook server.playbook.yml --tags wiki
- restart it
systemctl restart wiki.social.coop.service
(the ansible setup should be made it restart it on config change really...)
- put it in the password store at
- for mastodon
- update variable
SMTP_PASSWORD
in/opt/social.coop/sauce/docker /.env.production
on the server - restart it
systemctl restart social.coop-mastodon.service
- update variable
- for wiki: