On Thu, 25 Apr 2019 14:56:28 +0200
Maciej Delmanowski <drybjed(a)drybjed.net> wrote:
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.
And this indeed did the trick. :)
Could you please explain what "#v+" is and does? My Google-Fu is not
strong enough to find an explanation for that. And why does the
indentation change, when using "#v+"? I tried all kinds of indentations
before and none worked.
You won't be able to comment it out, just
remove it.
Removing instead of commenting out is perfectly fine with me.
thanks
amette
Cheers,
Maciej
--
https://amette.eu
mail(a)amette.eu