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

[BUG] smtpd_sasl_auth_enable: no not working #103

Closed
gojufhv opened this issue Apr 19, 2020 · 3 comments
Closed

[BUG] smtpd_sasl_auth_enable: no not working #103

gojufhv opened this issue Apr 19, 2020 · 3 comments
Labels

Comments

@gojufhv
Copy link

gojufhv commented Apr 19, 2020

Bug details

Describe the bug

If you want to disable sasl auth for example on a mx only server, this will result in a not working configuration.

If smtpd_sasl_auth_enable: no is set in pillar, this will result in smtpd_sasl_auth_enable = False in main.cf

postfix/smtpd[333]: fatal: bad boolean configuration: smtpd_sasl_auth_enable = False

Steps to reproduce the bug

Pillar:

postfix:
  config:
    smtpd_sasl_auth_enable: no

Expected behaviour

It should write "smtpd_sasl_auth_enable = no" in the main.cf config file.

@gojufhv gojufhv added the bug label Apr 19, 2020
@gojufhv gojufhv changed the title [BUG] [BUG] smtpd_sasl_auth_enable: no not working Apr 19, 2020
@EvaSDK
Copy link
Contributor

EvaSDK commented Apr 19, 2020

You are confused by YAML syntax. The formula does not try to be smart by switch boolean to strings for you. Simply quoting no here will do what you expect.
https://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html#true-false-yes-no-on-off

@myii
Copy link
Member

myii commented Apr 19, 2020

Thanks @EvaSDK.

@gojufhv We're using yamllint in this repo, to specifically avoid this problem as much as possible. If you look at pillar.example, it shows you that the values are quoted:

smtpd_sasl_auth_enable: 'yes'

So just change that to 'no' as @EvaSDK mentioned and you should be fine.

@gojufhv
Copy link
Author

gojufhv commented Apr 20, 2020

Thank you @EvaSDK and @myii - and sorry for wasting your time. I should have read the example more carefully. Using quotes solved my problem.

@gojufhv gojufhv closed this as completed Apr 20, 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

3 participants