Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Alert on forwarders' changed

Discussion in 'E-mail Discussion' started by ebizindia, Mar 26, 2019.

Tags:
  1. ebizindia

    ebizindia Well-Known Member

    Joined:
    Oct 13, 2005
    Messages:
    95
    Likes Received:
    3
    Trophy Points:
    158
    Location:
    Kolkata, India
    cPanel Access Level:
    Root Administrator
    Hi

    As a root level user, is there a way to set up an alert whenever any domains forwarders are changed.

    The reason I ask for this is that some hackers are setting forwarders on users' account, watching their emails and then asking their clients to pay to the hackers' accounts instead of the clients.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,529
    Likes Received:
    2,181
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @ebizindia,

    There's no direct feature to alert you when a new forwarder is created or modified, but you could develop a custom script to send you a notification and then setup a post-stage hook that runs your custom script immediately after a forwarder is created or modified.

    You can find the specific API function to hook into by enabling "Debug mode is on. The system displays information about every stage for every hookable event, even if no hooks exist for that stage." under the "Development" tab in "WHM >> Tweak Settings". Then, perform the specific action you want to hook into via cPanel or WHM, and watch the output in /usr/local/cpanel/logs/error_log.

    For example, the following cPanel API 2 function is the hook event to utilize when creating a hook for the addition of a new domain using cPanel >> Addon Domains:

    Cpanel::Api2::AddonDomain::addaddondomain

    The following links are a good place to start when learning about hooks:

    Tutorial - Create a Standardized Hook - Developer Documentation - cPanel Documentation
    Tutorial - How to Setup Standardized Hooks with BASH in cPanel & WHM
    Tutorial - How To Automatically Install WordPress On New Accounts

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    ebizindia likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice