pelican-dev / panel

https://pelican.dev
GNU Affero General Public License v3.0
758 stars 79 forks source link

Panel mail settings has username as a mandatory field #564

Closed Gr4Ss closed 1 week ago

Gr4Ss commented 2 weeks ago

Current Behavior

When setting up an SMTP Servers via the panel interface, the 'Username' is a mandatory field.

Filling in a username in this case will allow the config to be saved but causes errors when trying to send a (test) mail.

Expected Behavior

Username to be optional in case the mail server requires no authentication

By editing the .env file directly, it is possible to leave the username/password blank and get a working mail config for mail servers that require no username/password.

Steps to Reproduce

  1. Go to https://panel.example.com/admin/settings?tab=-mail-tab
  2. Fill in the from address, from name, host and port
  3. Leave the username and password fields empty
  4. Click 'Save'

Panel Version

1.0.0-beta8

Wings Version

n/a

Games and/or Eggs Affected

No response

Docker Image

No response

Error Logs

No response

Is there an existing issue for this?

RMartinOscar commented 2 weeks ago

Hey setting up mails without any user/password or certificate screams bad practice ! You shouldn't ever do that so i doubt The Pelican Team will ever make those fields optional.

Gr4Ss commented 2 weeks ago

There are legit reasons where you might want to use unauthenticated SMTP, e.g. when using postfix on localhost to forward the mails. Or OPNSense's postfix plugin doesn't even support user authentication currently...

It isn't like a mail server without authentication immediately means there is a mail server sitting open to the internet.