To list the perl modules installed
#instshmod
Press l to list the modules installed.
then Exit
#cpan
Exim
/var/log/exim_mainlog (Exim log folder )
# exim -bpc (to list the mail count in queue)
# exim -bp (to list the mail in detail)
# exim -Mvh 'mail header' (to list the particular mail in detail)
# exiqgrep -i | xargs exim -Mrm (to delete the whole mails in the queue)
================================================================================
Give the below steps to delete the selected mails in the queue.
------------------------------------------------------------------------------------------
exim -bp | awk '$6~"frozen" {print $3 }' | xargs exim -Mrm
grep -lr 'nobody@' /var/spool/exim/input/ | \sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs exim -Mrm
grep -rl 'From: Mail Delivery System' /var/spool/exim/input/ | \sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs exim -Mrm
grep -rl 'X-Spam-Status: Yes' /var/spool/exim/input/ | \sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs exim -Mrm
grep -rl 'Subject: Mail delivery failed' /var/spool/exim/input/ | \sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs exim -Mrm
grep -rl 'Message rejected' /var/spool/exim/input/ | \sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs exim -Mrm
grep -rl 'retry time not reached for any host' /var/spool/exim/input/ | \sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs exim -Mrm
grep -lr 'Cialis' /var/spool/exim/input/ | \sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs exim -Mrm
grep -lr 'viagra' /var/spool/exim/input/ | \sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs exim -Mrm
grep -lr 'Pharmaceutical' /var/spool/exim/input/ | \sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs exim -Mrm
grep -lr '***SPAM***' /var/spool/exim/input/ | \sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs exim -Mrm
=============================================================================================
# mail -v testingaccount12@gmail.com (Use this command for sending a mail from client server to test email account named testing account 12@gmail.com)
FOR CREATING ACCOUNTS VIA BACK END
-----------------------------------------------------------------------
/scripts/wwwacct domainname.com username password
eg: /scripts/wwwacct traveltreez.asia travelt test123
======
cat /etc/wwwacct.conf for general details.
=======
======================================================
TO KNOW THE SERVER USING SUPHP OR DSO
#/usr/local/cpanel/bin/rebuild_phpconf --current
TO LIST THE CURRENT STATUS OF THE BACKUP
# cd /usr/local/cpanel/logs/cpbackup/
# tail -f (Any log file listed there)
To list the suspended list
====================
cat /var/cpanel/suspended/username(Specify the user name)
ls -l /var/cpanel/suspended/username(Specify the user name)
To get the list of Ips which are taking more resources
EACCELERATOR
===============
lynx -dump -width 2086 http://localhost/whm-server-status
Need to check abt this
============================================================
/usr/local/cpanel/bin/spf_installer flanders
/usr/local/cpanel/bin/domain_keys_installer flanders
TO STOP THE MAILMAN TO RUN ON THE SERVER
Add the following line to the file /usr/local/apache/conf/includes/pre_main_global.conf
====
TO CHNAGE THE MAX EMAIL COUNT PER HOUR
vi /var/cpanel/cpanel.config
Search for ( maxemailsperhour ) in it.
TO DROP THE CACHE MEMORY
echo 1 > /proc/sys/vm/drop_caches
TO CREATE A TEST MAIL ACCOUT
Eg, /script/addpop test@unni.com
TO CHECK MALDET IS RUNNING DAILY
====
/usr /local/maldet/event_log
Script to create a range of somthing
UBUNTU .htaccess settings for protecting an area with passoword
======================================================
https://help.ubuntu.com/community/EnablingUseOfApacheHtaccessFiles
http://ubuntulinux.co.in/blog/ubuntu/htpasswd-setup-in-ubuntu/
Apache's mod_userdir allows users to view their sites by entering a tilde(~) and their username as the uri on a specific host
==============================================================================================.
Main >> Security Center >> Apache mod_userdir Tweak
mod_userdir Protection
DEBIAN
=========
http://wiki.debian.org/Manual-Howto#AWStats_on_Debian
SCRIPT
=============
To create the particular format
for i in {2..254}; do echo "184.22.144.$i ns1.acroporebun.com"; done
To execute command for VPS by stand in Main node
======
vzctl exec 3031246 pstree; vzctl exec 3031246 w
To change the permission of files and directories
=====
find . -type d -perm 777 -exec chmod 755 {} \;
find . -type f -perm 777 -exec chmod 755 {} \;
Resolve suexec permission issue server wide
-----------------------------------------------------------------------------
After enabling SuExec on server most users getting “500 Internal Server Error” at that time refer following steps.
1st) Correct cPanel users files/directories ownership.
——------------------------------------------------------------------
for i in `cat /etc/trueuserdomains | awk ‘{print $2}’`
do
chown $i.$i /home/$i -R;
chown $i.mail /home/$i/etc -R;
chown $i.nobody /home/$i/public_html;
done;
—–-------------------------------------------------------------------