YunoHost-Apps / pixelfed_ynh

The federated image shareing service Pixelfed for YunoHost
https://pixelfed.org/
GNU Affero General Public License v3.0
43 stars 15 forks source link

Fix mail smtp #229

Closed themancalledjakob closed 11 months ago

themancalledjakob commented 11 months ago

Problem

Solution

PR Status

Comment

I am unsure whether port 25 or 587 should used in .env

lapineige commented 11 months ago

!testme

yunohost-bot commented 11 months ago

:v: Test Badge

lapineige commented 11 months ago

Thank a lot for that PR !! :smiley:

themancalledjakob commented 11 months ago

my pleasure! :) i am very excited by yunohost, and super happy for anything i can contribute

themancalledjakob commented 11 months ago

damn, somehow i cannot figure out any working smtp settings. it looks as if the mailserver always attempts a TLS connection, nevermind the MAIL_ENCRYPTION=null setting in .env, and I cannot figure out how to set up TLS properly.

the sendmail solution does work though. is there any reason why smtp should be preferred?

lapineige commented 11 months ago

I don't know. We should ask Yunohost devs

lapineige commented 11 months ago

!bookwormtestme

yunohost-bot commented 11 months ago

:worm: Test Badge

themancalledjakob commented 11 months ago

I don't know. We should ask Yunohost devs

I have a hunch, that we should just use sendmail. If you run $ man sendmail, it will tell you that it's not ancient sendmail, but actually postfix. It's sending emails with these settings /etc/postfix/main.cf. Looking in these settings, it appears that they are neatly tied to yunohost setup, even including ldap user accounts and TLS.

and also: it just works :)

lapineige commented 11 months ago

Then that's perfect, let's go for it ? :)

themancalledjakob commented 11 months ago

yep, i prepared a branch with sendmail and will quickly do a fresh install on my yunohost to verify that it indeed works out of the box

themancalledjakob commented 11 months ago

alright, here it is: #230

lapineige commented 11 months ago

It's a bit confusing, but cool, having another PR (instead of changing it here) is cool too. Archiving this then.

themancalledjakob commented 11 months ago

aha, learned something. Next time, I'll rather edit commits of an existing PR :)

lapineige commented 11 months ago

Well it reduces the commit history when it's another PR, but it also split the discussion in 2 places, so in that case (a minor change) I would rather keep it in the same PR :)