Skip to content

Commit 871298f

Browse files
author
Marius Cramer
committed
Merge branch 'master' into 'master'
Master See merge request !134
2 parents 4e52e11 + 9514971 commit 871298f

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

interface/web/tools/resync_do.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ function query_server($table, $server_id, $server_type, $where = "WHERE active =
244244
$index_field = 'mailuser_id';
245245
$server_type = 'mail';
246246
$server_id = $app->functions->intval($this->dataRecord['mailbox_server_id']);
247-
if ($server_id == -1) $tmp = query_server($db_table, $server_id, $server_type, 'WHERE 1', false); else $tmp = query_server($db_table, $server_id, $server_type);
247+
if ($server_id == -1) $tmp = query_server($db_table, $server_id, $server_type, 'WHERE 1', false); else $tmp = query_server($db_table, $server_id, $server_type, 'WHERE 1');
248248
$records = $tmp[0];
249249
$server_name = $tmp[1];
250250
unset($tmp);

server/plugins-available/mail_plugin_dkim.inc.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,14 @@ function check_system($data) {
117117
$app->log('Amavis-config not found or not writeable.', LOGLEVEL_ERROR);
118118
$check=false;
119119
}
120+
120121
/* dir for dkim-keys writeable? */
121122
$mail_config = $app->getconf->get_server_config($conf['server_id'], 'mail');
122123
if ( isset($mail_config['dkim_path']) &&
123124
!empty($mail_config['dkim_path']) &&
124125
isset($data['new']['dkim_private']) &&
125126
!empty($data['new']['dkim_private']) &&
126-
$mail_config['dkim_path'] != '/' &&
127-
$app->system->checkpath($mail_config['dkim_path'])
127+
$mail_config['dkim_path'] != '/'
128128
) {
129129
if (!is_dir($mail_config['dkim_path'])) {
130130
$app->log('DKIM Path '.$mail_config['dkim_path'].' not found - (re)created.', LOGLEVEL_DEBUG);
@@ -150,6 +150,11 @@ function check_system($data) {
150150
$check=false;
151151
}
152152

153+
if ( !$app->system->checkpath($mail_config['dkim_path']) ) {
154+
$app->log('DKIM Path '.$mail_config['dkim_path'].' failed in checkpath.', LOGLEVEL_ERROR);
155+
$check = false;
156+
}
157+
153158
} else {
154159
$app->log('Unable to write DKIM settings - no or invalid DKIM-Path defined', LOGLEVEL_ERROR);
155160
$check=false;
@@ -184,7 +189,7 @@ function restart_amavis() {
184189
* @param string $key_file full path to the key-file
185190
* @param string $key_value private-key
186191
* @param string $key_domain mail-domain
187-
* @return bool - true when the key is written to disk
192+
* @return bool - true when the private key was written to disk
188193
*/
189194
function write_dkim_key($key_file, $key_value, $key_domain) {
190195
global $app, $mailconfig;

0 commit comments

Comments
 (0)