Gotosocial test email fails

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”

I also am experiencing this problem, so adding a little info here so I don’t duplicate the issue.

App version: 0.20.1+git-ee4294a
YunoHost version: 12.1.35 (stable)
Hardware: Scaleway Dedibox VPS

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.

1 Like

Hi @kiskadee

Could you check the smtp values in /etc/yunohost/apps/gotosocial/settings.yml ?

I think the user should be gotosocial. The install script normally sets the default smtp parameters.

1 Like

Thanks for the quick reply!

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:

smtp_disclose_recipients: 'false'
smtp_from: gotosocial@<my GTS domain>
smtp_host: 127.0.0.1
smtp_password: ''
smtp_port: '25'
smtp_username: gotosocial

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.

1 Like

For the smtp host, I would try main domain.

And change port to 587 for tls

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.

Thanks for the help!

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 can look in gotosocial app_config_set logs, but I don’t think it will contain a plain text password.

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.

1 Like

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?

Can you try this branch GitHub - YunoHost-Apps/gotosocial_ynh at TLS-SMTP

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.

This means the email address you’re sending to does not exist on the recipient’s email server.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.