[POSTFIX/CONFIG WRITING] On the subject of newlines and the lack of them

Attempting to add a missing (not existing in file yet) option to Postfix while the Postfix main.cf file doesn't end in a newline, gives a corrupt result such as this:

smtpd_data_restrictions = reject_unauth_pipeliningmynetworks = 10.0.0.0/18, 127.0.0.0/8, [::1]/128

This error may extend to Webmin's config writing in general. I assume it just appends >> data whenever it cannot locate the setting in the file already.

Status: 
Closed (works as designed)

Comments

I think this is actually a Postfix bug - Webmin uses the postconf command to add new directives to main.cf , rather than editing the file directly. So if it doesn't handle missing newlines, there isn't much we can do..