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

Mail without authentication #364

Open
ToeiRei opened this issue Dec 7, 2024 · 10 comments
Open

Mail without authentication #364

ToeiRei opened this issue Dec 7, 2024 · 10 comments
Assignees
Labels
enhancement New feature or request next release Should be included in the next release.

Comments

@ToeiRei
Copy link

ToeiRei commented Dec 7, 2024

Hi there,

I am running an internal mail server here for servers that just send logs and notifications. Would it be possible to just have something like MAIL_SMTP_AUTH to none to just send it out?

@Ravinou
Copy link
Owner

Ravinou commented Dec 7, 2024

Hi 👋
Do you try to just leave empty MAIL_SMTP_LOGIN and MAIL_SMTP_PWD ?

@ToeiRei
Copy link
Author

ToeiRei commented Dec 7, 2024

I did not set it and the log just complains about missing login/pwd

2024-12-07T17:05:27.689436+01:00 BorgWarehouse Error: Missing credentials for "PLAIN"
2024-12-07T17:05:27.689491+01:00 BorgWarehouse     at SMTPConnection._formatError (/home/borgwarehouse/app/node_modules/nodemailer/lib/smtp-connection/index.js:807:19)
2024-12-07T17:05:27.689496+01:00 BorgWarehouse     at SMTPConnection.login (/home/borgwarehouse/app/node_modules/nodemailer/lib/smtp-connection/index.js:452:38)
2024-12-07T17:05:27.689638+01:00 BorgWarehouse     at /home/borgwarehouse/app/node_modules/nodemailer/lib/smtp-transport/index.js:272:32
2024-12-07T17:05:27.689645+01:00 BorgWarehouse     at SMTPConnection.<anonymous> (/home/borgwarehouse/app/node_modules/nodemailer/lib/smtp-connection/index.js:215:17)
2024-12-07T17:05:27.689655+01:00 BorgWarehouse     at Object.onceWrapper (node:events:632:28)
2024-12-07T17:05:27.689658+01:00 BorgWarehouse     at SMTPConnection.emit (node:events:518:28)
2024-12-07T17:05:27.689667+01:00 BorgWarehouse     at SMTPConnection._actionEHLO (/home/borgwarehouse/app/node_modules/nodemailer/lib/smtp-connection/index.js:1369:14)
2024-12-07T17:05:27.689671+01:00 BorgWarehouse     at SMTPConnection._processResponse (/home/borgwarehouse/app/node_modules/nodemailer/lib/smtp-connection/index.js:991:20)
2024-12-07T17:05:27.689680+01:00 BorgWarehouse     at SMTPConnection._onData (/home/borgwarehouse/app/node_modules/nodemailer/lib/smtp-connection/index.js:772:14)
2024-12-07T17:05:27.689684+01:00 BorgWarehouse     at SMTPConnection._onSocketData (/home/borgwarehouse/app/node_modules/nodemailer/lib/smtp-connection/index.js:195:44) {
2024-12-07T17:05:27.689692+01:00 BorgWarehouse   code: 'EAUTH',
2024-12-07T17:05:27.689694+01:00 BorgWarehouse   command: 'API'
2024-12-07T17:05:27.689701+01:00 BorgWarehouse }

@Ravinou Ravinou self-assigned this Dec 7, 2024
@Ravinou Ravinou added the enhancement New feature or request label Dec 7, 2024
@Ravinou
Copy link
Owner

Ravinou commented Dec 7, 2024

I'm going to set up a local mail server to make this possible. It doesn't have to be very complex.

@ToeiRei
Copy link
Author

ToeiRei commented Dec 7, 2024

I suspect you're using Nodemailer and therefor could use something like a custom auth that doesn't send user authentication details?

@Ravinou
Copy link
Owner

Ravinou commented Dec 7, 2024

Yes, it's nodemailer.

@rtim75
Copy link

rtim75 commented Dec 23, 2024

I'd also be interested in this functionality. google smtp-relay allows to whitelist IP addresses that can send mail, and thus we don't really require authentication to send notifications and alerts from a multitude of different services.

@Ravinou Ravinou added the next release Should be included in the next release. label Dec 26, 2024
@Ravinou
Copy link
Owner

Ravinou commented Dec 26, 2024

Please, tell me if v2.4.3 solve your problem. Thank you

@ToeiRei
Copy link
Author

ToeiRei commented Dec 27, 2024

We're still at An error occurred while sending the email: Error: Missing credentials for "PLAIN"

@Ravinou
Copy link
Owner

Ravinou commented Dec 27, 2024 via email

@ToeiRei
Copy link
Author

ToeiRei commented Jan 4, 2025

I use a local postfix server with no authentication for local networks. (Sorry for the delay - moving to a new place)

btw - I cannot add empty variables on TrueNAS Scale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request next release Should be included in the next release.
Projects
None yet
Development

No branches or pull requests

3 participants