@@ -45,10 +45,15 @@ function onLoad() {
4545 Register for the events
4646 */
4747
48+ //* Mailboxes
4849 $ app ->plugins ->registerEvent ('mail_user_insert ' ,$ this ->plugin_name ,'user_insert ' );
4950 $ app ->plugins ->registerEvent ('mail_user_update ' ,$ this ->plugin_name ,'user_update ' );
5051 $ app ->plugins ->registerEvent ('mail_user_delete ' ,$ this ->plugin_name ,'user_delete ' );
5152
53+ //* Mail Domains
54+ //$app->plugins->registerEvent('mail_domain_insert',$this->plugin_name,'domain_insert');
55+ //$app->plugins->registerEvent('mail_domain_update',$this->plugin_name,'domain_update');
56+ //$app->plugins->registerEvent('mail_domain_delete',$this->plugin_name,'domain_delete');
5257
5358 }
5459
@@ -62,7 +67,6 @@ function user_insert($event_name,$data) {
6267 exec ('chown ' .$ mail_config ['mailuser_name ' ].': ' .$ mail_config ['mailuser_group ' ].' ' .escapeshellcmd ($ data ['new ' ]['maildir ' ]));
6368 $ app ->log ('Created Maildir: ' .$ data ['new ' ]['maildir ' ],LOGLEVEL_DEBUG );
6469 }
65-
6670 }
6771
6872 function user_update ($ event_name ,$ data ) {
@@ -86,7 +90,6 @@ function user_update($event_name,$data) {
8690 rmdir ($ data ['old ' ]['maildir ' ]);
8791 $ app ->log ('Moved Maildir from: ' .$ data ['old ' ]['maildir ' ].' to ' .$ data ['new ' ]['maildir ' ],LOGLEVEL_DEBUG );
8892 }
89-
9093 }
9194
9295 function user_delete ($ event_name ,$ data ) {
@@ -99,7 +102,6 @@ function user_delete($event_name,$data) {
99102 } else {
100103 $ app ->log ('Possible security violation when deleting the maildir: ' .$ data ['old ' ]['maildir ' ],LOGLEVEL_ERROR );
101104 }
102-
103105 }
104106
105107
0 commit comments