Sunday, 30 December 2012

cPanel command-line:


To assign file owerships for webusers:

# /scripts/chownpublichtmls

To assign mail permission:

# /scripts/mailperm or WHM >> Email >> Repair Mailbox permissions.

Limit webuser resources (cpu / memory / etc):

# vi /etc/security/limits.conf

Set all files / directory recursively to secure permissions. Only in users "pwd"

# find . -type d -exec chmod 755 {} \;
# find . -type f -exec chmod 644 {} \;

Set files / directory secure permissions rest of proper. Only in users "pwd"

# find . -type f -not -perm 644 -exec chmod 644 {} \;
# find . -type d -not -perm 755 -exec chmod 755 {} \;

(suspect spam)To check maillog with sending path details.

# grep "cwd=" /var/log/exim_mainlog|awk '{for(i=1;i<=10;i++){print $i}}'|sort|uniq -c|grep cwd|sort -n

cPanel & Linux EL:

Change default linux editor (I selected VI):

# VISUAL=vi;export VISUAL;EDITOR=vi;export EDITOR;

(suspect attack)TO check current /  connection on port:80

# netstat -an | grep :80 | grep EST | awk '{ print $5 }' | awk -F: '{ print $1 }' | sort | uniq -c | sort -nk 1

Friday, 28 December 2012

Ports (tcp / udp)


Simply, The term port can refer to either physical or virtual connection points.

Well Known Ports: 0 through 1023:

The well-known port numbers are the port numbers that are reserved for assignment by the Internet Corporation for Assigned Names and Numbers (ICANN) for use by the application end points that communicate using the Internet's Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP). Each kind of application has a designated (and thus "well-known") port number. For example, a remote job entry application has the port number of 5; the Hypertext Transfer Protocol (HTTP) application has the port number of 80; and the Post Office Protocol Version 3 (POP3) application, commonly used for e-mail delivery, has the port number of 110. When one application communicates with another application at another host computer on the Internet, it specifies that application in each data transmission by using its port number. The well-known ports cover the range of possible port numbers from 0 through 1023.

Registered Ports: 1024 through 49151:

The registered port numbers are the port numbers that companies and other users register with the Internet Corporation for Assigned Names and Numbers (ICANN) for use by the applications that communicate using the Internet's Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP). In most cases, these applications run as ordinary programs that can be started by nonprivileged users. The registered port numbers are in the range from 1024 through 49151. They follow in sequence the well-known port numbers, which are, in most cases, applications that can only be started by privileged users, such as the Hypertext Transfer Protocol (HTTP) and Post Office Protocol Version 3 (POP3) applications. When one application communicates with another application at another host computer on the Internet, it specifies that application in each data transmission by using its port number. The registered ports are numbered from 1024 through 49151.

Dynamic/Private : 49152 through 65535:

The dynamic port numbers (also known as the private port numbers) are the port numbers that are available for use by any application to use in communicating with any other application, using the Internet's Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP). When one application communicates with another application at another host computer on the Internet, it specifies that application in each data transmission by using its port number. The port numbers range from 0 through 65535. However, certain port numbers - the well-known port numbers and the registered port numbers - are registered and administered by the Internet Corporation for Assigned Names and Numbers (ICANN) for use by certain classes of applications. The dynamic port numbers are in the highest range, from 49152 through 65535.

For more details:

nPULSE - Web-based network monitoring package for Linux and Unix


nPulse is a web-based network monitoring package for Linux and Unix-like
operating systems. It can quickly monitor tens, hundreds, even thousands
of sites/devices at a time on multiple ports. nPulse is written in
Perl and comes with its own (SSL optional) web server for extra security.

Also, instead of re-inventing existing code, nPulse uses many excellent
OpenSource (GPL) products including
 * Nmap                     [required]
 * Perl                              [required]
 * OpenSSL                        [optional]
 * Net::SSLeay and Mail::Mailer          [optional]
 * Java Telnet App              [included]
 * A modified version of        [included]

Required Software

Linux/Unix Version 2.1 or greater  (
Perl       Version 5.004 or later  (
Nmap       Version 2.51 or later   (

nPulse is entirely written in Perl 5. For port scanning it uses the excellent
package Nmap, available from nPulse will not work without Nmap.

Installation Instructions

Direct Download: wget

1. Unpack the distribution into a directory of choice, preferably one owned
   by root and not visible to other users.

   CMD: tar -zxf npulse-0.54.tar.gz
   CMD: gunzip npulse-0.54.tar.gz
        tar -xf npulse-0.54.tar

   (If you are reading this, then you probably have already done so. :)

2. As root, execute the setup file.

   CMD: ./

3. Follow the instructions.

4. That's it. (Advanced users might want to tweak the preferences file.)

Last few steps of the installatoin:

After # ./

Web server port [19000]:
Administrator's Login Name: admin
Enter the admin password:
Password again:
Web server hostname or ip address []:
Setup has gathered the following information. Please check it for
correctness. If anything is incorrect, exit setup and start again.

Current Directory:      /usr/src/npulse-0.54
Install Directory:      /usr/local/npulse
Config Directory:       /usr/local/npulse/etc
Log Directory:          /usr/local/npulse/log
Data Directory:         /usr/local/npulse/data
Nmap command:           /usr/bin/nmap
Traceroute command:     /bin/traceroute
Perl 5 command:         /usr/bin/perl
Automatic monitoring:   every 2 minutes
Email notification:     OFF
Allow Telnet:           yes
Secure Server (SSL):    off
Web server hostname:    your-server-IP
Web server port:        19000

nPulse has been installed and started successfully.
Use your web browser to go to


and log in as 'admin' with the password you entered previously.

To restart nPulse use /usr/local/npulse/etc/restart
To stop    nPulse use /usr/local/npulse/etc/stop

tweak the preferences files:

NOTICE: There have been reports of problems when using newer versions of nmap with nPulse. If you are using a newer version of nmap try the following:

    Stop nPulse (/usr/local/npulse/etc/stop)
    As root edit the file /usr/local/npulse/lib/
    Change line 89 from
          $site{ports} .= $p[0].',';
         $site{ports} .= $p[0].',' if $p[1] =~ /open/i;
    As root edit the file /usr/local/npulse/ (fix by: D Parker)
    Change line 240 from
          foreach (split(/,\s*/, $ports)) { push(@currentports, (split(/\//,$_))[0]); }
          foreach (split(/,\s*/, $ports)) { push(@currentports, (split(/\//,$_))[0]) if $_ =~ /open/i; }
    Start nPulse (/usr/local/npulse/etc/start)

# service iptables stop


Starting screen:

Home page:

Setup page:

To change the admin password do the following:
   As root, issue the following command:
     # ./usermod -m admin newpassword

That's it...

Thursday, 27 December 2012



           It is a powerful set of image manipulation utilities. It can read, write and manipulate images in many image formats. It can resize, rotate, sharpen, color reduce or add any other special effect to your images. And, best of all, ImageMagick is directly available from the command line. In this article, we will write a script to make it available from the query string. You can then use it, for example, to automatically generate thumbnails of your images.

Installation on cPanel server:


To check whether imagemagick installed?

# /scripts/checkimagemagick

If not, proceed Installation with

# /scripts/installimagemagick

This will take couple of minutes as it will install other packages needed by ImageMagick. After the installation, you can check your ImageMagick version through:

# /usr/bin/convert --version

root@server [~]# /usr/bin/convert --version
Version: ImageMagick 6.8.0-1 2012-12-27 Q16
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

If you want to uninstall,

# /scripts/cleanimagemagick

Through WHM:

To install Imagick:

WHM » Software » Module Installers » PHP Pecl (manage). On the box below Install a PHP Pecl enter imagick and click Install Now button - that’s it.

Restart Apache and check your phpinfo page to see the details of Imagick and ImageMagick as well.

To uninstall:

WHM » Software » Module Installers » PHP Pecl (manage). Click on Uninstall button for Imagick.

Other way to install Imagic:

  # wget
  # tar -zxvf imagick-2.3.0.tgz
  # cd imagick-2.3.0
  # phpize
  # ./configure
  # make
  # make install

Once the compilation is over you could find the file in the 
/usr/local/lib/php/extensions/no-debug-non-zts-20060613 directory.

  # vi /usr/local/lib/php.ini
  extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613"
  Restart Apache once this is done.

  # /scripts/restartsrv_httpd


Wednesday, 26 December 2012

yasm not found

How to install yasm:

While installing ffmpeg, Maybe a chance to face below error:

"yasm not found, use --disable-yasm for a crippled build"

Installation of yasm:


cd /usr/local/src/
tar zfvx yasm-1.0.1.tar.gz
cd yasm-1.0.1
make && make install


wget`uname -p`.rpm
rpm -ivh yasm-1.0.1-1.el5.rf.`uname -p`.rpm

Saturday, 22 December 2012

cPanel and Plesk log path

Some log path information in cPanel/WHM server and Plesk server:

cPanel, WHM & Webmail

    Login Attempts to cpsrvd /usr/local/cpanel/logs/login_log
    Account Transfers & Misc. Logs /var/cpanel/logs
    Per-Account Bandwidth History Human Readable /var/cpanel/bandwidth/(USERNAME)
    Per-Account Bandwidth History – Cached /var/cpanel/bandwidth.cache/(USERNAME)
    Service Status Logs /var/log/chkservd.log
    Error Log for cpsrvd /usr/local/cpanel/logs/error_log
    Panic Log for cpsrvd /usr/local/cpanel/logs/panic_log
    Backup Logs /usr/local/cpanel/logs/cpbackup
    Update (UPCP) Log /var/cpanel/updatelogs/update-(TIMESTAMP).log
    Mailman Logs /usr/local/cpanel/3rdparty/mailman/logs
    Auditing Log (Account Creations, Deletions, etc.) /var/cpanel/accounting.log
    Access Log & User Actions in cpsrvd /usr/local/cpanel/logs/access_log
    Website Statistics Logs /usr/local/cpanel/logs/stats_log
    Logs for Specific Webmail Applications
        SquirrelMail /var/cpanel/squirrelmail
        RoundCube /var/cpanel/roundcube/log
        Horde /var/cpanel/horde/log
    License Updates & Errors /usr/local/cpanel/logs/license_log
    Brute Force Protection (cPHulkD) Log /usr/local/cpanel/logs/cphulkd.log
    WebDisk (cpdavd) Log /usr/local/cpanel/logs/cpdavd_error_log
    Tailwatch Driver (tailwatchd) Log /usr/local/cpanel/logs/tailwatch_log
    EasyApache Build Logs /usr/local/cpanel/logs/easy/apache/
    Installation Log /var/log/cpanel*install*


    General Information & Errors /var/lib/mysql/(HOSTNAME).err or


    Login Attempts & General Info /var/log/messages
    FTP Transfer Log /var/log/xferlog is a symbolic link to /usr/local/apache/domlogs/

Mail Retrieval & Spam Protection (Courier, Dovecot, SpamAssassin)

    IMAP, POP Login Attempts, Transactions, Fatal Errors & Spam Scoring /var/log/maillog and /var/log/messages

Mail Delivery (Exim)

    Unexpected/Fatal Error Log /var/log/exim_paniclog (Linux)
    /var/log/exim/paniclog (FreeBSD)
    Incoming Mail Queue /var/spool/exim/input
    Log of Messages Rejected Based on ACLs or Other Policies /var/log/exim_rejectlog (Linux) /var/log/exim/rejectlog (FreeBSD)
    Delivery & Receipt Log /var/log/exim_mainlog (Linux) /var/log/exim/mainlog (FreeBSD)

Named (BIND)

    Log /var/log/messages


    Log /var/log/messages


    SSH Log /var/log/messages

Web Server (Apache/httpd)

    Domain Access Logs /usr/local/apache/domlogs/(DOMAIN)
    Web Server & CGI Application Error Log /usr/local/apache/logs/error_log
    SuExec Audit Log /usr/local/apache/logs/suexec_log
    SuPHP Audit Log /usr/local/apache/logs/suphp_log

Top Memory & CPU Consumers (dcpumon)

    Top Processes Consuming CPU & Memory /var/log/dcpumon/(YEAR)/(MONTH)/(DAY)

Plesk Logs:

Plesk (sw-cp-serverd)

    Access Log /usr/local/psa/admin/logs/httpsd_access_log
    Backups Log /var/lib/dumps/domain.tld/backup_restore.log and
    Error Log /var/log/sw-cp-server/error_log
    Migration Log /usr/local/psa/PMM/logs/migration.log
    Mailman Log /var/log/mailman/error
    Horde Webmail /var/local/psa-horde/psa-horde.log


    Login Attempts & General Info /var/log/messages
    FTP Transaction Log /usr/local/psa/var/log/xferlog

Mail Retrieval & Spam Protection

    IMAP, POP Login Attempts, Transactions, Fatal Errors & Spam Scoring /usr/local/psa/var/log/maillog/var/log/messages

Mail Delivery (Qmail)

    Transactions, Errors /usr/local/psa/var/log/maillog
    Queued Mail /usr/local/pas/var/log/smtp_pendings.log


    SSH Log /var/log/messages

Named (BIND)

    Log /var/log/messages

Web Server (Apache / httpd)

    Access & Error Logs /var/log/httpd/access_log and /var/log/httpd/error_log
    Domain Access & Error Logs /var/www/vhosts/domain.tld/statistics/logs/access.log and /var/www/vhosts/domain.tld/statistics/logs/error_log


    General Information & Errors /var/log/mysqld.log

The Tech Bench is an ongoing blog series featuring the answers to common questions the ServInt MST fields everyday. You can also find more great tech tips in the ServInt KnowledgeBase.


Information about TTY vs PTS:

TTY Definition:

Teletypewriter originally and now also means any terminal on Linux/Unix systems. It also means any serial port on Unix/Linux systems.

PTS Definition:

Stands for pseudo terminal slave.


The difference between TTY and PTS is the type of connection to the computer. TTY ports are direct connections to the computer such as a keyboard/mouse or a serial connection to the device. PTS connections are SSH connections or telnet connections. All of these connections can connect to a shell which will allow you to issue commands to the computer.

Tuesday, 18 December 2012

yum failed 6 times. Cannot continue!

Error while cPanel installation:

(ERROR): - ssystem [EXIT_CODE] '/usr/bin/yum' exited with 1 (ignored)
(DEBUG): - ssystem [END]
(FATAL): yum failed 6 times. Cannot continue!


It looks like you have some name resolution issues on the server. Just run the following commands on your server and it will resolve the name resolution issues.

#echo "nameserver" >> /etc/resolv.conf
#echo "nameserver" >> /etc/resolv.conf

if it is not working properly still facing same error, then here we go,

# rpm -e --nodeps bind-chroot
# rpm -e --nodeps bind

# yum install bind

Friday, 14 December 2012

Apache Error code:

Error code and meaning:

Successful Client Requests

200 OK
201 Created
202 Accepted
203 Non-Authorative Information
204 No Content
205 Reset Content
206 Partial Content 

Client Request Redirected
300 Multiple Choices
301 Moved Permanently
302 Moved Temporarily
303 See Other
304 Not Modified
305 Use Proxy

Client Request Errors
400 Bad Request
401 Authorization Required
402 Payment Required (not used yet)
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable (encoding)
407 Proxy Authentication Required 
408 Request Timed Out
409 Conflicting Request
410 Gone
411 Content Length Required
412 Precondition Failed
413 Request Entity Too Long
414 Request URI Too Long
415 Unsupported Media Type 

Server Errors
500 Internal Server Error
501 Not Implemented
502 Bad Gateway 
503 Service Unavailable 
504 Gateway Timeout 
505 HTTP Version Not Supported 

Wednesday, 12 December 2012

Basic commands

Some Bash command line for Linux(A-Z).


  adduser  Add a user to the system
  addgroup Add a group to the system
  alias    Create an alias •
  apropos  Search Help manual pages (man -k)
  apt-get  Search for and install software packages (Debian/Ubuntu)

  aptitude Search for and install software packages (Debian/Ubuntu)
  aspell   Spell Checker
  awk      Find and Replace text, database sort/validate/index

  basename Strip directory and suffix from filenames
  bash     GNU Bourne-Again SHell
  bc       Arbitrary precision calculator language

  bg       Send to background
  break    Exit from a loop •
  builtin  Run a shell builtin

  bzip2    Compress or decompress named file(s)

  cal      Display a calendar
  case     Conditionally perform a command

  cat      Display the contents of a file
  cd       Change Directory
  cfdisk   Partition table manipulator for Linux

  chgrp    Change group ownership
  chmod    Change access permissions
  chown    Change file owner and group

  chroot   Run a command with a different root directory
  chkconfig System services (runlevel)
  cksum    Print CRC checksum and byte counts

  clear    Clear terminal screen
  cmp      Compare two files
  comm     Compare two sorted files line by line
  command  Run a command - ignoring shell functions •

  continue Resume the next iteration of a loop •
  cp       Copy one or more files to another location
  cron     Daemon to execute scheduled commands

  crontab  Schedule a command to run at a later time
  csplit   Split a file into context-determined pieces
  cut      Divide a file into several parts

  date     Display or change the date & time
  dc       Desk Calculator
  dd       Convert and copy a file, write disk headers, boot records

  ddrescue Data recovery tool
  declare  Declare variables and give them attributes •
  df       Display free disk space

  diff     Display the differences between two files
  diff3    Show differences among three files
  dig      DNS lookup

  dir      Briefly list directory contents
  dircolors Colour setup for `ls'
  dirname  Convert a full pathname to just a path

  dirs     Display list of remembered directories
  dmesg    Print kernel & driver messages
  du       Estimate file space usage

  echo     Display message on screen •
  egrep    Search file(s) for lines that match an extended expression
  eject    Eject removable media

  enable   Enable and disable builtin shell commands •
  env      Environment variables
  ethtool  Ethernet card settings

  eval     Evaluate several commands/arguments
  exec     Execute a command
  exit     Exit the shell

  expect   Automate arbitrary applications accessed over a terminal
  expand   Convert tabs to spaces
  export   Set an environment variable

  expr     Evaluate expressions


  false    Do nothing, unsuccessfully
  fdformat Low-level format a floppy disk

  fdisk    Partition table manipulator for Linux
  fg       Send job to foreground
  fgrep    Search file(s) for lines that match a fixed string

  file     Determine file type
  find     Search for files that meet a desired criteria
  fmt      Reformat paragraph text

  fold     Wrap text to fit a specified width.
  for      Expand words, and execute commands
  format   Format disks or tapes

  free     Display memory usage
  fsck     File system consistency check and repair
  ftp      File Transfer Protocol
  function Define Function Macros

  fuser    Identify/kill the process that is accessing a file


  gawk     Find and Replace text within file(s)
  getopts  Parse positional parameters

  grep     Search file(s) for lines that match a given pattern
  groups   Print group names a user is in
  gzip     Compress or decompress named file(s)


  hash     Remember the full pathname of a name argument
  head     Output the first part of file(s)
  help     Display help for a built-in command •

  history  Command History
  hostname Print or set system name


  iconv    Convert the character set of a file

  id       Print user and group id's
  if       Conditionally perform a command
  ifconfig Configure a network interface

  ifdown   Stop a network interface
  ifup     Start a network interface up
  import   Capture an X server screen and save the image to file

  install  Copy files and set attributes


  jobs     List active jobs •
  join     Join lines on a common field


  kill     Stop a process from running
  killall  Kill processes by name


  less     Display output one screen at a time

  let      Perform arithmetic on shell variables •
  ln       Make links between files
  local    Create variables •

  locate   Find files
  logname  Print current login name
  logout   Exit a login shell •

  look     Display lines beginning with a given string
  lpc      Line printer control program
  lpr      Off line print

  lprint   Print a file
  lprintd  Abort a print job
  lprintq  List the print queue
  lprm     Remove jobs from the print queue
  ls       List information about file(s)

  lsof     List open files


 make     Recompile a group of programs
  man      Help manual
  mkdir    Create new folder(s)

  mkfifo   Make FIFOs (named pipes)
  mkisofs  Create an hybrid ISO9660/JOLIET/HFS filesystem
  mknod    Make block or character special files

  more     Display output one screen at a time
  mount    Mount a file system
  mtools   Manipulate MS-DOS files

  mtr      Network diagnostics (traceroute/ping)
  mv       Move or rename files or directories
  mmv      Mass Move and rename (files)


  netstat  Networking information
  nice     Set the priority of a command or job
  nl       Number lines and write files

  nohup    Run a command immune to hangups
  notify-send  Send desktop notifications
  nslookup Query Internet name servers interactively


  open     Open a file in its default application
  op       Operator access


  passwd   Modify a user password

  paste    Merge lines of files
  pathchk  Check file name portability
  ping     Test a network connection
  pkill    Stop processes from running

  popd     Restore the previous value of the current directory
  pr       Prepare files for printing
  printcap Printer capability database

  printenv Print environment variables
  printf   Format and print data •
  ps       Process status
  pushd    Save and then change the current directory

  pwd      Print Working Directory


  quota    Display disk usage and limits
  quotacheck Scan a file system for disk usage

  quotactl Set disk quotas


  ram      ram disk device
  rcp      Copy files between two machines

  read     Read a line from standard input •
  readarray Read from stdin into an array variable •
  readonly Mark variables/functions as readonly

  reboot   Reboot the system
  rename   Rename files
  renice   Alter priority of running processes
  remsync  Synchronize remote files via email
  return   Exit a shell function

  rev      Reverse lines of a file
  rm       Remove files
  rmdir    Remove folder(s)

  rsync    Remote file copy (Synchronize file trees)


  screen   Multiplex terminal, run remote shells via ssh
  scp      Secure copy (remote file copy)

  sdiff    Merge two files interactively
  sed      Stream Editor
  select   Accept keyboard input

  seq      Print numeric sequences
  set      Manipulate shell variables and functions
  sftp     Secure File Transfer Program

  shift    Shift positional parameters
  shopt    Shell Options
  shutdown Shutdown or restart linux

  sleep    Delay for a specified time
  slocate  Find files
  sort     Sort text files

  source   Run commands from a file `.'
  split    Split a file into fixed-size pieces
  ssh      Secure Shell client (remote login program)

  strace   Trace system calls and signals
  su       Substitute user identity
  sudo     Execute a command as another user
  sum      Print a checksum for a file

  suspend  Suspend execution of this shell •
  symlink  Make a new name for a file
  sync     Synchronize data on disk with memory

  tail     Output the last part of files
  tar      Tape ARchiver
  tee      Redirect output to multiple files

  test     Evaluate a conditional expression
  time     Measure Program running time
  times    User and system times

  touch    Change file timestamps
  top      List processes running on the system
  traceroute Trace Route to Host

  trap     Run a command when a signal is set(bourne)
  tr       Translate, squeeze, and/or delete characters
  true     Do nothing, successfully

  tsort    Topological sort
  tty      Print filename of terminal on stdin
  type     Describe a command •


  ulimit   Limit user resources •
  umask    Users file creation mask
  umount   Unmount a device
  unalias  Remove an alias •

  uname    Print system information
  unexpand Convert spaces to tabs
  uniq     Uniquify files

  units    Convert units from one scale to another
  unset    Remove variable or function names
  unshar   Unpack shell archive scripts

  until    Execute commands (until error)
  useradd  Create new user account
  usermod  Modify user account

  users    List users currently logged in
  uuencode Encode a binary file
  uudecode Decode a file created by uuencode


  v        Verbosely list directory contents (`ls -l -b')
  vdir     Verbosely list directory contents (`ls -l -b')
  vi       Text Editor
  vmstat   Report virtual memory statistics


  watch    Execute/display a program periodically
  wc       Print byte, word, and line counts
  whereis  Search the user's $path, man pages and source files for a program

  which    Search the user's $path for a program file
  while    Execute commands
  who      Print all usernames currently logged in

  whoami   Print the current user id and name (`id -un')
  Wget     Retrieve web pages or files via HTTP, HTTPS or FTP
  write    Send a message to another user


  xargs    Execute utility, passing constructed argument list(s)
  xdg-open Open a file or URL in the user's preferred application.


  yes      Print a string until interrupted

  .        Run a command script in the current shell

  ###      Comment / Remark


Tuesday, 11 December 2012

How to konw suPHP is enabled ?

To know if suPHP is enabled,

In WHM :

Main >> Service Configuration >> Apache Configuration >> PHP and SuExec Configuration

current configuration..
Apache suEXEC on

you can assume this means its enabled.

In command-line :

# /usr/local/cpanel/bin/rebuild_phpconf --current
Available handlers: suphp dso fcgi cgi none
PHP4 SAPI: none
PHP5 SAPI: suphp
SUEXEC: enabled

Monday, 10 December 2012

eximstats database

Clearing eximstats database:

If you would like to clear eximstats database:


#use eximstats;

Then run the below query to clear the tables.

>delete from sends;
>delete from smtp;
>delete from failures;
>delete from defers;

Sometime the above tables shows as crashed like,

Table './eximstats/sends' is marked as crashed and should be repaired

In this situation, try below command to check "sends" table,

# cd /var/lib/mysql/eximstats/

#myisamchk /var/lib/mysql/eximstats/sends.MYI

to repair table : # myisamchk /var/lib/mysql/eximstats/sends.MYI -r

Remove eximstats:

If you would like to remove and recreate eximstats database,

emptied the tables like this:
# > table.MYD


# cd /var/lib/mysql/eximstats/

# rm -rf *

# cd

# mysql

> DROP DATABASE eximstats;
> CREATE DATABASE eximstats;
> quit

# mysql eximstats < /var/cpanel/sql/eximstats.sql

Thats it .....

Saturday, 8 December 2012

How to change source SMTP IP address in sendmail:

if you want to change the source SMTP ip address in sendmail.

1. Edit (/etc/mail/ through vi, nano or pico


#O ClientPortOptions=Family=inet, Address=


O ClientPortOptions=Family=inet, Address=< your IP here >

# /etc/init.d/sendmail restat