You can optionally set Mastodon to ignore any DMs from accounts you don't follow:
1. Log onto your server’s website or web app
2. Click 🔔 Notifications
3. Click ⚙️ in top right corner of the Notifications section
4. In "Unsolicited private mentions" click the dropdown menu and select "Ignore"
5. When the confirmation box appears, click "Ignore notifications"
If you activate this, you may want to mention it in your profile so people realise their DMs won't get to you.