Monthly Archives: August 2016

cPanel – Can’t change hostname

While setting hostname from WHM  >>  Change Hostname
We were seeing below error
“The hostname was already set to, syncing configuration only.
Error setting new hostname: Could not execute hostname binary
Could not set property: Connection timed out”
After googling found a alternate solution to this via cli
The command was   /usr/local/cpanel/bin/set_hostname  <hostname>

It would and could change hostname 🙂


Error: exim logged Undefined subroutine &main::user2uid called. LOG: MAIN

Exim error :
cwd=/root 4 args: /usr/sbin/exim -i -v
F=<> rejected by non-SMTP ACL: failed to expand ACL string "${if eq{$originator_uid}{${perl{user2uid}{nobody}}}{1}{0}}": Undefined subroutine &main::user2uid called. LOG: MAIN
cwd=/var/spool/exim 8 args: /usr/sbin/exim -v -t -oem -oi -f <> -E1UY3r2-000
root@server-web [~]# /scripts/buildeximconf
Configuration file passes test! New configuration file was installed.
/etc/ syntax OK
Enabled system filter options: attachments|spam_rewrite
/etc/ installed!
razor2 is not installed, disabling it in SpamAssassin to save memory
pyzor is not installed, disabling it in SpamAssassin to save memory
SPF is disabled in exim or unavailable, enabling SPF for SpamAssassin
Refreshing SMTP Mail protection.
root@server-web [~]# cp -rpf /etc/ /etc/

Disable Mails from single cPanel account

We were having an issue where spams emails were sent from single cpanel account

We could not suspend the account and disable emails

So the solution to this was to keep website online and disable only emails

we use the below method to disable emails for a single cPanel account.

SSH to server and use below steps to disable cpanel for any account

The newwebho is the cpanel user name

root@online [~]# chmod 0 /home/newwebho/etc/
root@online[~]# chattr +ia /home/newwebho/etc/
root@eu [~]#