How to reset max defers limit on cPanel server

You may got:

2022-07-28 14:43:22 1oH9Pk-111Cld-8x ** [email protected] R=enforce_mail_permissions: Domain domain.com has exceeded the max defers and failures per hour (5/5 (100%)) allowed. Message discarded.

To reset:

/var/cpanel/email_send_limits/track/domain.com

If the limits too tiny on your server then adjust them per your needs:

sed -i -e 's/MAX_DEFER_FAIL_PERCENTAGE=.*/MAX_DEFER_FAIL_PERCENTAGE=125/g'
Read the rest

How to generate Self-Signed SSL on cPanel server using command line

Run and put your domain:

read -p "Domain: " domain; username=`/scripts/whoowns $domain`; email=`grep @ /var/cpanel/users/$username |tail -n1 |cut -d '=' -f2|sed -e 's/@/\%40/'`; whmapi1 generatessl domains=$domain countryName=US stateOrProvinceName=Texas localityName=Houston organizationName="The Justice League of GG" emailAddress=$email pass=`openssl rand -base64 15` keysize=2048 skip_certificate=0

Now use WHM to install it

Enjoy!… Read the rest

How to specify which IP address to use for curl or wget commands

Useful when you try to send a request from cPanel shell from your Dedicated IP address

For curl you need to use –interface to specify IP address

Example:

curl --interface 11.22.33.44 http://alltime.pp.ua/

For wget you need to use –bind-address to set IP from which you need to send a request

wget --bind-address=192.0.2.116 http://alltime.pp.ua/
Read the rest

How to get Drupal modules/plugins list using drush

To show all installed and enabled modules

drush pm-list --type=Module --status=enabled

To show all installed and enabled modules without system modules

drush pm-list --type=Module --no-core --status=enabled

To show disabled modules

drush pm-list --type=Module --no-core --status=disabled
Read the rest