Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mail conf task #1238

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

add mail conf task #1238

wants to merge 9 commits into from

Conversation

boonkerz
Copy link

set up certs for multiple domains in Postfix and Dovecot

'settinggroup' => 'system',
'varname' => 'mda_conf_dir',
'type' => 'text',
'string_type' => 'filedir',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use string_type confdir here as this setting will not be a file and we want to check for disallowed paths, also, the (default) value should end with /

'settinggroup' => 'system',
'varname' => 'mta_conf_dir',
'type' => 'text',
'string_type' => 'filedir',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as mda conf dir, the type should be confdir and the default value should end with a /

@@ -613,7 +613,9 @@
('system', 'mdalog', '/var/log/mail.log'),
('system', 'mtalog', '/var/log/mail.log'),
('system', 'mdaserver', 'dovecot'),
('system', 'mda_reload_command', 'service dovecot restart'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing mda_conf_dir and mta_conf_dir, also incrementing db_version is required for correct update handling

@@ -97,6 +97,10 @@
Update::showUpdateStep("Adding new settings");
Settings::AddNew("system.le_renew_services", "");
Settings::AddNew("system.le_renew_hook", "systemctl restart postfix dovecot proftpd");
Settings::AddNew("system.mda_reload_command", "service dovecot reload");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a new update section with a new db-version is required or users on that version will not get the updates

$vhosts_file_handler = fopen($vhosts_filename, 'w');
fwrite($vhosts_file_handler, $vhosts_file);
fclose($vhosts_file_handler);
FileDir::safe_exec('postmap -F hash:'.$vhosts_filename);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is this map integrated in the postfix config and being used?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, missed the 'postconf -e tls_server_sni_maps' command there, sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants