Skip to content

[Bug]: SMTP server setup with no tls issue #4311

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

Closed
heiniha opened this issue Nov 15, 2024 · 7 comments · Fixed by #4487
Closed

[Bug]: SMTP server setup with no tls issue #4311

heiniha opened this issue Nov 15, 2024 · 7 comments · Fixed by #4487

Comments

@heiniha
Copy link

heiniha commented Nov 15, 2024

Error Message and Logs

Leaving the envryption field empty does not work for coolify to send the mail without starttls.
Our mailserver always receives requests including starttls.
Would like the option to choose not to use starttls, or if that already exist, then how can I configure it inside the Coolify settings menu -> transactional email -> SMTP server?

Steps to Reproduce

  1. Configure smtp server settings without encryption set
  2. Test send email
  3. Coolify marks it as sent successfully
  4. Mail server denies request with starttls

Example Repository URL

No response

Coolify Version

v4.0.0-beta.369

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.04

Additional Information

No response

@heiniha heiniha added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Nov 15, 2024
@pshemek
Copy link

pshemek commented Nov 19, 2024

I have issues with SMTP settings as well. Actually, I found that Coolify's notification test displays success no matter what I configure system-wide (including wrong password, etc.)

Also, when I try to set different email than default one in notification test, server error occurs:
Error: Cannot update locked property: [emails]

@peaklabs-dev
Copy link
Member

peaklabs-dev commented Nov 21, 2024

@heiniha you can set it to tls and port 465 that will always use tls, if you use 587 it will try to use STARTTLS if availabe. What is your exact issue you are having?

@pshemek This will be fixed in one of the next version and is a different issues.

@peaklabs-dev peaklabs-dev added 💤 Waiting for changes PRs awaiting changes from the author. 💤 Waiting for feedback Issues awaiting a response from the author. and removed 🔍 Triage Issues that need assessment and prioritization. 💤 Waiting for changes PRs awaiting changes from the author. labels Nov 21, 2024
@peaklabs-dev peaklabs-dev added this to the v4.0.0 Stable Release milestone Nov 21, 2024
@heiniha
Copy link
Author

heiniha commented Nov 21, 2024

@peaklabs-dev well, if running in own hosted environment and having a mailrelay available, but only on port 25 (smtp) and using a anonymous solution, so basically no user or password needed and also no tls or starttls needed or possible, then coolify says the email was sent successfully, but in the mail server log I see it still tries starttls.

Basically I would have thought that a no-tls option would be correct, and perhaps a checkbox for enabling anonymous account solution.

Many companies run like this to quickly scale their environments.

@peaklabs-dev
Copy link
Member

So you want to use SMTP with no username and password and over port 25 (so no TLS). And then you want no encryption to be used and even with port 25 Coolify still uses encryption right? Am I getting this right? I am not sure this is a good idea though because it is highly insecure no encryption and no username and password.

vishwamartur added a commit to vishwamartur/coolify that referenced this issue Nov 23, 2024
Related to coollabsio#4311

Add option to configure SMTP settings without encryption.

* Update `app/Livewire/Notifications/Email.php` and `app/Livewire/SettingsEmail.php` to include "No Encryption" option in the `smtpEncryption` field and update validation rules.
* Modify `app/Notifications/Channels/EmailChannel.php` to handle the "No Encryption" option in the `bootConfigs` method.
* Add `set_transanctional_email_settings` function in `app/Livewire/Help.php` to support the "No Encryption" option.
* Update `config/mail.php` to handle the "No Encryption" option in the mail configuration.
@andrasbacsai
Copy link
Member

So you want to use SMTP with no username and password and over port 25 (so no TLS). And then you want no encryption to be used and even with port 25 Coolify still uses encryption right? Am I getting this right? I am not sure this is a good idea though because it is highly insecure no encryption and no username and password.

That is true. It is highly insecure, but as it is an allowed configuration, we need to support it.

@heiniha What I do not understand if you leave it empty (null), then no TLS connection should be started, am I wrong?

@heiniha
Copy link
Author

heiniha commented Nov 25, 2024

Well I understand it is insecure, but when running self hosted and managing own network, we are able to limit its accessibility into where the traffic flows, hence we're using smtp port 25 relay, without user/pass and no tls support.

If I choose to not set anything in the encryption field, I still see it using starttls on mailserver and no-tls in the field is the same, still see starttls on mailserver.

@peaklabs-dev peaklabs-dev removed the 💤 Waiting for feedback Issues awaiting a response from the author. label Nov 25, 2024
@github-actions github-actions bot removed the 🐛 Bug Reported issues that need to be reproduced by the team. label Dec 5, 2024
@peaklabs-dev peaklabs-dev added the ✅ Done Issues that are fixed and a PR is ready to be merged. label Dec 6, 2024
@github-actions github-actions bot removed the ✅ Done Issues that are fixed and a PR is ready to be merged. label Dec 13, 2024
@heiniha
Copy link
Author

heiniha commented Dec 27, 2024

Hi,

Thanks this is working now in the latest 380 release 😃

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants