Skip to content
Snippets Groups Projects
Commit 03200f17 authored by Florian Schaal's avatar Florian Schaal
Browse files

add amavis-configfile-location for centos 6.4; add amavis-initscrip-name for...

add amavis-configfile-location for centos 6.4; add amavis-initscrip-name for centos 6.4; fixed missing private_key in mail/mail_domain_dkim_create.php
parent d24bb483
No related branches found
No related tags found
No related merge requests found
...@@ -95,7 +95,7 @@ switch ($_POST['action']) { ...@@ -95,7 +95,7 @@ switch ($_POST['action']) {
exec('openssl rand -out /usr/local/ispconfig/server/temp/random-data.bin 4096', $output, $result); exec('openssl rand -out /usr/local/ispconfig/server/temp/random-data.bin 4096', $output, $result);
exec('openssl genrsa -rand /usr/local/ispconfig/server/temp/random-data.bin 1024', $privkey, $result); exec('openssl genrsa -rand /usr/local/ispconfig/server/temp/random-data.bin 1024', $privkey, $result);
unlink("/usr/local/ispconfig/server/temp/random-data.bin"); unlink("/usr/local/ispconfig/server/temp/random-data.bin");
$private_key=''; foreach($privkey as $values) $private_key=$private_key.$values."\n";
break; break;
case 'show': /* show the DNS-Record onLoad */ case 'show': /* show the DNS-Record onLoad */
......
...@@ -77,7 +77,8 @@ class mail_plugin_dkim { ...@@ -77,7 +77,8 @@ class mail_plugin_dkim {
$pos_config=array( $pos_config=array(
'/etc/amavisd.conf', '/etc/amavisd.conf',
'/etc/amavisd.conf/50-user', '/etc/amavisd.conf/50-user',
'/etc/amavis/conf.d/50-user' '/etc/amavis/conf.d/50-user',
'/etc/amavisd/amavisd.conf'
); );
$amavis_configfile=''; $amavis_configfile='';
foreach($pos_config as $conf) { foreach($pos_config as $conf) {
...@@ -123,13 +124,22 @@ class mail_plugin_dkim { ...@@ -123,13 +124,22 @@ class mail_plugin_dkim {
*/ */
function restart_amavis() { function restart_amavis() {
global $app, $conf; global $app, $conf;
$initfile=$conf['init_scripts'].'/amavis'; $pos_init=array(
$app->log('Restarting amavis.', LOGLEVEL_DEBUG); $conf['init_scripts'].'/amavis',
exec(escapeshellarg($conf['init_scripts']).escapeshellarg('/amavis').' restart', $output); $conf['init_scripts'].'/amavisd'
);
$initfile='';
foreach($pos_init as $init) {
if (is_executable($init)) {
$initfile=$init;
break;
}
}
$app->log('Restarting amavis: '.$initfile.'.', LOGLEVEL_DEBUG);
exec(escapeshellarg($initfile).' restart', $output);
foreach($output as $logline) $app->log($logline, LOGLEVEL_DEBUG); foreach($output as $logline) $app->log($logline, LOGLEVEL_DEBUG);
} }
/** /**
* This function writes the keyfiles (public and private) * This function writes the keyfiles (public and private)
* @param string $key_file full path to the key-file * @param string $key_file full path to the key-file
......
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