Add config file changes to UI
This is another feature enhancement suggestion that might be easier than others. I'm hoping it can just be added to the pile of such suggestions for consideration.
The feature for adding Apache Directives can be used as a model for /etc/postfix/main.cf and /etc/dovecot/dovecot.conf. In System Config>Mail provide a textarea for Additional Postfix Settings, and another for Additional Dovecot Settings. On Save the resulting config files will have a distinctive #! comment to separate these sections from existing settings. Example:
#! Set by ISPConfig Template: ... smtp_helo_timeout = 15s smtp_mail_timeout = 15s smtp_tls_CApath=/etc/ssl/certs smtp_tls_exclude_ciphers = RC4, aNULL smtp_tls_protocols = !SSLv2,!SSLv3 smtp_tls_security_level = may #! ISPConfig Overrides smtp_mail_timeout = 30s smtpd_tls_loglevel = 1 smtp_tls_security_level = dane
On Save, scan for
^#! ISPConfig Overrides$, remove anything below it, and insert the new content.
For consistency that pattern can be used for Postfix and Dovecot, but for Dovecot it can be made more elegant: In the tpl config, add the single line
!include conf.d/93-ispconfig.conf and then create that file. Just replace that file with the UI textarea. At some point if Postfix supports an
include directive then the same mechanism can be used.
Rather than using postconf for update, for this mechanism just reload Postfix whenever the related textarea changes. An admin using multi-line settings and comments is more free to write the config as they please, for better or worse.
ISPConfig itself could use this same mechanism, where defaults set by install/update are in the config file under comment
#! Set by ISPConfig Template, updates made through the UI or API are echoed under that with comment
#! Set in ISPConfig and then under that the manual overrides can follow. This would allow the admin to easily see only fields that are defined with ISPConfig, rather than using postconf or doveconf statements which return all possible settings.