Total Pageviews

Sunday, January 24, 2010

Install SPF for a domain

/usr/local/cpanel/bin/spf_installer Cpanelusername

Reset database user password

Enter into mysql

----------

SET PASSWORD FOR 'brian_btball'@'localhost' = OLD_PASSWORD('604074');

FLUSH PRIVILEGES;

----------

Repair Database

To repair database from shell

---------

cd /var/lib/mysql/datbase name

myisamchk --recover *.MYI

---------

Site infected

Run this script there in root ....ull seee infected files :)
Dont forget to change the username

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


#!/bin/bash

pattern='r0nin|m0rtix|upl0ad|r57shell|c99shell|shellbot|phpshell|void\.ru|phpremoteview|directmail|bash_history|\.ru/|brute *force|multiviews|cwings|bitchx|eggdrop|guardservices|psybnc|dalnet|undernet|vulnscan|spymeta|raslan58|deface|defacing|defacer|MSRml'

searchpath=/home/lhemail/
find $searchpath \( -regex '.*\.php$' -o -regex '.*\.cgi$' -o -regex '.*\.inc$' -o -regex '.*\.pl' \) -print0 | xargs -0 egrep -il "$pattern" /dev/null | sort >> report.$$

cat report.$$

------------
Cpanel --- Ensim
==================
/etc/proftpd.conf---/home/virtual/ < your domain >/etc/prpftpd.conf

/etc/passwd --- /home/virtual/ < your domain >/etc/passwd

/etc/valiases/domain --- /home/virtual/ < your domain >/etc/aliases

/usr/local/apache/conf/httpd.conf --- /etc/httpd/domain.comconf/virtual/< site number >

/etc/exim.conf --- /home/virtual/ < your domain>/etc/sendmail.cf

/var/named/domain .db --- /var/named/db.domain

/usr/local/apache/logs/error_logs --- /home/virtual//var/log/httpd/error_log

/usr/local/apache/logs/access_logs --- /home/virtual/< domain >/var/log/httpd/access_logs

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

Location of home directory in cpanel and ensim
In cpanel the home directory is located at /home/user name
In ensim its /home/virtual/domain name

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

Temporary URL used in cpanel servers ,when the domain name is not active.
http://server ip address/~user name

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

Temporary URL used in ensim servers ,when the domain name is not active
http://srv02.behosted.com/~admin< number >/

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


Accessing shared ssl in cpanel
https://server ip/~user name

-------------------
Accessing sharhttps://www.dfwairparts.com/admin/categories.php?osCAdminID=74db583034663bf2f61754044bbcea4ded ssl in ensim
https://server ip/~admin < number>

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

Anonymous ftp login path in cpanel
/home/user name/public_ftp/

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

Anonymous ftp login path in ensim
/home/virtual/< domain name >/var/ftp

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

In cpanel ftp users are created under the path
/home/user name/public_html

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

In ensim the ftp users are created under the path
/home/virtual/< domain name > /home

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

In cpanel all the mail accounts are located at
/home/user name/mail
In ensim all the mail accounts are located at
/home/virtual/< domain name >/var/mail

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

In cpanel webmail is accessed using the link
http:// domain name or ip :2095

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

In ensim you access mail using
http://domain name/squirrelmail

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

In cpanel servers we have to use user name as username@domain.com while connecting using ftp.

In ensim also we have to use username@domain.com while connecting using ftp.


In cpanel servers we use user name as just user name while connecting to the server using shell access

ie ssh -l user name domain.com

In ensim we use the user name as username#domain.com

eg: ssh -l username#domain.com domain

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


In cpanel the mail queue is located at the path
/var/Spool/exim/input

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

In ensim there is mailqueue for each domain.
The path is /home/virtual/< domain > /var/spool/mqueue

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

Public_html and cgi-bin folder in cpanel servers are located at
/home/user name/public_html
/home/user name/public_html/cgi-bin

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

In ensim the document root are at
/home/virtual/< domain name > /var/www/html
/home/virtual/< domain name >/var/www/cgi-bin

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

In cpanel we use vfilters to block a mail from a particular mail account .The path is /etc/vfilters/domain name

In ensim we use access file to block a mail from a particular mail account. The path is /home/virtual/site[x]/fst/etc/mail/access

format is

spam@spammer.com REJECT

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

Cpanel can be restarted using the command
/etc/rc.d/init.d/cpanel3
Ensim can also be restarted using the commands
/etc/rc.d/init.d/webppliance

Tuesday, January 19, 2010

Maximum emails for a domain

To change the default maximum emails per hour of a server.
------------
[root@server ~]#vi /var/cpanel/maxemailsperhour
------------

To set maximum emails per hour for a particular domain.
-------------
[root@server ~]# vi /var/cpanel/maxemails
# If you update this file you must run /scripts/build_maxemails_config
emails.com=500
domain.net=1000

[root@server ~]#/scripts/build_maxemails_config

After this command, a file automatically get created under the directory [var/cpanel/maxemailsperdomain/]with the email value you've set for those particular domains.
Just to check, type the following which should return the value that you entered in the previous file.
-------------

Saturday, December 26, 2009