Mastodon / Glitch-soc won't send mails

My YunoHost server

Hardware: Fujitsu Siemens Esprimo Q920 Intel Core i5-4590T 64bit CPU @ 4 × 2,8 GHz, 16GB RAM, 8TB SSD
YunoHost version: 11.2.11.3 (stable)
I have access to my server : Through SSH | through the webadmin | direct access via keyboard / screen | …
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : yes
If yes, please explain: The yunohost-installation itself is unaltered. But I added task-xfce-desktop, which is not started by default. I only start it, if needed (which is rarely the case) and end it immediately afterwards again.
If your request is related to an app, specify its name and version: glitchsoc 2024.03.20~ynh1

Description of my issue

Mails can’t be sent from Glitch-soc to e.g. new users. I checked the variables in .env.production and as far as I can tell, they are wrong.

To be honest, I’m hesitant to chattr -i and manipulate the configuration file in a production environment, so I’d like to assure myself by asking here, whether that’s really the supposed way of making changes?

Sending mails from my firefish installation wouldn’t work after yunohost installer finished either. Fortunately I could change the SMTP variables comfortably in the admin backend there. Sadly this isn’t an option with Mastodon / Glitch-soc.

This is the relevant part of the .env.production:

# Sending mail
# ------------
SMTP_SERVER=localhost
SMTP_PORT=25
#SMTP_LOGIN=
#SMTP_PASSWORD=
SMTP_FROM_ADDRESS=the_correct@mail.adress
#SMTP_REPLY_TO=
#SMTP_DOMAIN= # defaults to LOCAL_DOMAIN
SMTP_DELIVERY_METHOD=sendmail # delivery method can also be smtp
SMTP_AUTH_METHOD=none
#SMTP_CA_FILE=/etc/ssl/certs/ca-certificates.crt
SMTP_OPENSSL_VERIFY_MODE=none
#SMTP_ENABLE_STARTTLS_AUTO=true
#SMTP_TLS=true

Is there another way to enter the correct values?

Thanks for your help!

Walsonde

Since I experienced the same issue with Firefish, I assume it’s not a Glitch-soc or Mastodon specific problem but rather one with either the postfix service or installer scripts from yunohost entering the wrong variables, which I could manually correct in Firefish afterwards.

Can anyone confirm that there definitely is no other (safer) method of altering the variables in .env.production than to remove write protection of .env.production, altering it and write protecting it again?

Because in order to do so, I have to be root. And I repeatedly encounter ownership problems with yunohost files and apps after changing files as root, even if I chown and chmod the files to it’s previous states. I’m somewhat desperate and I’d appreciate any help.

Okay, I now corrected the .env.production but Glitch-soc still won’t send any mails. Does anybody in this forum use Glitch-soc? Did you have to change anything after installing it with yunohost?

Found the reason, but for explaining I have to somewhat go far afield.

tl;dr: sending mails did work the whole time, only not to domains registered in yunohost.

long version:

Since I’m not masochistic enough to host my own mail server, I configured the nameservers of my domain hoster such, that web is routed to the yunohost but mail is directed to my mailhoster. I checked and double checked that sending and receiving mails to the email adress that belongs to my Glitch-soc installation in the email client, and since it did, I had no reason to monitor the yunohost internal mailbox.

That was a mistake, because obviously yunohost rewrote the domainpart of the email adress to the main domain of my yunohost installation.
Instead of sending mail to accountname@my_glitchsoc.example yunohost changed the recipient to accountname@my_yunohost.example and filed the mail away in the internal yunohost mailbox instead of looking up the recipient in my mailhosters nameserver like it does with emails to other recipients.

But at least this only concerns mails from Glitch-soc to my admin account while all other emails will look into the usual DNS and deliver the mail accordingly to my mailhoster.

Edit: can I close the topic myself or does that have to be done by an admin?

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