service/forum: document mass-disabling email digests authored by Jérôme Charaoui's avatar Jérôme Charaoui
......@@ -169,6 +169,21 @@ the discourse PostgreSQL database:
sudo -u postgres psql discourse
## Mass-disable email digests
If a user's account email address stops working (eg. domain becomes
unregistered), and email digests are enabled (the default) Discourse will keep
attempting to send those emails forever, and the delivery of each single email
will be retried dozens of times, even if the chance of delivery is zero.
To disable those emails, this code can be used in the rails console:
users=User.all.select { |u| u.email.match('example.com') }
users.each do |u|
u.user_option.email_digests = false
u.user_option.save
end
## Pager playbook
### Email issues
......
......