I used the Ansible playbook instructions and got my instance up and running, which is where I’m sending this from now. Still, I was not able to get the SMTP side of things working. Does this whole setup self-host SMTP on the Lemmy instance, or is it something I’ll have to sort out externally? I’ve heard some people have had issues with Digital Ocean on certain ports, which is the VPS provider I’m hosting on, but even other ports I’ve tried have not worked.
If it’s anything like SMTP on a Mediawiki or Discourse instance (example notes, then what you probably need is something called “transactional email” (I’m guessing you’re looking at a guide like this?). I’ve made use of this guide for looking up vendors for that service.
In theory, the same server hosting a Lemmy service could also send and receive emails. However, in practice there’s a high probability of these emails landing in spam boxes. The defacto proof-of-work hurdle that inhibits email spam today is paying commercial transactional email companies a monthly fee. I’m hopeful that one day self-hosted email server software will become easier to set up through things like FreedomBox (via Postfix, Dovecot, and Rspamd), but the fundamental reputation problem remains, imo.
So, I doubt a Lemmy setup guide would automatically take care of email setup. In any case, the process involves creating at least one MX record (according to instructions provided by your transactional email service) with your DNS provider which depends on the name servers you have configured for your domain registrar. The transactional email service you select should provide instructions for what port to open, as well as what SMTP URL, user name, password, and postmaster email address to provide to Lemmy.
I used Mailgun and port 2525 for smtp in GCP. It also blocks port 25.