Friday, December 30, 2011

How to Deleting mails from mail queue

* Just fire the following command  * :--
------------
rm -rf /var/spool/exim/input/

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

Thursday, December 29, 2011

How to Modify LogWatch

<< Logwatch is a customizable log analysis system It parses through your system's logs for a given period of time and creates a report analyzing areas that you specify, in as much detail as you require. Logwatch is already installed on most CPanel servers. >>

---------------------
To modify LogWatch, SSH into server and login as root.

At command prompt type: pico -w /etc/log.d/conf/logwatch.conf 


Scroll down to

MailTo = root

and change to

Mailto = your@email.com

<Note >: Set the e-mail address to an offsite account incase you get hacked.


Now scroll down to 

Detail = Low

Change that to Medium, or High...

Detail = 5 or Detail = 10

Note: High will give you more detailed logs with all actions. 

Save and exit.


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

Sunday, December 18, 2011

Server e-mail everytime someone logs in as root

** < Just follow the steps given below >**--   :--

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

To have the server e-mail you everytime someone logs in as root, SSH into server and login as root.
---------------------------------
At command prompt type: pico .bash_profile
---------------------------------
Scroll down to the end of the file and add the following line:
---------------------------------
echo 'ALERT - Root Shell Access on:' `date` `who` | mail -s "Alert: Root Access from `who | awk '{print $6}'`" your@email.com
---------------------------------
Save and exit
*-------*******------------******---*****-----------*******-------*

Wednesday, December 14, 2011

Disable Telnet steps

*-* Disable Telnet :-

To disable telnet, SSH into server and login as root.

At command prompt type: pico -w /etc/xinetd.d/telnet

change disable = no to disable = yes

Save and Exit

At command prompt type: /etc/init.d/xinetd restart



Saturday, December 3, 2011

what is db4 error

 Steps are as follows :-
********----------*********
rpm --rebuilddb

rpm --initdb

OR

Click "Rebuild RPM Database" in WHM manager under "Software".
 
********----------*********

Sunday, November 20, 2011

Installing port collection

How to Installing port collection steps are  given below :-

# sysinstall
-----------
Scroll down and select Configure, press Enter.
-----------
Scroll down and select Distributions, press Enter.
-----------
Scroll down to ports, press Space.
-----------
Scroll up to Exit, press Enter.
-----------
Select your desired installation media, such as CDROM, FTP, and so on.
-----------
Scroll up to Exit and press Enter.
-----------
Press X to exit sysinstall

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

Thursday, November 10, 2011

Steps to set reverse< Dns >

Steps are as follows :-

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

1. > 

ssh to ns1.loudpacket.net OR ssh to 207.71.120.250 
Username: root 
Password : #k53mPog 

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

2.>

cd /var/named/rev 

****************
3.>
     ls 

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

4.>

 pico 148.43.67.in-addr.arpa 
(Edit the network you want to change such as 148.43.67.in-addr.arpa for 67.43.148.*) 
syntax is like this: 68 (last part of the IP) PTR mail.netdotsolutions.com.(Domain name) 
Do not forget to put .(dot) after the domain name 
Eg: So to set 67.43.159.16 = inets.com.br 
Add this line: 16 PTR inets.com.br. 

****************
5.>

  Save and quit,

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

6.>
  
 rndc reload 

****************
7.>

 host 67.43.159.16 localhost

/////////////////////////////////////////////////////////////////////////

Monday, October 31, 2011

How to edit welcome messages on your computer

Steps to Editing Welcome Messages:--
 

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

Type: pico /etc/motd


"This computer system is for authorized users only."Save.


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

Tuesday, October 25, 2011

If you want to transfer account X from server A to server B


**- Steps to transfer account X from server A to server B is given below -**:--

---------------------------------/////**************************
 
Go to cpanel (port 2082) for account X on server A

Go to the backup page, and generate a backup.
[it will tell you to wait, depending on the account size on disk and server load could take several minutes to complete]

After is finished, note the name of the generated file (should be something like
backup_TIMESTAMP_username.tar.gz

If you have root access to both servers

SSH to server B, and issue the following:--


scp SERVER_A_IPADDRESS:/home/username/backup_TIMESTAMP_username.tar.gz .

[notice the dot at the end]


[This will put the file in the folder you were in when you logged in on server B - usually /root]


Then go in the WHM of server B, click "Restore a Full Backup/cpmove file", It should show a list of possible files to restore.

Type the username that you want restored, and click Restore

Give it some time, and it should end with "Account restore complete"

Then you should go to the DNS functions, and view the zone of the domain created, to make sure everithing is ok.

That's about it.

The backup contains everithing needed to re-create the account on the other server < site, emails, email accounts, databases, .htaccess files, addon-domains, subdomains etc >

Monday, October 24, 2011

how to install & uninstall RMP

 ----------------------------------------------------
Rmp:

To install RMP:
[root@deep] /#rpm -ivh foo-1.0-2.i386.rpm


To uninstall rmp:
[root@deep] /#rpm -e foo


To upgrade rmp:
[root@deep] /#rpm -Uvh foo-1.0-2.i386.rpm


To check rmp:
[root@deep] /#rpm -q foo

Saturday, October 15, 2011

How to Config server Mail Manager


 Config server Mail Manager :--


  *** Installation :--

   Upload the cmm.tgz file to your server

2). Untar the distribution:
   tar -xzf cmm.tgz

3). cd into the directory created and run the install script:
   cd cmm/
   sh install.sh

4). Login to WHM and scroll to the bottom of the left hand menu and you should see "ConfigServer Mail Manage"


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

If you want to uninstall, simply :--

rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/addon_cmm.cgi

rm -fv /usr/local/cpanel/whostmgr/docroot/cgi/cmmversion.txt

rm -Rfv /usr/local/cpanel/whostmgr/docroot/cgi/cmm/

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

Sunday, September 25, 2011

How to check the mails are blocked by abuse

/// To check the mails which are blocked by abuse link is given below /// :--

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

http://www.mail-abuse.com/cgi-bin/lookup?ip_address=mke.ck.com

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

Friday, September 23, 2011

how to change the date


< Simple steps to change the date is  given below >:--

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

[root@mybox me]# date
Linux yields the current settings:
[root@mybox me]# Wed Apr 7 12:03:45 EDT 2004

Change the current time and date of the Linux box by entering:
[root@mybox me]# date 040713032004
would change the time and yield:
[root@mybox me]$ Wed Apr 7 13:03:00 EDT 2004
 
-------------------------------------

Thursday, September 22, 2011

cdosys mail


///*** << cdosys mail >> ***/// :--

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

<script language="JavaScript">
<!--
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
<%
Set oMail = Server.CreateObject("CDO.Message")
Set iConf = Server.CreateObject("CDO.Configuration")
Set Flds = iConf.Fields

'Local service (dont change)

iConf.Fields.Update
Set oMail.Configuration = iConf
oMail.From = "tx.gallery@mb21.co.uk"
oMail.Subject = "Subject: "
oMail.TextBody = "Body: just some message"
oMail.Send
Set iConf = Nothing
Set Flds = Nothing
%>
<script language="JavaScript">
MM_goToURL('parent','http://mb21.co.uk/');
</script>

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

Sunday, September 18, 2011

Post subject FormMail on Windows server using


//** FormMail on Windows server using 'cdosys' **// :-

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

This is a cdosys script same as FormMail script on Linux server. Simply create a file by the name cdosyseg.asp and paste the below given contents in to it. Only make changes to the following fields 

oMail.To = "email id" 
oMail.From = "email id" 
oMail.Subject = "This is a test email from cdosys script" 

Note >>: 'cdonts' doesn't work on Windows 2003 server, you have to use cdosys instead. 


cdosyseg.asp 

*******************-------------------*************************
<% 
dim HTML,AdvisorFirstName,AdvisorLastName 
HTML = HTML & " <html><body>" 
HTML = HTML & " <table border=""0"">" 
HTML = HTML & " <tr>" 
HTML = HTML & " <th bgcolor=""#B0CDDD"">" 
HTML = HTML & " <p style=""margin-top:1;margin-bottom:1"" align=""left""> <font face=""arial"" size=""2""> <b> Advisor First Name: </b> </font> </p>" 
HTML = HTML & " </th>" 
HTML = HTML & " <td bgcolor=""#B0CDDD"">" 
HTML = HTML & " <p style=""margin-top:1;margin-bottom:1"" align=""left""> <font face=""arial"" size=""2"">" & Request("AdvisorFirstName") & "</p>" 
HTML = HTML & " </td>" 
HTML = HTML & " </tr>" 
HTML = HTML & " <tr>" 
HTML = HTML & " <th bgcolor=""#B0CDDD"">" 
HTML = HTML & " <p style=""margin-top:1;margin-bottom:1"" align=""left""> <font face=""arial"" size=""2""> <b> Advisor Last Name: </b> </font> </p>" 
HTML = HTML & " </th>" 
HTML = HTML & " <td bgcolor=""#B0CDDD"">" 
HTML = HTML & " <p style=""margin-top:1;margin-bottom:1"" align=""left""> <font face=""arial"" size=""2"">" & Request("AdvisorLastName") & "</p>" 
HTML = HTML & " </td>" 
HTML = HTML & " </tr>" 
HTML = HTML & " </table>" 
HTML = HTML & "<br>" 
HTML = HTML & " </body></html>" 

'CDOSYS Configuration 
Set oMail = Server.CreateObject("CDO.Message") 
Set iConf = Server.CreateObject("CDO.Configuration") 
Set Flds = iConf.Fields 

'Default parameters for Dataflame (dont change) 
'Note 
'Use "localhost" If mail is routed from same server. 
'Use Server IP like "203.90.78.221" if Domain has MX record having IP "203.90.78.221" OR Mails are routed from that IP 

iConf.Fields.Update 
Set oMail.Configuration = iConf 
oMail.From = "supernova_57@hotmail.com
oMail.Subject = "New Email!" 

'If message body is in HTML FORMAT 
oMail.BodyPart.ContentTransferEncoding = "quoted-printable" 
oMail.HTMLBody = HTML 
oMail.Send 
Set iConf = Nothing 
Set Flds = Nothing 
%> 
<html> 
Message Sent 
</html> 

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

end of cdosyseg.asp 


Below is test form, which you can simply copy to a file and rename it as test.html. 
You can have the clients form to use the same cdosys script by simply including the cdosys sript path on the action part. Just as :- 

<FORM METHOD="POST" action="cdosyseg.asp" onSubmit="" name="Online Registration"> 


test.html 

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

<!-- saved from url=(0022)http://internet.e-mail --> 
<FORM METHOD="POST" action="cdosyseg.asp" onSubmit="" name="Online Registration"> 
<P> 
Please provide the following contact information:</P> 
<BLOCKQUOTE> 
<TABLE> 
<TR> 
<TD ALIGN="right"> 
<EM><font face="Arial Black">First Name</font></EM></TD> 
<TD> 
<font face="Arial Black"> 
<INPUT NAME="AdvisorFirstName" SIZE=53> 
</font> 
</TD> 
</TR> 
<TR> 
<TD ALIGN="right"> 
<EM><font face="Arial Black"> Last Name</font></EM></TD> 
<TD> 
<font face="Arial Black"> 
<INPUT NAME="AdvisorLastName" SIZE=53> 
</font> 
</TD> 
</TR> 
</TABLE> 
<input type="submit" name ="SUBMIT" value="SUBMIT" > 
</form>

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

Thursday, September 8, 2011

what is ( Bad Mail )


/ Just follow the steps / :--

C:\Program Files\SWsoft\Plesk\Mail Servers\Mail Enable\Bad Mail

and

C:\Program Files\SWsoft\Plesk\Mail Servers\Mail Enable\Bad Mail\Messages

C:\Program Files\SWsoft\Plesk\Mail Servers\Mail Enable\Queues\SMTP\Outgoing

Wednesday, September 7, 2011

To update awstats for a single domain on windows server


**// To update awstats for a single domain on windows server **//:-

Go to cmd prompt and goto the dir containing the pl file i.e., the following path >>:-

C:\Inetpub\vhosts\newplc.com\statistics\webstat\AWStats\cgi-bin>

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

Please run the following command >>:--

perl awstats.pl -config=newplc.com -update 

If it gives an error message then go to the following file >>:-

C:\Inetpub\vhosts\newplc.com\statistics\webstat\AWStats\cgi-bin\awstats.newplc.com.conf

and correct the path of the LogFile.


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

Example >>:- 

    LogFile="C:\inetpub\vhosts\newplc.com\statistics\logs\W3SVC25309\ex%YY-24%MM-24%DD-24.log"

    We can get the exact path of the log file from IIS >> Properties >> Web Site >> Properties.

    and again run the update command.

Monday, August 29, 2011

How to set up awstat enable button in cpanel


<<  How to enable "update now" button in awstats is give below  >>:--

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

On every users [ tmp ] folder there is a awstats configuration file 

$:/> pico /home/username/tmp/awstats/awstats.domain.com.conf 

Now in this file search for the "AllowToUpdateStatsFromBrowser" parameter. This parameter will be 0. Set this to 1. 

Now refresh your awstats page you can see "update now" button.

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

Saturday, August 27, 2011

apf.flush


pico /apf.flush

#!/bin/bash
cat /etc/apf/deny_hosts.rules.orig > /etc/apf/deny_hosts.rules
/etc/init.d/apf restart
echo "APF flushed on :" `hostname`

chmod 700 /apf.flush

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

pico /etc/apf/deny_hosts.rules.orig

##
# deny_hosts
#
# Trust based rule file to define addresses that are implicitly denied.
#
# Format of this file is line-seperated addresses, IP masking is supported.
# Example:
# 192.168.2.1
# advanced usage
#
# The trust rules can be made in advanced format with 4 options
# (proto:flow:port:ip);
# 1) protocol: [packet protocol tcp/udp]
# 2) flow in/out: [packet direction, inbound or outbound]
# 3) s/d=port: [packet source or destination port]
# 4) s/d=ip(/xx) [packet source or destination address, masking supported]
#
# Syntax:
# proto:flow:[s/d]=port:[s/d]=ip(/mask)
# s - source , d - destination , flow - packet flow in/out
#
# Examples:
# inbound to destination port 22 from 192.168.2.1
# tcp:in:d=22:s=192.168.2.1
#
# outbound to destination port 23 to destination host 192.168.2.1
# out:d=23:d=192.168.2.1
#
# inbound to destination port 3306 from 192.168.5.0/24
# d=3306:s=192.168.5.0/24

Friday, August 26, 2011

APF allow

986  pico -w /etc/apf/deny_hosts.rules 
--------------------------------------------------  
987  apf -a 81.86.158.140
--------------------------------------------------  
988  service apf restart
--------------------------------------------------  
989  service iptables restart
-------------------------------------------------- 
990  traceroute 81.86.158.140
--------------------------------------------------  
991  cd /etc/apf
-------------------------------------------------- 
992  ls
-------------------------------------------------- 
993  cat deny_hosts.rules
--------------------------------------------------  
994  /etc/init.d/apf stop
-------------------------------------------------- 
995  cd /root
--------------------------------------------------  
996  ls
--------------------------------------------------  
997  cd bfd-0.9
-------------------------------------------------- 
998  ls
--------------------------------------------------  
999  sh uninstall.sh
-------------------------------------------------- 
1000  exit
*********------------------------------***********

Thursday, August 25, 2011

Apache configure command

<< Configure commands are as given below >>:-

*************************---------------------------------------****************************
./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--prefix=/usr/local' '--with-xml' '--with-mm' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-exif' '--with-swf=/usr/local/flash' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--enable-magic-quotes' '--with-mm' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--with-pspell' '--enable-xslt' '--with-xslt-sablot' '--enable-safe-mode' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--enable-wddx' '--with-xmlrpc' '--with-zip' '--with-zlib' 

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