Discourse sent 18K+ Emails? Or, my server got hacked

You can see what’s got it open. You didn’t install a name server, so that’s probably the culprit.

You need to spin up a new server and move there. You cannot know what is on the server. Everything is suspect.