Skip to content
Snippets Groups Projects
Commit a29401db authored by Thom's avatar Thom :tools:
Browse files

Add new function for custom config usage for Postfix and Dovecot (#5988)

parent 1edf68ef
No related branches found
No related tags found
No related merge requests found
Pipeline #7525 passed
......@@ -1182,6 +1182,12 @@ class installer_base {
$content = strtr($content, $postconf_placeholders);
$postconf_commands = array_merge($postconf_commands, array_filter(explode("\n", $content)));
}
if(file_exists($conf['ispconfig_install_dir'].'/server/conf-custom/install/postfix_custom.conf.master')) {
$configfile = 'postfix_custom.conf';
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master');
$content = strtr($content, $postconf_placeholders);
$postconf_commands = array_merge($postconf_commands, array_filter(explode("\n", $content)));
}
// Remove comment lines, these would give fatal errors when passed to postconf.
$postconf_commands = array_filter($postconf_commands, function($line) { return preg_match('/^[^#]/', $line); });
......
# Do not change this file, as changes will be overwritten by any ISPConfig update. Put your custom settings in /etc/dovecot/conf.d/99-custom-config.conf
listen = *,[::]
protocols = imap pop3
auth_mechanisms = plain login
......@@ -88,7 +89,7 @@ protocol lmtp {
#2.3+ group = vmail
#2.3+ mode = 0660
#2.3+ }
#2.3+
#2.3+
#2.3+ unix_listener stats-writer {
#2.3+ user = vmail
#2.3+ group = vmail
......@@ -131,3 +132,4 @@ namespace inbox {
special_use = \Trash
}
}
!include_try conf.d/99-custom-config.conf
# Do not change this file, as changes will be overwritten by any ISPConfig update. Put your custom settings in /etc/dovecot/conf.d/99-custom-config.conf
listen = *,[::]
protocols = imap pop3
auth_mechanisms = plain login
......@@ -86,7 +87,7 @@ protocol lmtp {
#2.3+ group = vmail
#2.3+ mode = 0660
#2.3+ }
#2.3+
#2.3+
#2.3+ unix_listener stats-writer {
#2.3+ user = vmail
#2.3+ group = vmail
......@@ -108,3 +109,4 @@ plugin {
quota_status_nouser = DUNNO
quota_status_overquota = "552 5.2.2 Mailbox is full"
}
!include_try conf.d/99-custom-config.conf
# Do not change this file, as changes will be overwritten by any ISPConfig update. Put your custom settings in /etc/dovecot/conf.d/99-custom-config.conf
listen = *,[::]
protocols = imap pop3
auth_mechanisms = plain login
......@@ -82,7 +83,7 @@ protocol lmtp {
#2.3+ group = vmail
#2.3+ mode = 0660
#2.3+ }
#2.3+
#2.3+
#2.3+ unix_listener stats-writer {
#2.3+ user = vmail
#2.3+ group = vmail
......@@ -125,3 +126,4 @@ namespace inbox {
special_use = \Trash
}
}
!include_try conf.d/99-custom-config.conf
# You can use this file for custom Postfix settings. The used settings will overrule the settings set by ISPConfig.
# Use with caution!
# Put this file in /usr/local/ispconfig/server/conf-custom/install/ and make your changes there.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment