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

Allow /dev/mailbox in prod #2708

Open
midigofrank opened this issue Nov 25, 2024 · 1 comment
Open

Allow /dev/mailbox in prod #2708

midigofrank opened this issue Nov 25, 2024 · 1 comment
Labels
discussion Discussion needed to hash out more details prior to development

Comments

@midigofrank
Copy link
Collaborator

#2700 introduced a MAIL_PROVIDER env var which specifies which email provider to use.
The providers are essentially all the adapters supported by Swoosh: https://hexdocs.pm/swoosh/Swoosh.html#module-adapters
So far, lightning only supports mailgun and smtp.

Swoosh also supports the local adapter, https://hexdocs.pm/swoosh/Swoosh.Adapters.Local.html, which is meant for use in dev.
When using this adapter, the user can get access to the emails directly from the same host via /dev/mailbox.
At the moment, this route is controlled at compile time and only availed in dev

Given that MAIL_PROVIDER defaults to local, regardless of the compile env, should we not make available /dev/mailbox to all compile envs?

Ideally, instead of it being controlled by the compile env, it should be based on the value of MAIL_PROVIDER

@github-project-automation github-project-automation bot moved this to New Issues in v2 Nov 25, 2024
@midigofrank midigofrank added the discussion Discussion needed to hash out more details prior to development label Nov 25, 2024
@midigofrank
Copy link
Collaborator Author

The /dev/mailbox lists all emails sent in the whole system. This could be a big security risk.
@stuartc notes that if we're to do it, then we should probably restrict it to superusers only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussion needed to hash out more details prior to development
Projects
Status: New Issues
Development

No branches or pull requests

1 participant