mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[GH-ISSUE #253] :latest Docker image unable to send emails #88
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#88
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @clayadavis on GitHub (Jul 13, 2022).
Original GitHub issue: https://github.com/lldap/lldap/issues/253
Originally assigned to: @nitnelave on GitHub.
The
:latestDocker image seems unable to send emails, either using the password reset flow or thesend_test_emailcommand. Both of these do work in a source-built binary with the same SMTP settings, and also with the:stableimage. This points to something Docker- or Alpine-specific.The password reset flow fails with these log messages:
while
send-test-emailfails like this:Notably, the error message is the same no matter what SMTP settings are entered. Maybe this suggests the error is at the OS level, like a missing library in the Docker image?
@clayadavis commented on GitHub (Jul 13, 2022):
@martadinata666 any ideas? @nitnelave suggested I tag you.
@Maypul commented on GitHub (Jul 13, 2022):
I also tried setting SMTP today with no success, I will add below what I wanted to create in separate thread with some other suggestions if I might say.
Second thing, the server says it sends a password token but nothing is being sent out. This is a little clearer when you turn on verbose then you can see in logs that user was not found.
But when using valid username instead of email:
https://prnt.sc/e79YSaLEw3IL https://prnt.sc/JLKapNiDCamU
But interesingly enough, if I use any 'username' that is not in database and not an email it still says it sends out a token:
https://prnt.sc/ujyraNbmJmyb https://prnt.sc/b-TlwMHm689N
I would expect it to be somewhat consistent, if it already errors out on valid query with username why would it just 'pass' with incorrect names when it finds nothing in database, it seems like someone still could use it to look up if something exists in the database once mail server stops working.
Also a back button to login page once password it sent out would be nice. If it errors, the back button also does not work sometimes.
As for not working smtp, my SMTP settings are quite standard, I think:
SMTP_HOST=smtp.gmail.com
SMTP_PORT=465
SMTP_USERNAME=XXXX@gmail.com
SMTP_PASSWORD=apppassword
tried with tls on and off, it works well with Vaultwarden and other services I use it with.
I have tried with 587 port also with tls on and off with no success (but would still prefer to use 465/forceTLS)
I am setting everything with compose, .conf file is unchanged default.
I am on latest image from today, using latest tag.
I will add that I have not tried one more thing that is setting from/reply to to match gmail address as I remember it might matter but I have no time to try this today, but will paste this in case it will be useful for anything.
@clayadavis commented on GitHub (Jul 14, 2022):
@Maypul I think we're seeing the same issue here. Since I am able to send SMTP email with the same settings using a compiled binary, I think the issue is specifically with the dockerized version.
The message in this case saying the token was sent is a "security" feature; nothing is actually being sent.
@Maypul commented on GitHub (Jul 14, 2022):
I know, I meant it in a way that if mail server is down someone could look up which username exists as with valid and existing username it will error out even in UI and with non existing it will just 'say it sent out an email' which basically confirms usernames if someone bruteforce it. Unless I am looking at it wrong.
@nitnelave commented on GitHub (Jul 14, 2022):
No, that's fair, but the tradeoff between the small added security here and the extra complexity doesn't seem worth it.
@nitnelave commented on GitHub (Jul 15, 2022):
I need to try if switching to
rustlsrather than relying on openssl works.@nitnelave commented on GitHub (Jul 15, 2022):
Can you try the new container (once it's pushed)? I just merged a PR to switch to rustls
@just5ky commented on GitHub (Jul 23, 2022):
I faced the same issue

using the latest image (arm64) that was pushed yesterday
Logs
SMTP Config
@nitnelave commented on GitHub (Aug 1, 2022):
Sorry to ask that once again, but could you try with
:latest-alpineand:latest-debian? We just pushed an update which hopefully solves the problem.@just5ky commented on GitHub (Aug 20, 2022):
Using the latest image. It works!!