if exim is showing up errors like “unrouteable address”, it means that exim is trying to send mail locally. If your local dns is borked, you will get this error. The fix is to fix your local mx entry. If you have configured an external dns server, then you should go to
DNS functions -> edit dns zone -> email routing for -> check “remote mail exchanger”. That way, we are telling exim to use remote DNS server.
In the backend, it is the process of moving the domain entry from /etc/localdomain to /etc/remotedomain. But don’t edit the file locally because these files are versioned controlled via whm. Change them from Whm as per described above.
sometimes your IP gets blocked if you have done something funny on the server. Best way is to ssh into the server csf -r (Restart CSF) csf -d (quick deny an ip: csf -d xxx.xxx.xxx.xxx) csf -a (quick allow / whitelist an ip: csf -a xxx.xxx.xxx.xxx) csf -dr (unblock an ip and remove from the … Continue reading
To look at all the messages in mail queue, exim -bp To remove a message from the queue: exim -Mrm “message-id” To clear all messages in the queue: exim -bp | exiqgrep -i | xargs exim -Mrm
Cpanel website provides some good tips to harden your server After login to whm, go to configserver security & firewall and add your IP to the “allow ip” list. https://documentation.cpanel.net/display/CKB/How+to+Prevent+Email+Abuse WHM > Server Configuration > Tweak Settings, Mail -> Set Initial default/catch-all forwarder destination to false https://documentation.cpanel.net/display/CKB/Tips+to+Make+Your+Server+More+Secure go to security center -> security advisor and … Continue reading
If you are using git and are writing plugins for wordpress, its a hassle to switch between the 2 SCM. Why not commit once and deploy to 2 places? that is what many people are trying to do. this script does exactly that: https://github.com/benbalter/Github-to-WordPress-Plugin-Directory-Deployment-Script Create a plugin first. I suggest using all lowercase, eg blarblar-blarblar-blarblar. … Continue reading
If you are using php, and try to run command line scripts containing php command, you will get a loop that fails with a warning “cannot fork” or memory error. This is because you are most likely using suphp in cpanel. While suphp is popular, it fails misery when trying to execute php command line. … Continue reading
Like github, bitbucket sends a useful json post data to a url specified by you if you add a post hook in a the bitbucket repo. The post json can be useful if you want to determine the file changes of the branch that has the change. example json is
there might be times when you want to restructure the default public_html directory structure. The document root might reside somewhere deep in for security reasons. go to /var/cpanel/userdata/USERNAME/DOMAIN.COM edit the documentroot line then /scripts/rebuildhttpdconf service httpd restart
sometimes it is necessary to add new order type, for example some of the items i sell requires installer confirmation. Thanks woocommerce, the hooks are easy to use. In your functions file:
Sometimes it is useful to export custom query and then import it as a csv into another table mysql -uroot -p your_db -e “select_query INTO OUTFILE ‘/tmp/query.csv’ FIELDS TERMINATED BY ‘,’ ENCLOSED BY ‘\”‘ LINES TERMINATED BY ‘\n’”