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!

Script triggered on removal of DNS zone?

Discussion in 'cPanel Developers' started by charlesd, May 27, 2010.

  1. charlesd

    charlesd Registered

    May 27, 2010
    Likes Received:
    Trophy Points:
    Hi all,

    I'm integrating cPanel with our external spam filters and need a way to capture DNS zones as they're removed (likely through account termination) so I can remove the domain from our spam filters. I've checked the existing script hooks and thought /scripts/postkillacct would give me what I need, but it just tells me the username and that DNS was killed, but not what the actual domain that was removed.

    Am I missing something here? Is there an easy way via the scripts to get the domains removed when an account has been terminated?

  2. cPanelDavidN

    cPanelDavidN Integration Developer

    Dec 17, 2009
    Likes Received:
    Trophy Points:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hi Charles,

    Have you considered a prekillacct script? You could take the user name from that, look up the zone, then store it in a tmp file. Then, have a postkillacct that looks for the tmp file, reads the zone and does the remove-filter action; remove the tmp file.

    I suppose you could do it all in the prekillacct, but by doing the remove-filter action in the postkillacct you're know for sure that the account no longer should exist and it's safe to remove the filter.

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

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