API Hook for bulk mailbox and forward creation?
Hi,
I am using Cpanel API Hooks for adding mailbox accounts and forwarders. I just tested the Address Importer Cpanel functionality which allows bulk creation of mailboxes and forwarders from a CSV file. This doesn't appear to trigger any of the API hooks for creating mailboxes or forwarders. Either there should be a hook triggered for each mailbox/forward creation or there should be one hook triggered for the bulk mailbox/forward creation. I think this should be logged as a bug or feature request.
Regards
Murray
-
I am using Cpanel API Hooks for adding mailbox accounts and forwarders.
Hello, Could you provide an example of one of the hooks that you implemented, and the method you used to create it? Thank you.0 -
Hi Michael, Thanks for the reply. We are using a perl module for the Hooks. The hooks for mailbox and forward creation are below. We had some old WHM skins that used API1 hooks but I don't think they get triggered any more. Hope the info below helps. THanks Murray my $mail_addpop = { 'category' => 'Cpanel', 'event' => 'Api2::Email::addpop', 'stage' => 'post', 'hook' => 'DSMail::Hooks::addpop', 'exectype' => 'module', }; my $mail_addpop_api1 = { 'category' => 'Cpanel', 'event' => 'Api1::Email::addpop', 'stage' => 'post', 'hook' => 'DSMail::Hooks::addpop_api1', 'exectype' => 'module', }; my $mail_addforward = { 'category' => 'Cpanel', 'event' => 'Api2::Email::addforward', 'stage' => 'post', 'hook' => 'DSMail::Hooks::addforward', 'exectype' => 'module', }; my $mail_addforward_api1 = { 'category' => 'Cpanel', 'event' => 'Api1::Email::addforward', 'stage' => 'post', 'hook' => 'DSMail::Hooks::addforward', 'exectype' => 'module', };0 -
Hello, Could you enable debug mode and let us know the output to /usr/local/cpanel/logs/error_log when reproducing the issue? Documentation on how to do this is found at: Guide to Testing Custom Code - Standardized Hooks - Software Development Kit - cPanel Documentation Thank you. 0
Please sign in to leave a comment.
Comments
3 comments