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

Boolean command line config arguments do not work correctly #258

Open
louis-lau opened this issue Aug 21, 2020 · 2 comments
Open

Boolean command line config arguments do not work correctly #258

louis-lau opened this issue Aug 21, 2020 · 2 comments
Labels

Comments

@louis-lau
Copy link
Member

I'm passing --imap.secure=false as a command line argument, but the server starts with TLS enabled anyway. Am I missing something?

info IMAP Secure IMAP Server listening on 0.0.0.0:143

@andris9
Copy link
Member

andris9 commented Aug 21, 2020

I'm not sure what is happening with the config parser but when using this way, the --imap.secure=false gets turned into {imap: {secure: "false"}} which is actually truthy. Using --imap.secure=0 seems to do the trick

You can debug configuration loading like this:

$ NODE_CONFIG_ONLY=true node server.js --imap.secure=0

this way the application prints out active configuration and exits immediately.

@louis-lau
Copy link
Member Author

I see! Thanks for the workaround and the config debug option. That's very helpful.

@louis-lau louis-lau changed the title --imap.secure=false does not disable TLS Boolean command line config arguments do not work correctly Sep 2, 2020
@louis-lau louis-lau added the bug label Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants