Archive for September, 2008



Set catch all email address for cPanel using SSH

Monday, September 29th, 2008

On a cPanel server, you have a domain and want to set a catch all email address using SSH. You just have to do the following:

Login to your server as root

root# nano /etc/valiases/yourdomain.com

If you want to set the catch all email to something@somedomain.com do the following:

*: something@somedomain.com

That’s it!

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


Plesk : Configure qmail to use alternate SMTP port 26

Thursday, September 25th, 2008

You have a plesk dedicated server and having issues related to SMTP port 25. There are issues where ISP blocks SMTP port 25, in this case we can use alternate port (I will use port 26).
Kindly follow the below steps to change SMTP port on your plesk dedicated (linux) server to 26.

Login to your server as root

root# cd /etc/xinetd.d
root# ls -l | grep smtp*
root# cat smtp_psa
service smtp
{
socket_type = stream
protocol = tcp
wait = no
disable = no
user = root
instances = UNLIMITED
server = /var/qmail/bin/tcp-env
server_args = /usr/sbin/rblsmtpd -r bl.spamcop.net /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
}
root# nano /etc/services

Add the below lines

smtp_psa_new 26/tcp mail
smtp_psa_new 26/udp mail
root# cp smtp_psa smtp_psa_new

Change the service line in the new file “smtp_psa_new” to be this:

service smtp_psa_new
{
socket_type = stream
protocol = tcp
wait = no
disable = no
user = root
instances = UNLIMITED
server = /var/qmail/bin/tcp-env
server_args = /usr/sbin/rblsmtpd -r bl.spamcop.net /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
}
root# /etc/init.d/xinetd restart

And you should see smtp listening on ports 25, and 26:

root# netstat -anp | grep xinetd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 6989/xinetd
tcp 0 0 0.0.0.0:26 0.0.0.0:* LISTEN 6989/xinetd

That’s it!

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


Timezone for PHP scripts

Wednesday, September 24th, 2008

If you only want particular PHP scripts (and not shell or other cgi scripts) to use a specific timezone, set the timezone environmental variable in your PHP code like so:


<?
echo "Original Time: ". date("h:i:s")."\n";
putenv("TZ=US/Eastern");
echo "New Time: ". date("h:i:s")."\n";
?>

If you put the line putenv(“TZ=US/Eastern”); in a file that is include()’ed by all your other PHP scripts, then your all PHP scripts will use that timezone.

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


How to install qmHandle on plesk server ?

Wednesday, September 24th, 2008

On your plesk dedicated server you already have qmail as your mail server and now you’re looking to manage the qmail message queue. qmHandle is the simple program for this.

Install qmHandle on plesk dedicated server using the below steps:

Login to the sever as root.

Download the tar from here using the following command:

root# wget
http://jaist.dl.sourceforge.net/sourceforge/qmhandle/qmhandle-1.3.2.tar.gz
root# tar -zxvf qmhandle-1.3.2.tar.gz
root# chmod 755 qmHandle
root# ./qmHandle –h

Few commands of qmhandle :

List help for qmhandle commands.

qmHandle -h

Show statistics for qmail mail queue

qmHandle -s

Deliver all mails in mail queue.

qmHandle -a

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


Lost Joomla admin password – how to reset ?

Friday, September 19th, 2008

On cPanel dedicated server, I have come around where people have lost their Joomla admin password and don’t know what to do. Don’t get panicked, be patient – I will show how you can reset your lost admin password for your Joomla website.

First within you cPanel control panel; goto PHPMyAdmin and select the Joomla database that you have, once selected check for the table named jos_users click on it and browse the table; on the right side you will see your admin login name (I assume it is admin, some may have different as they have set when Joomla was installed) in front of the username under the column named “password” you will see some encrypted value make sure the “usertype” column contains “super administrator”. Now, click on the pencil (to edit) and in front of password put the value “21232f297a57a5a743894a0e4a801fc3” without the quotes, which means that your password is “admin” and click on “Go”. That’s all , you have reset the password.

Now, you can check by logging in to your Joomla site. It should be working now.

Note: Works for both Joomla 1.0 and Joomla 1.5 versions.

This article is released by SupportFacility.Com
— the leaders in providing outsourced technical support, live chat
support & help desk support for web hosts. Interested ? Opt for a trial now.


FTP failed on plesk server

Wednesday, September 10th, 2008

On a plesk server I could not connect to ftp so when I checked the logs I found

- warning: unable to determine IP address of ‘myhostname.server.com’
- error: no valid servers configured
- Fatal: error processing configuration file '/etc/proftpd.conf'

Then, I checked the /etc/hosts and found hostname entry missing:

[root]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost

So to get this fixed I added the below entry in the /etc/hosts file

xx.xx.xx.xx   myhostname.server.com

And, then restarted xinetd which fixed the issue.

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.