Dedicated Server Support

Tips on Linux, FreeBSD, Windows Dedicated Server.

Wednesday, June 22, 2005

WebCash.in Advertisement Network

BizHat.com proud to announce new Advertisement Network for webmasters.

http://webcash.in

Web Cash will help webmasters to promote their web site, make money by selling advertisement space on their web site. Web cash will work like a banner exchange program, that is each webmaster can exchange ads with other Web Cash members and sell banner ads credits. They can also make money by serving paid advertisements by Web Cash customers.

Visit Web Cash at

http://www.webcash.in

Monday, June 13, 2005

Mail from php mail() stoped working

Today one client told he can't send email to hotmail.com from bizhat.com free email (http://mail.bizhat.com)

I tryed to send a mail to @asianetonline.net email account, mail is send, but got it bounced, on checking /var/log/exim_mainlog found following error message.

2005-06-13 09:04:10 1Dhkra-0003hj-Qs ** user@asianetonline.net <user@asianetonline.net> R=fail_remote_domains: unrouteable mail domain "asianetonline.net"

I was able to send emails to that address from outlook express, but email from php mail() function is not working.

Same error for sending email to hotmail.com address from PHP

2005-06-13 09:24:39 1DhlBO-0004To-98 ** 2boby@hotmail.com <2Boby@hotmail.com> R=fail_remote_domains: unrouteable mail domain "hotmail.com"

Also noticed another error

2005-06-13 09:22:18 1Dhl98-0002d3-NP failed to expand condition "${perl{checkspam}}" for literal router: Gid 32013 is not permitted to relay mail at /etc/exim.pl line 352.

I have resetted exim configuration file with

/scripts/buildeximconf

But it won't help, other than removing the RBL settings i have set in /etc/exim.conf

So i reinstalled exim with

/scripts/exim4

Now emails are working fine. It seems some thing wrong with exim mail server caused the error.

Sunday, June 12, 2005

vi, vim and nvi on FreeBSD

On FreeBSD, vi text editor won't show the mod by default. Also it work differently from vi in linux. To get FreeBSD vi display the mod, you can enter

:set showmod

But doing this every time is difficult. Solution for this is, create a .exrc file with following content

set number
set ruler
set verbose
set showmode
set showmatch
set shiftwidth=4
set autoindent

You can remove any of the entries, just experiment with it and find out which one suit your style of editing :-)

vi on FreeBSD is not vi on Linux, it is another program called nvi.

vi is symlink to nvi, you can find them at

/usr/bin/vi
/usr/bin/nvi

"vim" you can install ut from ports.

But it behave totally different from that in Linux, i don't know why.

But all these vi, nvi and vim uses the file .exrc on start up.

FreeBSD uses csh (c shell) and linux use bash, you can find which shell you are using by the command

echo $SHELL

I think the change in "vi" behaviour in linux and freebsd may be because of these different shells.

FreeLance Work, Auction web site mauritiantrader.com

I have taken a freelance work, the web site was an auction site

http://www.mauritiantrader.com/

Customer need

Basicly i would like the currency for my auction website to be changed from $(dollars) to Rs(rupees). Paypal don't take payment in "Rs". So i am happy for the listing fees to be in $ and that bidders pay me in $. The currency in mauritius is in rupees. So it would be good if bidders can bid in rupees "Rs".

The site used free opensource perl script EveryAuction by

http://www.everysoft.com/

The version of code, installed on the server won't have the currency variable used properly, most of the currency are hard coded instead of using the currency variable, so i made a find and replace, $ to Rs. :-)

It was not so easy, as $ is also used by perl variables and some predefined variables, so have to make sure, i am replacing the currency $ to Rs.

On paypal side, i just divided the due amount by 30 to convert it to USD, so paypal can accept the payment.

Allow others to shutdown your windows XP/2003 computer with out loging

I want to allow others to shutdown my computer with out loging in.

Why ?? Because my computer is used to connect to internet, so if any one in the LAN need to access internet, they need to switch on my computer first.

When they are finished with their work, they have to shutdown my computer. I do not want every one login to my computer for shutdown, also its extra work.

Windows 2003 and Windows XP (not checked in Windows 2000, lets forget about good old windows 2000) allows you to shutdown the computer without loging.

To enable this feature, take Group Policy Object Editor

To take this, go to

Start> Run > gpedit.msc

Also you can get there

Control Panel > Administrative Tools > Local Security Policy

Once you are there, click on

Local Computer Policy > Computer Configuration > Windows Settings > Local Policies > Security Options

Now go through the listing, you can double click any of the item, if you need to change them, all are usefull settings, so read all :-)

At the bottom, you will see

Shutdown: Allow system to be shut down without having to log on

Double click on that entry, Click on the Enabled option box, by default Disabled is selected.

Once you Enable this, you will be able to shutdown the computer without loging in.

Free Image Hosting by www.NetFreeHost.com

Click on the picture to enlarge, you will get a more clear idea on how to do this all. An image can convey ideas 100 (or 1000 ?) times better than words, so we have http://imagehost.bizhat.com for hosting such usefull images, use it :-)

Monday, June 06, 2005

qmail and root email forwarding

sendmail forwards email for user root to any email address specified in /root/.forward file.

After installing qmail, i stoped getting these emails. I found that, the .forward is a sendmail file and will not work with default qmail installation. To get it working, there is some .forward patch available.

I descided not to install this .forward patch, i don't want to stick to sendmail, lets follow the qmail way.

In qmail root can't recive email's. You can forward emails for root to another user or email account. You can specify this in

/var/qmail/alias/.qmail-root

freebsd# cat /var/qmail/alias/.qmail-root
email@net-N-O-S-O-A-M-freehost.com
freebsd#

Now all emails for the user root will get forwarded to email address email@net-N-O-S-O-A-M-freehost.com

FreeBSD Apache Log rotation - newsyslog.conf

newsyslog is used by FreeBSD to rotate log files, it can rotate any log file including that of apache.

newsyslog runs every one hour by cron.

You can find following entry in /etc/crontab

/# Rotate log files every hour, if necessary.
0 * * * * root newsyslog


You can rotate a log file by adding it to /etc/newsyslog.conf

A log file can be rotated by size of log file or by time.

Adding following to /etc/newsyslog.conf will rotate your apachelog file at midnight.


/var/log/httpd/*.log 644 4 * @T00 B /var/run/httpd.pid 30

Where

/var/log/httpd/*.log is path to apache log file.

/var/run/httpd.pid is apache pid file, can find from httpd.conf

@T00 means rotate log at midnight

To find more about newsyslog, try

man newsyslog
man newsyslog.conf


newsyslog -- maintain system log files to manageable sizes

SYNOPSIS
newsyslog [-CFnrsv] [-R tagname] [-a directory] [-f config_file]
[file ...]

DESCRIPTION
The newsyslog utility should be scheduled to run periodically by cron(8).
When it is executed it archives log files if necessary. If a log file is
determined to require archiving, newsyslog rearranges the files so that
``logfile'' is empty, ``logfile.0'' has the last period's logs in it,
``logfile.1'' has the next to last period's logs in it, and so on, up to
a user-specified number of archived logs. Optionally the archived logs
can be compressed to save space.

A log can be archived for three reasons:

1. It is larger than the configured size (in kilobytes).

2. A configured number of hours have elapsed since the log was
last archived.

3. This is the specific configured hour for rotation of the log.

The granularity of newsyslog is dependent on how often it is scheduled to
run by cron(8). Since the program is quite fast, it may be scheduled to
run every hour without any ill effects, and mode three (above) assumes
that this is so.

When starting up, newsyslog reads in a configuration file to determine
which logs may potentially be archived. By default, this configuration
file is /etc/newsyslog.conf. Each line of the file contains information
about a particular log file that should be handled by newsyslog. Each
line has five mandatory fields and four optional fields, with whitespace
separating each field. Blank lines or lines beginning with ``#'' are
ignored. If ``#'' is placed in the middle of the line, ``#'' character
and the rest of the line after it is ignored. To prevent special mean-
ing, the ``#'' may be escaped with ``\'', in this case preceding ``\'' is
removed and ``#'' treated as ordinary character. The fields of the con-
figuration file are as follows:

Thursday, June 02, 2005

RAS Graph & Stats v1.20

RAS Graph & Stats is a network/dialup monitor and stats tool. It provides real time graph of traffic. Detailed stats provide daily/weekly/monthly/yearly stats/user defined range. Stop watch. etc..

You can use it to measure bandwidth used by your computer, it provides dialy, monthly report and real time bandwidth usage graphs.

This app basically picks up where the old NetStat left off by providing stats for network card (cable/dsl/etc).

RAS G&S is now Win9x/Win2k/Windows 2003/XP compatible

Download RAS Graph & Stats

Whats New in v1.20
1. Improved stats routines/better performance
2. Improved graph, several new graph options.
3. Added Reports

Known Bugs
1. When changing the horizontal scale + update interval the vertial minute lines aren't drawn correctly.

Read what others tell about RAS Graph

======================
RAS Graph & Stats
======================

Dialup/Network graph and stats tool
for Windows (98/Me/NT4/2000/XP)

Home Page: http://www.flashfxp.com/freeware.php
Copyright (C) 2002 by Charles DeWeese
All rights reserved


This software is provided "AS-IS"


Installation
------------
In order for RAS G&S to continually keep track of your stats its
recommended you run RAS G&S when windows start, Simply create a
shortcut to RAS G&S in your Startup folder. Right click on the
shortcut and select Properties, Change the Run from "Normal" to
"Minimized"


Setup
-----
After you have installed RAS G&S you will need to configure it,
this is done via File Setup.


Description
-----------
RAS G&S provides a real-time graph of network/dialup activity.
Detailed stats are avilable providing the user with daily &
monthly totals, With an option to view stats between a range of
dates.


Changing Tray activity icons
----------------------------
When Show Activity is enabled the images will replicate windows
standard network activity icons.

These icons can be customized.

create a 16x16 pixel icon (16 color) and name it based on the
chart below.

\RAS Graph & Stats Folder0.ico = Standard icon (when show activity is unchecked)
1.ico = no activity
2.ico = activity in/out
3.ico = activity in
4.ico = activity out