Blogs

Firefox2.0 Tips...

This is going to consist of tips on Firefox2.0 usage. If you have any good tips please leave it in the comments.

Hide Go Button

Type in "about:config" in the address bar, then do a search for "hideGoButton" and toggle the value to "true".

Need better SPAM guard with Qmail

i have used QMail as MTA in Linux and simple web based PHP script for mail box. the smtp is Qmail-smtpd and pop is qmail-pop3d. i have used spam guard as SpamAssassign 3.0.3 and qmail scanner 2.0.1 with clamd antivirus 0.88.5. all these are latest product as i know but what a problem i am facing with this setup is still i am not able to control all SPAM.

So any guys, do you have any idea about how to control SAPM perfectly with Qmail? i will be very very happy with better solution.

Babu Ram Dawadi[baburd], CIT,IOE,TU

Tailing several files...

I wasn't aware you could tail several files until I had to find a way to track what was going on all the virtual web sites:

$ tail -f /home/virtual/*.*/var/log/httpd/*log

If you only want to see the 404 errors:

$ tail -f /home/virtual/*.*/var/log/httpd/*log | grep " 404 "

LED Technology

Physical function
A LED is a unique type of semiconductor diode. Like a normal diode, it consists of a chip of semiconducting material impregnated, or doped, with impurities to create a p-n junction. As in other diodes, current flows easily from the p-side, or anode, to the n-side, or cathode, but not in the reverse direction. Charge-carriers - electrons and electron holes - flow into the junction from electrodes with different voltages. When an electron meets a hole, it falls into a lower energy level, and releases energy in the form of a photon.

The wavelength of the light emitted, and therefore its color, depends on the band gap energy of the materials forming the p-n junction. In silicon or germanium diodes, the electrons and holes recombine by a non-radiative transition which produces no optical emission, because these are indirect bandgap materials. The materials used for an LED have a direct band gap with energies corresponding to near-infrared, visible or near-ultraviolet light. Free standing LEDs are usually constantly illuminated when a current passes through them, but flashing LEDs are also available. Flashing LEDs resemble standard LEDs but they contain a small chip inside which causes the LED to flash with a typical period of one second. This type of LED comes most commonly as red, yellow, or green. Most flashing LEDs emit light of a single wavelength, but multicolored flashing LEDs are available too.

Remotely Manage Machines Using VNC

VNC stands for Virtual Network Computing. It is, in essence, a remote display system which allows you to view a computing `desktop’ environment not only on the machine where it is running, but from anywhere on the Internet and from a wide variety of machine architectures.

Read Full article here

Ironing out Ubuntu Dapper to Edgy upgrade...

I took the jump from Dapper (6.06) to Edgy (6.10) with quite a flawless upgrade initiated by:

$ gksu "update-manager -c"

Had to comment out the PLF repositories before I could do the upgrade.

## PLF REPOSITORY
# deb http://packages.freecontrib.org/ubuntu/plf dapper free non-free
# deb-src http://packages.freecontrib.org/ubuntu/plf dapper free non-free

The first thing I did after the upgrade was to enable the universe and multiverse repositories via Synaptics and run an upgrade and autoclean via aptitude to clean out any unused and downloaded packages:

$ sudo aptitude upgrade
$ sudo aptitude autoclean

Also noticed that the default shell had been changed to dash instead of the familiar bash on linux distros, so I removed the symbolic link for "/bin/sh" from dash to bash:

$ sudo rm -rf /bin/sh
$ sudo ln -s /bin/bash /bin/sh

The default video driver didn't quite work too well with my nvidia card and so installed nvidia-glx and enabled it.

$ sudo aptitude install nvidia-glx
$ sudo  nvidia-glx-config enable
$ sudo nvidia-xconfig

With the nvidia glx driver and the new kernel installed, I edited "/etc/grub/grub.conf" to point to the new kernel:

title Ubuntu Edgy 386
        root (hd0,2)
        kernel /vmlinuz-2.6.17-10-386 ro root=/dev/mapper/vg00-lv00
        initrd /initrd.img-2.6.17-10-386

Gave the system a reboot and everything seemed to be back to normal... but not until I opened up firefox and noticed the font rendering was blurred and ugly, unlike the crisp fonts on other application. Checked on some of the bug reports at launchpad.net and indeed found a fix there. The fix mentioned was to create a ".font.conf" file with the below contents in the home directory:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
  <edit mode="assign" name="rgba" >
   <const>rgb</const>
  </edit>
</match>
<match target="font" >
  <edit mode="assign" name="hinting" >
   <bool>true</bool>
  </edit>
</match>
<match target="font" >
  <edit mode="assign" name="hintstyle" >
   <const>hintfull</const>
  </edit>
</match>
<match target="font" >
  <edit mode="assign" name="antialias" >
   <bool>true</bool>
  </edit>
</match>
</fontconfig>

Tomboy -- a wiki for the desktop had been made available by default with Edgy but did not show up anywhere in the Applications list so added it to the top panel from the list of Accessories available.

Last but not the least my boot time is now about 12 seconds on a 1.75Ghz cpu laptop with 1Gig of memory... all due to the new init system, upstart which is now the default.

Reducing Spam with milter-greylist

milter-greylist is a sendmail milter which implements the greylist filtering method, as proposed by Evan Harris.

Greylisting works by assuming that, unlike legitimate MTA, spam engines will not retry sending their junk mail on a temporary error. The filter will always reject mail temporarily on a first attempt, then accept it after some time has elapsed.

So this method of greylisting works very well if used with a combination of DNS-Based Blacklisting as the spammer would have gotten blacklisted in several real-time distributed black lists before the second attempt and effectively reducing spam emails.

Below is an outline of quickly building and installing the greylist milter and configuring sendmail to use the milter. This was done on a RHEL3 box.

Check mail server for open relay

If you are new to setting up a mail server be cautious that you do not open your server accidently and relay mail...

One very simple way of testing it is to run:

$ telnet relay-test.mail-abuse.org

This will attempt to connect back to your machine and run a series of mail relaying tests against it. The success or failure will be printed at the end.

You may need to turn off firewall temporarily during the test or allow for outgoing connection through the firewall.

Information about robots.txt file...

robot.txt file is your invitation to the search engines when they send a spider to crawl through the pages of your web-site. These spiders are out and about on the web gathering information that contributes to your search engine ranking.

There are different kinds of robots/spiders/crawlers, some are just taking inventory, some are looking for what's new, but whatever kind of robot they are, when they hit your site, you have some control over what they do, and you need to give them some instructions.

You can block bots, you can tell them which pages they can and can't look at and you can tell them when you'd like them to return.

There are probably a thousand free robot.txt generators out there and here is one you can use: 1-hit.com

If you want to generate your own file read on...

Reset forgotten root password on linux boxes...

I had an old computer with linux installed and had forgotten the root password for it. Unfortunately, I did not have my favourite handy-dany knoppix cd around but did remember that I could get a shell access by appending "init=/bin/bash" to the lilo/grub boot loader, which should be enough to get in and reset the root password.

DISCLAIMER -- I do not take any responsibility for your actions if you go and try this on your friends machine!!

  1. Press Ctrl-Alt-Del to shut down the system in an orderly fashion.
  2. Reboot the system and when lilo/grub boot loader get to the point where you select the various installed kernels on the system, type the letter "a" for "append".
  3. You will get a prompt like this to add boot options to the boot string found in your lilo/grub conf file:
    grub append> ro root=LABEL=/
  4. Append "init=/bin/bash" to it to look like this.
    grub append> ro root=LABEL=/ init=/bin/bash

    This tells the kernel to drop to a root prompt bash shell instead of starting the "/sbin/init" process.

  5. The root filesystem is currently mounted read only which needs to be changed to read/write prior to resetting the password.
    # mount -o remount,rw /
  6. Now that the file-system is remounted read-write, go ahead and type `passwd` to change the root password.
    # passwd
  7. Since "init" isn't running to safely take down the system, remount the system to read only prior to shutting down the system.
    # mount -o remount,ro /
  8. You can now safely press on the power button to shutdown the sytem.

Syndicate content
Comment