On Apr 25, Alexander Mette wrote:
I'm trying to remove some of the smtpd_helo_restrictions from
Postfix'
main.cf. I thought this was working previously, but I fear it never did.
I tried the following without any luck:
postfix__maincf:
- name: 'smtpd_helo_restrictions'
value:
- name: 'reject_unknown_helo_hostname'
state: 'absent'
=> Doesn't change anything.
I'm not sure why it doesn't do anything, it should remove the entire
'smtpd_helo_restrictions' parameter from the configuration file.
- name: 'smtpd_helo_restrictions'
value:
- name: 'reject_unknown_helo_hostname'
state: 'comment'
=> Comments out the whole smtpd_help_restrictions block.
That's correct, it should comment out the entire section.
The indentation is important in this case. If you want to remove
'reject_unknown_helo_hostname', set in the inventory:
#v+
---
postfix__maincf:
- name: 'smtpd_helo_restrictions'
value:
- name: 'reject_unknown_helo_hostname'
state: 'absent'
#v-
This should do the trick. You won't be able to comment it out, just remove it.
Cheers,
Maciej