opensolutions / ViMbAdmin

Virtual Mailbox Administration
http://www.vimbadmin.net/
GNU General Public License v3.0
485 stars 101 forks source link

extends possibilities for plugin #286

Closed micdech closed 1 year ago

micdech commented 2 years ago

Hi all, is there in program to extends possibilities for plugins?

Can't see any hooks for domains, and i want to try to write a plugin for opendkim.

Anyone wants to help me or find a way to do that?

PhrozenByte commented 2 years ago

See https://github.com/opensolutions/ViMbAdmin/wiki/Plugins

The domain events are missing in the wiki, but there's quite a number of domain events you can hook into. Events are triggered using $this->notify() in DomainController (e.g. the domain_add_addPostflush event), simply check ViMbAdmin's code. There are separate events for adding (includes edits) and deleting (purging) a domain. If you need more events, you might simply add them and open a pull request - even though the project isn't as active as it used to be. There are more events for mailboxes and aliases, check their respective controller classes. Also see application/plugins/ for existing plugins; you might simply use one of them as a basis.