Archive for the ‘Linux VPS Hosting’ Category

Cpanel/ Webmail accessing behind firewall

Monday, November 27th, 2006

IMPORTANT:
Installation requires that you have access to cPanel, so you need to
use a system that isn’t behind a firewall to install it.

instructions –

1) Load up cPanel (www.yourdomain.com/cpanel or www.yourdomain.com:2085)
2) Add a subdomain called cpanel.
3) Copy the script cpanelproxy.php to the /public_html/cpanel/ directory.
4) Modify (or add) the file /public_html/cpanel/.htaccess to include
the following 3 lines:

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/cpanelproxy.php
RewriteRule .* /cpanelproxy.php [last]

That’s it. Once your subdomain is available, you can use
http://cpanel.yourdomain.com to get into cPanel and Webmail.

Spell Checker on SquirrelMail

Monday, November 27th, 2006
Check for conf.pl file in /usr/local/cpanel/base/3rdparty/squirrelmail/config directory and if it’s there just run the command# perl cong.pl

If conf.pl file is missing then….follow the below mentioned steps….

# wget http://internap.dl.sourceforge.net/sourcef…l-1.4.3a.tar.gz

# tar -xzvf squirrelmail-1.4.3a.tar.gz
# cd squirrelmail-1.4.3a/config
# cp conf.pl /usr/local/cpanel/base/3rdparty/squirrelmail/config
# perl conf.pl
# service cpanel restart

Checking mail relay against Standard tests

Monday, November 27th, 2006
Login to server as root and just telnet to test-relay …

telnet relay-test.mail-abuse.org

It will test mail relay for all standard tests. The result is dispalyed at the bottom…

“System appeared to reject relay attempts
Connection closed by foreign host.”

WHM / Cpanel / Webmail Tutorials

Monday, November 27th, 2006

Cpanel / WHM Tutorials

If Whm/Cpanel/Webmail are not loading in ssl mode (2087/2083/2096) then first you can try

httpd (stop/strat/restart)

If it not works then https authentication is usually run by the stunnel for c-panel; and since the error is shown only when data transfer using stunnel is done; you can try a stunnel restart.

do the following:
===============
ps ax | grep stunnel
===============

you will get a pid for the current running stunnel. Kill it via:
===============
kill -9 pid
===============

now start stunnel: /usr/local/cpanel/etc/init/startstunnel
==============================================
then restart exim and cpanel via the “/etc/rc.d/init.d/” start/stop directives.

***************************************
OR simply

start stunnel: /usr/local/cpanel/etc/init/startstunnel

Script for clearing MAIL QUEUE

Monday, November 27th, 2006

Firstly, I don’t recommend this, mail queues for a reason, deleting it is useless.

However, if you want to clear your mail queue, you can create a script named clearmailq.sh with this:

Install the following script as a .sh on your server

#####Mail Queue Cleaner#####
#!/bin/bash
echo Clearing Mail Queue..
cd /var/spool/exim/input
rm -rf *
exit

NOTE : Save this, and chmod 755.

To disable any (Horde/Squirrel/Neomail)

Monday, November 27th, 2006
Is there anyway to disable Horde, or other webmail applications for users who don’t want them?
==================================================

Let’s say the user’s username is sunil, first you will need to SSH into the server as root, now use your favorite editor, and edit the file:#/var/cpane/users/sunil

Now, if you wanted to disable all webmail applications and enable squirrelmail, you would add these lines:

skiphorde=1
skipsqmail=0
skipneomail=1

Next, you’ll need to restart cPanel, you can normally do this by doing :

#/etc/init.d/cpanel restart

NOTE : Now, when the user sunil logs into webmail, he’ll only see Squirrelmail, and not two other options he doesn’t use!

Horde database problem

Monday, November 27th, 2006

If you are getting following error with the horde for the database then following the below steps :

Error :
A fatal error has occurred:
DB Error: connect failed
[line 108 of /usr/local/cpanel/base/horde/lib/Prefs/sql.php]
Details have been logged for the administrator.

=====================================================

Solution : First create a database file horde.sql as follows :

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

– MySQL dump 9.10

– Host: localhost Database: horde
– ——————————————————
– Server version 4.0.18-standard


– Table structure for table `horde_categories`

CREATE TABLE horde_categories (
category_id int(11) NOT NULL default ‘0′,
group_uid varchar(255) NOT NULL default ‘’,
user_uid varchar(255) default NULL,
category_name varchar(255) NOT NULL default ‘’,
category_data text,
category_serialized smallint(6) NOT NULL default ‘0′,
category_updated timestamp(14) NOT NULL,
PRIMARY KEY (category_id),
KEY category_category_name_idx (category_name),
KEY category_group_idx (group_uid),
KEY category_user_idx (user_uid),
KEY category_serialized_idx (category_serialized)
) TYPE=MyISAM;


– Dumping data for table `horde_categories`


– Table structure for table `horde_categories_categories`

CREATE TABLE horde_categories_categories (
category_id_parent int(11) NOT NULL default ‘0′,
category_id_child int(11) NOT NULL default ‘0′,
PRIMARY KEY (category_id_parent,category_id_child)
) TYPE=MyISAM;


– Dumping data for table `horde_categories_categories`


– Table structure for table `horde_prefs`

CREATE TABLE horde_prefs (
pref_uid varchar(255) NOT NULL default ‘’,
pref_scope varchar(16) NOT NULL default ‘’,
pref_name varchar(32) NOT NULL default ‘’,
pref_value text,
PRIMARY KEY (pref_uid,pref_scope,pref_name)
) TYPE=MyISAM;


– Dumping data for table `horde_prefs`


– Table structure for table `horde_users`

CREATE TABLE horde_users (
user_uid varchar(255) NOT NULL default ‘’,
user_pass varchar(32) NOT NULL default ‘’,
PRIMARY KEY (user_uid)
) TYPE=MyISAM;


– Table structure for table `kronolith_events`

CREATE TABLE kronolith_events (
event_id bigint(20) NOT NULL default ‘0′,
calendar_id varchar(255) NOT NULL default ‘’,
event_description text,
event_location text,
event_keywords text,
event_exceptions text,
event_title varchar(80) default NULL,
event_category varchar(80) default NULL,
event_recurtype varchar(11) default ‘0′,
event_recurinterval varchar(11) default NULL,
event_recurdays varchar(11) default NULL,
event_recurenddate datetime default NULL,
event_start datetime default NULL,
event_end datetime default NULL,
event_alarm int(11) default ‘0′,
event_modified int(11) NOT NULL default ‘0′,
PRIMARY KEY (event_id),
KEY kronolith_calendar_idx (calendar_id)
) TYPE=MyISAM;


– Dumping data for table `kronolith_events`


– Table structure for table `mnemo_memos`

CREATE TABLE mnemo_memos (
memo_owner varchar(255) NOT NULL default ‘’,
memo_id int(11) NOT NULL default ‘0′,
memo_desc varchar(64) NOT NULL default ‘’,
memo_body text,
memo_category int(11) NOT NULL default ‘0′,
memo_private smallint(6) NOT NULL default ‘1′,
memo_modified int(11) NOT NULL default ‘0′,
PRIMARY KEY (memo_owner,memo_id)
) TYPE=MyISAM;


– Table structure for table `nag_tasks`

CREATE TABLE nag_tasks (
task_owner varchar(255) NOT NULL default ‘’,
task_id int(11) NOT NULL default ‘0′,
task_name varchar(64) NOT NULL default ‘’,
task_desc text,
task_modified int(11) NOT NULL default ‘0′,
task_due int(11) default NULL,
task_priority int(11) NOT NULL default ‘0′,
task_category int(11) NOT NULL default ‘0′,
task_completed smallint(6) NOT NULL default ‘0′,
task_private smallint(6) NOT NULL default ‘1′,
PRIMARY KEY (task_owner,task_id)
) TYPE=MyISAM;


– Dumping data for table `nag_tasks`

CREATE TABLE turba_objects (
object_id varchar(32) NOT NULL default ‘’,
owner_id varchar(255) NOT NULL default ‘’,
object_type varchar(255) NOT NULL default ‘Object’,
object_members blob,
object_name varchar(255) default NULL,
object_alias varchar(32) default NULL,
object_email varchar(255) default NULL,
object_homeaddress varchar(255) default NULL,
object_workaddress varchar(255) default NULL,
object_homephone varchar(25) default NULL,
object_workphone varchar(25) default NULL,
object_cellphone varchar(25) default NULL,
object_fax varchar(25) default NULL,
object_title varchar(255) default NULL,
object_company varchar(255) default NULL,
object_notes text,
PRIMARY KEY (object_id),
KEY turba_owner_idx (owner_id)
) TYPE=MyISAM;


– Dumping data for table `turba_objects`

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

Then use the following commands :

mysql horde create database horde;

3) mysql>\q

/scripts/fullhordereset

—————————————

Fatal error: Call to undefined function: _() in /usr/local/cpanel/base/horde/config/registry.php on line 86

If you get this error while entering into horde , following is the fix:
touch /var/cpanel/usecpphp
OR

rm -f /usr/local/cpanel/cpanel;
/scripts/upcp

———————————————–
Also touch /var/cpanel/usecpphp is solution for error –

“Notice: Undefined index: direct_access in
/usr/local/cpanel/base/horde/imp/templates/menu/menu.inc on line 53″

MailMax/Webmail registration problems

Monday, November 27th, 2006
Client is having issue with MailMax registration.URL:
http://ns3.emediatecreative.com/webmail

Example account:
http://www.goldenenergyservices.com/webmail
email: monica.thompson@goldenenergyservices.com
pw: mtho

This is the error message displayed in the browser when a user tries to login using webmail.

“This version of MailMax/Web is a demo, and only supports 5 users. To order the full version, please contact sales@smartmax.com”

webreseller has put the registration key of the shared server on this dedicated server’s MailMax.

The URL http://www.goldenenergyservices.com/webmail is not working, hence was unable to test the problem. However the error clearly states the mailmax version installed is for demo purpose only. It has to be replaced by the licensed version

The MailMax Web on the dedicated server is using webreseller’s license key. I have entered the key info in the registery at the following location:
HKEY_LOCAL_MACHINE\SOFTWARE\SmartMax Software\MailMaxWeb
After that I restarted the server.
Now the issue is with the Webppliance which won’t show up in the browser, hence the URL I supplied also doesn’t work.