Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMTP server ? #12

Open
Limezy opened this issue Mar 1, 2023 · 7 comments
Open

SMTP server ? #12

Limezy opened this issue Mar 1, 2023 · 7 comments

Comments

@Limezy
Copy link

Limezy commented Mar 1, 2023

Could you please implement a simple SMTP server for emails ?
I have seen some libraries (https://nim-lang.org/docs/smtp.html) but I don't know anything about Nim yet.
I don't think self-hosted users will be willing to use Postmark. They'd rather use their already existing email server, or SMTP relay.

@iffy
Copy link
Contributor

iffy commented Mar 1, 2023

Self hosted users don't need to send email at all since they'll likely run it in single user mode. Instead, they choose the only valid username and password when they deploy it (and can update it whenever they want to change it).

Running by hand: https://github.com/buckets/relay#quickstart---single-user-mode

Running on Fly: https://github.com/buckets/relay#single-user-mode

@Limezy
Copy link
Author

Limezy commented Mar 1, 2023

In my case, a Yunohost server is likely to be used by a bunch of family members, each of them having their own credentials on the server via Yunohost's LDAP user base and SSO. Yunohost also has a localhost mail server, so ideally I would be able to send via SMTP on localhost credentials to users subscribing to the relay.
Ideally the relay would be compatible with a LDAP userbase, or with an OIDC authentification stack such as Dex, but I know this is a lot to ask and clearly not the priority.
Can't wait to have double sided sync

@iffy
Copy link
Contributor

iffy commented Mar 1, 2023

I see; that makes sense. Well Postmark has an SMTP endpoint, so maybe one day I'll just switch over to SMTP for this. Or maybe someone will submit a PR that does it :)

@Limezy
Copy link
Author

Limezy commented Mar 1, 2023

I may try. Meanwhile, I now have a Yunohost app running on my test server, with perfect sync !
May I confirm with you that license auth is disabled in single user mode ?

@iffy
Copy link
Contributor

iffy commented Mar 1, 2023

May I confirm with you that license auth is disabled in single user mode ?

I had to double check, but yes, license auth only works in multi-user mode: https://github.com/buckets/relay/blob/master/src/bucketsrelay/server.nim#L337

If we enabled license auth in single user mode, it would effectively make it multi-user mode (since everyone's license is signed and validate with the same key), though I suppose it could be made to only work for a particular email address.

@Limezy
Copy link
Author

Limezy commented Mar 1, 2023

I see. Anyway I think I'll make an option at installation time.
If Yunohost users want to use the multiuser mode, then they'll need to buy a license 🤭
By the way it's very nice of you, both to offer the relay for free including to those who don't have any license.
Will you keep this on the long run ? It seems legit to allow only auth license.

@iffy
Copy link
Contributor

iffy commented Mar 1, 2023

Will you keep this on the long run ?

For now, yes. It depends how expensive it is to run. Since it's a relay and doesn't store any information, I'm hoping it will be inexpensive and feasible to keep it on indefinitely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants