Monday, 29 August 2011

Steps to Catch Spammers & Scammers on cPanel Servers

[Note] >>: To enable extended loggin in exim to trace nobody mails,Try the following trick>> :--

1-- Edit /etc/exim.conf

2--  On the second line add  >>:-

log_selector = +address_rewrite +all_parents +arguments +connection_reject
+delay_delivery +delivery_size +dnslist_defer +incoming_interface
+incoming_port +lost_incoming_connection +queue_run +received_sender
+received_recipients +retry_defer +sender_on_delivery +size_reject
+skip_delivery +smtp_confirmation +smtp_connection +smtp_protocol_error
+smtp_syntax_error +subject +tls_cipher +tls_peerdn

[note] * Make sure all that comes on a single line

3--  Save and exit.

4--  Restart Exim.

5--  tail -f /var/log/exim_mainlog 

*********************************

Sunday, 28 August 2011

FATAL ERROR


>> Steps are given below >>:--

******************************************
1- Please enable it :-

                  register_globals is disabled in php.ini

2- This can be corrected by creating a file named php.ini in this sites folder & placing the following value on the first line :-

                   register_globals = on

*******************************************

Saturday, 27 August 2011

To delete mailnull bounced mail

Just fire the given command  below :--




**************
cd /var/spool/exim/input
grep -lir mailnull * | xargs rm -fv


**************

Friday, 26 August 2011

When a user's mailbox is showing set in mailenable as well as in plesk but you still get an error during delivery try this


** Goto %plesk_dir%/mailservers/mailenable/config

**  Take a backup of ADDRESS-MAP.TAB 

** Open ADDRESS-MAP.TAB in wordpad

**************************************************************************
You should see mailboxes in this format >:-
 

      

Each mailbox MUST be in one line,
 
if you see a line break eg;


 [SF:securedisry.com/harry]          


Edit the text and make sure its in ONE line.Almost all the time, when a line breaks, 
some characters are missing,so when you edit-make sure the there are no missing characters 
in that line,This is very important and should be done carefully.

<< Important  >>:-

Once this is done, restart mailenable and test that mailbox.

**************************************************************************

Thursday, 25 August 2011

behavior of apache [ mysql ]


//** Sometimes such behavior of apache/httpd [ taking more & more memory until it dies or crashes the server ] 

can be caused by corrupted MySQL database. **//

<< Try to do the following scripts  >> :-

1] Kill the mysql server :-

      /etc/rc.d/init.d/mysql stop

2] Repair all SQL databases :-

      myisamchk -r /var/lib/mysql/*/*.MYI

3] Start mysql again :-

     /etc/rc.d/init.d/mysql start

*************--------------**************

Wednesday, 24 August 2011

Linux Most Important Basic Commands


/* << This are some quick command which are useful for beginners and as well as experts in Linux >> */

alias
 
     'USE'-> Create an alias.

----------------------------

awk  
 
    'USE'-> Find and Replace text, database sort/validate/index.

----------------------------

break

    'USE'-> Exit from a loop.

----------------------------

builtin

    'USE'-> Run a shell builtin.

----------------------------

cal    

    'USE'-> Display a calendar.

----------------------------

case  

    'USE'-> Conditionally perform a command.

----------------------------

cat  
 
    'USE'-> Display the contents of a file.

----------------------------

cd    

    'USE'-> Change Directory.

----------------------------

cfdisk

    'USE'-> Partition table manipulator for Linux.

----------------------------

chgrp

    'USE'-> Change group ownership.

----------------------------

chmod
 
    'USE'-> Change access permissions.

----------------------------

chown  

    'USE'-> Change file owner and group.

----------------------------

chroot

    'USE'-> Run a command with a different root directory.

----------------------------

cksum
 
    'USE'-> Print CRC checksum and byte counts.

----------------------------

clear
 
    'USE'-> Clear terminal screen.

----------------------------

cmp  

   'USE'-> Compare two files.

----------------------------

comm  

   'USE'-> Compare two sorted files line by line.

----------------------------

command

   'USE'-> Run a command - ignoring shell functions.

----------------------------

continue
 
   'USE'-> Resume the next iteration of a loop.

----------------------------

cp        

   'USE'-> Copy one or more files to another location.

----------------------------

cron  

   'USE'-> Daemon to execute scheduled commands.

----------------------------

crontab

   'USE'-> Schedule a command to run at a later time.

----------------------------

csplit

  'USE'-> Split a file into context-determined pieces.

----------------------------

cut    

  'USE'-> Divide a file into several parts.

----------------------------

date  

  'USE'-> Display or change the date & time.

----------------------------

dc    

  'USE'-> Desk Calculator.

----------------------------

dd    
 
  'USE'-> Data Dump - Convert and copy a file.

----------------------------

declare

  'USE'-> Declare variables and give them attributes.

----------------------------

df    

  'USE'-> Display free disk space.

----------------------------

diff  

  'USE'-> Display the differences between two files.

----------------------------

diff3  

  'USE'-> Show differences among three files.

----------------------------

dir    

  'USE'-> Briefly list directory contents.

----------------------------

dircolors

 'USE'-> Colour setup for `ls.

----------------------------

dirname

 'USE'-> Convert a full pathname to just a path.

----------------------------

dirs  

  'USE'-> Di

**********************************************************

Tuesday, 23 August 2011

How to control various Process in linux


ps   
 
**USE**--({ =print status} Display the list of currently running processes with their process IDs [PID] numbers, Use ps axu to see all processes currently running on your system {also those of other users or without a controlling terminal}, Each with the name of the owner, Use "top" to keep listing the processes currently running.), 
-----------------------------------------------------------------------
 
fg PID  
 
**USE**--( Bring a background -or- stopped process to the foreground.), 
-----------------------------------------------------------------------
 
bg PID  
 
**USE**--( Send the process to the background, Opposite to <fg>, The same can be accomplished with <Ctrl>z,  If you have stopped jobs, you have to type exit twice in row to log out.), 
-----------------------------------------------------------------------
 
any_command   
 
**USE**--( Run any command in the background [The symbol "&" means "run the proceeding command in the background"]  ),. 
-----------------------------------------------------------------------
 
batch any_command  
 
**USE**--( Run any command [usually one that is going to take more time] when the system load is low, I can logout,& the process will keep running. ).
-----------------------------------------------------------------------
 
at 17:00   
 
**USE**--( Execute a command at a specified time,  You will be prompted for the command[s] to run, until you press <Ctrl>d). 
-----------------------------------------------------------------------
 
kill PID  
 
**USE**--( Force a runing process shutdown, First determine the PID of the process to kill using ps),
-----------------------------------------------------------------------
 
killall program_name   
 
**USE**--( Kill program[s] by name. ),
-----------------------------------------------------------------------
 
xkill   
 
**USE**--( [In an X-Window terminal] Kill a GUI-based program with mouse, [Point with your mouse cursor at the window of the process you want to kill & click}.) ,
-----------------------------------------------------------------------
 
nice program_name  
 
**USE**--( Run program_name adjusting its **priority**, Since the priority is not specified in this example, it will be adjusted by 10 [ultimatly process will run slower], [from the default value (usually 0], The lower the number [of "niceness" to other users on the system], The higher the priority, The priority value may be in the range -20 to19, Only root may specify negative values. **Use "top" to display the priorities of the running processes**),. 
-----------------------------------------------------------------------
 
renice -1 PID  
 
**USE**--( [as root] Change the priority of a running process to -1, Normal users can only adjust processes they own & only up from the current value [which make them run slower],

-------*****-------*****-------*****-------*****-------*****-------*****-------*****-------*****-------*****-------

Monday, 22 August 2011

How to decompress file


//** Just use the given command below  **//:--

tar -zxvf filename.tar.gz   **USE**--( {=tape archiver} Untar a tarred & compressed tarball {*.tar.gz or *.tgz,} that you downloaded from the Internet.

tar -xvf filename.tar   **USE**--( Untar a tarred but uncompressed tarball {*.tar}.),

gunzip filename.gz   **USE**--( Decompress a zipped file {*.gz" or *.z}, Use gzip {also zip or compress}, if you wanted to compress files to this file format.),

bunzip2 filename.bz2  **USE**--( {=big unzip} Decompress a file {*.bz2} zipped with bzip2 compression utility, Used for big files. ),

unzip filename.zip  **USE**--( Decompress a file {*.zip} zipped with a compression utility compatible with PKZIP for DOS.),

unarj e filename.arj  **USE**--( Extract the content of an {*.arj} archive. ),

uudecode -o outputfile filename  **USE**--( Decode a file encoded with uuencode,  uu-encoded files are typically used for transfer of non-text files in e-mail {uuencode transforms any file into an ASCII file}).

******************************************

Saturday, 20 August 2011

How to install Various Programs


List of program is given below  >>:
------------------------------
rpm -ivh filename.rpm  

**USE**--( [=RedhatPackageManager, install verbose, hashes displayed to show progress as root] Install a content of Red Hat rpm package[s] & print info on what happened. Keep reading if you prefer a GUI installation.),
------------------------------
rpm -qpi filename.rpm  

**USE**--( [=RedhatPackageManager, query, package, list] Read the info on the content of a yet uninstalled package filename.rpm. ),
------------------------------
rpm -qpl filename.rpm

 **USE**--( [=RedhatPackageManager, query, package, information.] List the files contained in a yet uninstalled package filename.rpm.),
------------------------------
rpm -qf filename  

**USE**--( [=RedhatPackageManager, query, file], Find out the name of the <*.rpm> package to which the file filename [on your hardrive] belongs. ),
------------------------------
rpm -e packagename

  **USE**--( [=RedhatPackageManager, erase=Uninstall], Uninstall a package- Package name, Package name is the same as the beginning of the< *.rpm> package file but without the dash and version number), E.g--   <kpackage>  <gnorpm >
------------------------------
glint  

**USE**--( [in X - terminal, as root if you want to be able to install packages], GUI fronts to the Red Hat Package Manager [rpm], "glint" comes with RH5.2, "gnorpm" with RH6.0, "kpackage" comes with RH6.1 OR must be installed separately but is the best of the three, Use any of them to view which software packages are installed on your system & the what not-yet-installed packages are available on your RedHat CD, display the info about the packages, & install them if you want [installation must be done as root])..

********************************************************

Friday, 19 August 2011

Linux Keyboard shortcuts is for you

//** Some of the important keyboard shortcuts are given below  **// :--

<Ctrl><Alt><F1> **USE**--( Switch to the first text terminal,Under Linux you can have several terminals opened at the same time.. ).

<Ctrl><Alt><Fn> (n=1..6) **USE**--( Switch to the nth text terminal, ).

<tty> **USE**--( Print the name of the terminal in which you are typing this command,,).

<Ctrl><Alt><F7> **USE**--( Switch to the first GUI terminal, ).

  <Tab> **USE**--( In a text terminal,Autocomplete the command 
if there is only 1 option, or else show all the available options.),

 <ArrowUp> **USE**--( Scroll & edit the command history, Press <Enter> to execute command.),

 <Shift><PgUp>**USE** --( Scroll terminal output up,Work also at the login prompt, so we can scroll through our bootup messages.),

 <Shift><PgDown> **USE**--( Scroll terminal output down fast .),

<Ctrl><Alt><-> **USE**--( (In X-Windows) Change to the previous X-Server Resolution.),

<Ctrl><Alt><BkSpc> **USE**--( (in X-Wndows) Kill the current X-Windows Server, Use if the X-Windows Server crashes & cannot be exited normally. ),

<Ctrl><Alt><Del> **USE**--( Shut down the system & Reboot, This is the normal shutdown command for a user at the text-mode console, Do not just press the 'reset' button for shutdown.),

<Ctrl>c **USE**--( Kill the current Process ( In the Text mode for small applications.),

<Ctrl>d **USE**--( Log out from the current terminal,We can also see next command.).

<Ctrl>s **USE**--(  Stop the file transfer to the terminal.),

<Ctrl>q **USE**--( Resume the transfer to the terminal, Try if your terminal mysteriously stops responding to you..),

<Ctrl>z--( Send current Process to the background.),

<exit>**USE**--( Logout,. can also use logout for the same effect.,(If you have started a second shell, for  e.g.- using bash the second shell will be exited & you will be back in the first shell, not logged out.)),

<reset>**USE**--( Restore a screwed-up terminal (A terminal which shows funny characters) to default setting, Use if you tried to 'cat' a binary file, You may not be able to see the command as you type it.).

<MiddleMouseButton> **USE**--( Paste the text which is currently Highlighted somewhere else, This is the normal 'copy-paste' Operation in Linux, (It doesn't work with Netscape & Wordperfect which use the MS Windows-style 'copy-paste', It does work in the text terminal if you enabled 'gpm' Service using 'Setup') Best used with a Linux-ready 3-button mouse (Logitech or similar) ),

<~>**USE**--( {tilde} My home directory (normally the directory /home/my_login_name), For example, the command cd ~/my_dir will change my working  directory to the subdirectory 'my_dir' under my home directory,  Typing just .cd. alone is an equivalent of the command .cd ~.).

<.>**USE**--(  {dot} Current directory, For example- ./my_program will attempt to execute the file 'my_program' located in your current working directory,).

<..>**USE**--( {two dots} Directory parent to the current one, For example- the command cd .. will change my current working directory one-one level up.)..