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 has exceeded the max defers and failures per hour (5/5 (100%)) allowed. Message discarded.

To reset:


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

Read the rest

How to create a file of specific size using Linux command line

Run for a second:

yes "some text" > testfile.txt

Reduce size:

truncate -s 50M testfile.txt

Create 50M file using fallocate command

fallocate -l 52428800 testfile.txt

To be more exact using inline arithmetic:

fallocate -l $((50*1024*1024)) > testfile.txt

Using head command

head -c 50MB /dev/urandom > testfile.txt
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 disable swap partition

To see your swap usage run the following:

free -m

To disable swap without reboot and just temporary run the following:

sudo swapoff -a

This will wipe out used swap space and disable it

To get this enabled again run next:

sudo swapon -a

To disable swap permanently you need to edit /etc/fstab as root and comment out a line related to swap

For example:

cat /etc/fstab |grep swap

# swap was on /dev/nvme0n1p6 during installation
#UUID=d10c1d70-bb88-43fc-bbe2-e17592b660ba none swap sw 0 0

Then reboot your machine to apply the change or try to run next:

mount -a

To reboot run:


Enjoy!… Read the rest

How to calculate innodb_buffer_pool_size value

Run to the following command to start calculation:

(SELECT SUM(data_length+index_length) Total_InnoDB_Bytes
FROM information_schema.tables WHERE engine='InnoDB') A;


Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 60295069
Server version: 10.3.34-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Read the rest