test if smtp user/pass config is set and if not set auth: null #1215

Closed
opened 2026-04-05 18:31:54 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @tomribbens on 7/18/2025

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Description

For smtp servers that require no authentication (Google Workspace has this option for whitelisted IP addresses for example), the auth: option for nodemailer must be set to null. This code checks if a username and password are defined. If they are, there is no change to previous behaviour. But if they aren't, auth: is set to null.

As discussed on discord: https://discord.com/channels/1325658630518865980/1395139357312028672

How to test?

Don't set smtp user/pass values in the config, and configure an open relay as smtp host, and see if it mails.

*Originally created by @tomribbens on 7/18/2025* ## Community Contribution License Agreement By creating this pull request, I grant the project maintainers an unlimited, perpetual license to use, modify, and redistribute these contributions under any terms they choose, including both the AGPLv3 and the Fossorial Commercial license terms. I represent that I have the right to grant this license for all contributed content. ## Description For smtp servers that require no authentication (Google Workspace has this option for whitelisted IP addresses for example), the `auth:` option for nodemailer must be set to null. This code checks if a username and password are defined. If they are, there is no change to previous behaviour. But if they aren't, `auth:` is set to null. As discussed on discord: https://discord.com/channels/1325658630518865980/1395139357312028672 ## How to test? Don't set smtp user/pass values in the config, and configure an open relay as smtp host, and see if it mails.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pangolin#1215