How to uninstall apf in linux machine
You can use the following steps to uninstall apf in a linux machine:
Stop the apf service running in the server.
$ /etc/rc.d/init.d/apf stop
Remove the apf files from the server.
$ rm -Rf /etc/apf
$ rm -Rf /etc/rc.d/init.d/apf
$ rm -Rf /var/log/apf_log
$ rm -Rf /var/log/apfados_log
$ rm -Rf /usr/local/sbin/apf
Disable apf in the run levels.
$ /sbin/chkconfig –level 345 apf off
Open up and remove this line:
$ vi /etc/cron.daily/fw
/etc/rc.d/init.d/apf restart >> /dev/null 2>&1
ip_conntrack and APF issue
A server is limited to a certain number of TCP/IP connections that it can keep track of.
ip_conntrack is a module which has the limit set in its conntrack database. If the table exceeds this limit, even the legitimate packets will be dropped.
We usually tweak this parameter in the sysctl.conf file.
But if you have APF installed, even if you set the sysctl parameter, APF will reset the conntrack value, since APF configuration file has conntrack value set to 34576 by default. [SYSCTL_CONNTRACK="34576"].
So in servers having APF, you would need to increase the above parameter and then restart APF.
RSYNC to backup your home DIR from your OLD server to New
Login to your new cPanel server as root user.
rsync -vrplogDtH –exclude=virtfs/ –progress -e ssh root@old-server-ip-address:/home/ /home/
Useful Exim Commands
Exim is a mail transfer agent used on Unix-like operating systems. Exim is highly configurable, and therefore has features that are lacking in other MTAs. Exim has always had substantial facilities for mail policy controls, providing facilities for the administrator to control who may send or relay mail through the system.
To print a count of the mails in the queue -> exim -bpc
Print a listing of the messages in the queue (time queued, size, message-id, sender, recipient) -> exim -bp
To show the current configuration file of exim -> exim -bP
To show the version and configuration file of exim -> exim -bV
Generate and display Exim stats from a logfile -> eximstats /var/log/exim_mainlog
Print what Exim is doing right now -> exiwhat
To Print the message-id of the messages in queue -> exiqgrep -i
To remove a mail from the queue -> exim -Mrm
To freeze a mail -> exim -Mf
To deliver a specific mail from the queue -> exim -M
To remove all frozen mails -> exiqgrep -z -i | xargs exim -Mrm
To view the headers of a mail -> exim -Mvh
To view body of a mail -> exim -Mvb
Spamd failing
If you find the “spamd” failing error on an exim restart.
Solution
When disabling “spamd”, the Cpanel create a file named “/etc/spamdisable” which may not get deleted on enabling the “spamd” feature again. Check the presence of the above said file.
The issue may also arise due to unavailability of the perl module “Mail::SpamAssassin” by installing the the same and on restarting the exim, the issue will be fixed.
1. /scripts/perlinstaller — - force Mail::SpamAssassin
Run exim restart
2. /etc/init.d/exim restart