Thursday, June 12, 2014

Exim commands

Print a count of the messages in the queue:

          root@localhost# exim ­bpc

Print a listing of the messages in the queue (time queued, size, message­id, sender, recipient):

         root@localhost# exim ­bp

Print a summary of messages in the queue (count, volume, oldest, newest, domain, and totals):

         root@localhost# exim ­bp | exiqsumm
Start a queue run:

         root@localhost# exim ­q ­v

Start a queue run for just local deliveries:

         root@localhost# exim ­ql ­v

Remove a message from the queue:

       root@localhost# exim ­Mrm <message­id>

Freeze a message:


       root@localhost# exim ­Mf <message­id>

View the log for the message;

       exim ­Mvl msgid

Remove message without sending any error message;

     exim ­Mrm messageID

Giveup and fail message to bounce the message to the Sender:

       exim ­Mg messageID

How many Frozen mails in the queue:


         exim ­bpr | grep frozen | wc ­l

How to change cPanel User password in Backend?

cPanel password of a domain can be changed from command line using cPanel script. Given below are the steps to do the same.
1. Login to your server as root via SSH.
2. Execute the following script from the command line.
/scripts/chpass [username] [password]
Replace [username] with the cPanel user name of the domain & [password] with the new password.
3. Synchronizing the new password with FTP password;
In cPanel/WHM servers, whenever a new account is created in WHM, by default a FTP account is created. The cPanel password and FTP password are synchronized. Use the following command to synchronize the new password with FTP password.
/scripts/ftpupdate

Tuesday, June 10, 2014

Protect directory in a domain

open httpd.conf  file and add folllowing entries.

<Directory "/usr/http/htdocs/active/protect">  (To use your own directory path)
AuthType Basic
AuthName "Authentication Required"
AuthUserFile "/usr/http/.htpasswd"
Require valid-user
</Directory>

Then executed following cmd for adding username and password

htpasswd -cm /usr/http/.htpasswd jobin

Domain Forwarding - frame forwarding and normal redirect

Normal Redirect

open httpd.conf file and edit following lines.
             AllowOverride none to AllowOverride All

add below content to .htaccess in documentroot

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.activetest.com$
RewriteRule ^(.*)$ http://www.yahoo.com/$1 [R=301]

Frame Forwarding

Add below line to html header of index.html file

<frameset cols = "100%">
<frame src ="http://www.google.com" />
</frameset>