The RPM::Versions category creates hookable events for RPMs.

cPanel & WHM ships with preconfigured RPM::Versions hooks.



RPM::Versions events use the RPM naming format, where RPM is the name of the RPM to associate with the hook.

Available Stages:

  • pre — Hook action code runs before the event.
  • post — Hook actions code runs after the event.

Action Code Runs As:

The WHM user.

Blocking Attribute:

Escalate Privileges Attribute:

Output parameters

The chosen stage determines the event's output. Select the appropriate tab to view output parameters for that stage. 

This stage does not produce output.

This stage does not produce output.

Preconfigured RPM::Versions hooks

The following table lists cPanel & WHM's preconfigured RPM::Versions hooks:

RPMpre Script(s)post Script(s)


  • /scripts/postcourierinstall
  • /scripts/postcourierup
  • /scripts/postcourier-imapup
dovecot /scripts/predovecotup /scripts/postdovecotup
exim /scripts/preeximup /scripts/posteximup
pure-ftpd /scripts/preftpup /scripts/postftpinstall 


We removed the MySQL50 RPM target in cPanel & WHM version 68.

/scripts/premysqlup /scripts/postmysqlinstall 


We removed the MySQL51 RPM target in cPanel & WHM version 68.

/scripts/premysqlup /scripts/postmysqlinstall 
MySQL55-server /scripts/premysqlup /scripts/postmysqlinstall 
nsd /scripts/prednsup /scripts/postnsdup

The /var/cpanel/legacy_hooks touch file determines whether the system has already created these hooks. To prevent the creation of these hooks, touch the file before you install cPanel & WHM.