Allow for authless mail sending
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript, node.js
- Domain
- authentication, backend
Research direction
Start with the EMAIL_USER and EMAIL_PASSWORD entries in docker-compose.yml, then trace how the app passes those settings to Nodemailer. The issue suggests omitting the variables when unset, and notes the auth object may need adjustment if that does not work. Done when an internal SMTP relay can send notifications without authentication and creating a user account no longer returns a 500 error.
Written by the indexing model from the issue text.
Description
From https://forum.getodk.org/t/custom-email-without-authentication/58724:
Unable to send email notifications using an internal SMTP relay without authentication. It seems ODK Central config requires username/password in the custom email configuration, but this results in an error 500 when creating a user account.
We use Nodemailer, and its [documentation](https://nodemailer.com/smtp#authentication) says:
If you omit the auth object entirely, Nodemailer attempts to send without authentication. This works only with servers that allow unauthenticated sending (typically internal relay servers).
My guess is that instead of omitting Nodemailer's auth object when EMAIL_USER and EMAIL_PASSWORD aren't set, we're including it with empty strings for user and pass.
One quick thing to test would be changing docker-compose.yml to omit the variables when they're unset by removing ${EMAIL_USER:-} and ${EMAIL_PASSWORD:-}:
- EMAIL_USER
- EMAIL_PASSWORD
If that doesn't work, we may need to change how we construct the Nodemailer auth object.
- Dominant language
- JavaScript
- Stars
- 233
- Forks
- 241
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 13
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getodk/central
-
sessions are not reapedPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
The `New Submission` button on the Submissions tab is now harder to access on mobilePossibly taken @sadiqkhoja claimed this 1 day ago. Openfrontend
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
getodk/central#2334 · 1 assignee ·
Maintainers usually reply within 1 day
-
Copying text from table clicks on the rowPossibly taken @sadiqkhoja claimed this 1 day ago. Openfrontend needs testing
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getodk/central#2331 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Hide closed formsPossibly taken @nicoleorlowski claimed this 8 days ago. Openfrontend needs testing
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
getodk/central#2323 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
Similar issues
-
Escaped `*` followed by `*` (`\**`) never matchesPossibly taken @bardrop claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 71/100
editorconfig/editorconfig-core-js#172 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
fb55/htmlparser2#2579 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Provider editor: multiple top plugin options overlap Models because .top caps the container at 46pxOpen
Difficulty 2/5 1-3 hours Newbie friendliness 74/100