SMTP postfix help.
akzmonster opened this issue · 5 comments
Did you check the FAQ & Troubleshooting section for answers to common questions and issues?
Yes
Describe the issue
Email doesn't seem to be working. I enabled the postfix SMTP in the advanced settings. I did not modify the user or password for SMTP. Do I need to set those to get it working? Thanks!!!
Diagnostic Information
Run
./deploy.sh -d
and paste the output below:
Same info as my last issue. Only RC10.
Hello! It is not recommended to use the default Postfix server, and I only include it because the Ansible deployment does.
Keep in mind, most cloud services block port 25 by default (the SMTP port), meaning your emails will not be sent out. This is to prevent spam. If you are hosting on AWS, Vultr, Linode, DigitalOcean, pretty much every cloud host out there, they all block port 25. Even if you're self hosting at home, your ISP could be blocking port 25. In all these cases, you will need to specifically state your use case and request an exemption from the block in order to be able to send emails.
In addition, even if port 25 is not blocked, since these emails would be unverified, the destination email server (i.e. Gmail) might be sending it to spam, or ignoring it entirely. You would have to set special email verification records in your DNS to avoid this, but I am not familiar with this process to be able to help more.
Unfortunately, I do not use email myself due to its complexity, so I won’t be able to offer much more help than this. The options are there in Lemmy-Easy-Deploy to provide an interface to the official Lemmy configuration options, but other than that, email is a bit out of scope for support from me. This is why I have placed them under the "Advanced" settings.
If there is an explicit error when sending, you could check the logs for more info:
docker compose -p lemmy-easy-deploy logs -f
But otherwise, I do not know what else to suggest.
I have heard that some people have had success with using paid SMTP hosted services instead. That would be indeed much more reliable than hosting it yourself. Maybe you could try that?
Alternatively, if you are only trying to send emails to yourself, i.e., you are your only user and you are not supporting multiple users, there are some other notification-related workarounds I may be able to share with you.
Okay, and no problem. Just curious, if you don't use email, then how do users reset passwords?
I am the only user on my instance, so I don't really encounter that problem.
Most people using this script are beginners, and they are only interested in having a single-user instance for themselves. I don't frequently get people asking about password reset functionality/email functionality, so I don't have much feedback on how to support this better.
However, it seems like most people don't bother using Postfix (it is abandoned and was only ever intended for development use, anyway). I think you'll appreciate this discussion I had on Lemmy last week, where a user talked about their experience setting up emails via Sendgrid:
https://lemmy.world/comment/308605
https://lemmy.world/comment/610009
While automatically setting up email DNS records is sadly out of scope for this project, if there are any general improvements I can make to Lemmy-Easy-Deploy to better support SMTP users, or even just a success story on using an external SMTP service, I'd love to hear your feedback!
Awe I really appreciate that. Thank you, no worries. And again, you've got me farther than Lemmy did!
You're welcome! Glad to hear that.
If you do ever find out definitively if your port 25 was/wasn't blocked, I'd be interested in knowing!