What app is this about, and its version: GoToSocial 0.20.1 What YunoHost version are you running: 12.1.33 What type of hardware are you using: VPS bought online
Describe your issue
I try sending a test email from the page /settings/admin/actions/email of my GoToSocial, but this error is returned:
Code 422: Unprocessable Entity: tls: failed to verify certificate: x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs
Share relevant logs or error messages
timestamp=“03/11/2025 20:45:47.204” func=server.Start.Logger.func11.1 level=INFO latency=72.279896ms userAgent=“Mozilla/5.0 (Android 15; Mobile; rv:144.0) Gecko/144.0 Firefox/144.0” method=POST statusCode=422 uri=/api/v1/admin/email/test?email=alice%40example.com&message= clientIP=xxxxxxxxxxx errors=“Error #01: tls: failed to verify certificate: x509: cannot validate certificate for 127.0.0.1 because it doesn’t contain any IP SANs\n” requestID=000036jb0tfxe00007z0 msg=“Unprocessable Entity: wrote 149B”
Email and DNS diagnostics in YunoHost report everything okay.
Here are the SMTP settings in the GoToSocial app config panel in YH (I suspect the problem is that I’m configuring it wrong here, I’m still learning the ropes):
SMTP Hostname: 127.0.0.1 (default) SMTP Port: 25 (default) SMTP username: yunohost (tried a few different things here) SMTP password:(the one corresponding to admin user yunohost) SMTP From Address: mail@gts.mydomain.example (where gts.mydomain.example is the subdomain that is set up and working correctly for the GTS instance) SMTP Disclose Recipients: false (default)
The GoToSocial instance is working beautifully other than the email problem, as far as I can tell. The error message is exactly the same as the one reported by the thread creator here.
The smtp settings in /etc/yunohost/apps/gotosocial/settings.yml were reflecting the values I set in the admin panel, as listed in my post. I believe the username/password/from address fields were all blank by default after install.
Following your suggestion, I’ve tried using gotosocial as username, giving:
But still getting the same error Code 422: Unprocessable Entity: tls: failed to verify certificate: x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs.
I see that the install script sets the password to $mail_pwd ,but I’m having trouble figuring out what the password for the gotosocial user should be. I’ve tried with my main admin password and a blank password, but neither seems to work.
Okay, setting host to the main domain and port to 587 got things working in the end!
I tried a few different configurations because I don’t have GTS installed on the main domain, I have it on a completely separate domain. So I wanted the from address to be gotosocial@, not gotosocial@. But using the GTS domain as either the SMTP host or from address wasn’t working, only the main domain works. It also only works if I leave the password blank in the SMTP config.
Using a blank password will get emails rejected by some email providers. The email pattern should be $app_id@$domain and user should be $app_id. The password is the one you got in settings file
Is there a way to find that original password now that the settings file has been overwritten by my changes? Is the original post-install config file copied somewhere?
You mean you have overwritten /etc/yunohost/apps/gotosocial/settings.yml? You can check any backup of the app, download it, extract it, you’ll find it there.
I didn’t manually change the settings.yml, but the changes I make in the webadmin panel for the app are written there, so I was responding to “The password is the one you got in settings file”. What I have in the settings file is whatever I set in the admin panel, but the only thing I can set that will allow gotosocial to send emails is a blank password. Whatever the actual SMTP password set by the system for the gotosocial user is is unknown to me.
Well, if you don’t need your gotosocial to send emails to Gmail or yahoo, you can leave the password blank or you can create a yunohost account with an email address (for example noreply@yourdomain.com) with a complex password and use it.
I’m sorry but I got lost in all the previous messages.
What is the correct value for the various smtp settings and why would it make a difference if it sends emails to gmail, yahoo or other providers?
Just to be sure, I need to restart the gotosocial service after each change of the settings, right?
I tried with this branch, some recipient addresses now work (protonmail still shows a warning about the domain being unauthenticated) but there’s still an error when sending the test email message to other addresses:
Code 422: Unprocessable Entity: 550 5.1.1 <REDACTED>: Recipient address rejected: User unknown in virtual mailbox table
It’s a different error from before however! So I think the changes from this branch are a good step.