Commit 9234cc83 authored by tbrehm's avatar tbrehm

Reload postfix configuration when a transport is changed.

parent 403e4b9e
......@@ -68,6 +68,11 @@ class mail_plugin {
//$app->plugins->registerEvent('mail_domain_update',$this->plugin_name,'domain_update');
$app->plugins->registerEvent('mail_domain_delete',$this->plugin_name,'domain_delete');
//* Mail transports
$app->plugins->registerEvent('mail_transport_insert',$this->plugin_name,'transport_update');
$app->plugins->registerEvent('mail_transport_update',$this->plugin_name,'transport_update');
$app->plugins->registerEvent('mail_transport_delete',$this->plugin_name,'transport_update');
}
......@@ -164,6 +169,14 @@ class mail_plugin {
}
}
function transport_update($event_name,$data) {
global $app, $conf;
exec('/etc/init.d/postfix reload &> /dev/null');
$app->log('Postfix config reloaded ',LOGLEVEL_DEBUG);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment