Email disabled when migrating server, possibly?


(Ryan Mulligan) #1

I am sorry this isn’t really a full bug report and sounds kind of magical, but I wanted to post it in case someone who is very familiar with the “disable email”, “read-only mode”, and backup features might know what the problem was.

I recently wanted to move my Discourse forum from Old VPS to New VPS. Here is roughly what happened:

  1. Make a new VPS for New
  2. Install discourse docker
  3. Use command line to wipe database and install from nightly backup from Old
  4. Set Old to read-only on the backups page and make backup
  5. Move backup to New and restore from backup
  6. A few days later, notice emails are not sending, including account activation emails
  7. “Send Test Email” works fine
  8. Turn “disable emails” setting On
  9. Turn “disable emails” setting Off
  10. Emails now work

(Régis Hanol) #2

When restoring we automatically set the “disable_emails” site setting to “true” in order to prevent unwanted emails from being sent.

This was added because the workflow usually is:

  1. run an import
  • restore backup on some instance
  • check the imported content
  • repeat 1-3 until you’re happy with the content

We’ve been bitten quite a few times with summary emails being sent from instances that weren’t live yet.

That said, since emails were globally disabled, there should have been a notice on top of every pages saying so. Did you not notice it?


(Ryan Mulligan) #3

Right, normally when emails are disabled there is a notice at the top of the page, and I saw the notice after I did step 8 above. I did not see the notice on the forum before that and me and other people were using it for 6 days without seeing any notice with no emails.