Saturday, February 24, 2007

Firefox and IPv6

Just installed Ubuntu 6.10 in my laptop for fun. Installation was a breeze, although it refused to install on the partition I wanted it to. It just kept complaining that I hadn't defined the root mount point, when I obviously did. However when chosing another partition, it went on OK. So I still have Ubuntu 6.06 in my Hard drive.

I had a strange problem browsing the internet. Firefox refused to work, giving me a "connection timeout" on every website. Ping and dns resolved ok via the command line. Even more peculiar, Konqueror worked as well. So, did a google for a solution, and managed to find this:

linuxquestions.org

of which it states:
"Try turning off IPv6 in Firefox. For some reason that tends to fix problems with Yahoo.

Type 'about:config' in the address bar and look for 'network.dns.disableIPv6' and toggle it to true"

Did that, restarted Firefox, and voila, it worked.


yk.

Thursday, February 15, 2007

Nokia E61 knocked out

My E61 died when I was retrieving some emails. So "Messaging" had stopped working. Accessing this app would flicker the screen, and return to the "Standby" menu. This meant that I could not access my POP accounts for work and GMail, but more importantly, I could not open the "Inbox" for SMSes!

So I tried the usual reboots, shaking, taking the battery out and counting to 10, praying to the Nordic gods ... to no avail.

Finally, out of options, I decided to wipe the sucka. Coincidentally, there was a firmware upgrade, so I had to download the new version of the Nokia Software Updater (21MB), and then download the new firmware (48MB) for the E61.

So since the last upgrade, this new version at 3.0633.09.04 definitely feels faster. Ive also discovered more blogs which just go on and on about these Nokia phones: E-Series which discuss the hardware, and Symbianv3 which highlights new software. The improvements for the new upgrade is detailed here, some of which are quite nice.

After using it for the past 12 hours, I have found that the data network stability is significantly better. Both for 3G/GPRS and WiFi. Previously while using the browser on the couch at home, the signal would drop just because I moved my arm. Now, browsing or downloading POP email is very consistent.

I made a backup prior to the upgrade, but when I restored the data, the same problem of "Messages" not available recurred. So I had to reset the phone by typing in *#7370# with the default password of "1234". This wipes the memory fresh. But it also meant that I had to restart configuring the device all over again. I wonder if its possible to just "Restore" the calendar and contacts from the backups without the other settings?

Oh yes. The settings for POP3 for GMail is:
Connection Settings / Incoming Email:
User name: [username]@googlemail.com # note its, googlemail, not gmail.
Password: [password]
Incoming mail serv.: pop.googlemail.com
Access point in use: Maxis WAP 3G # or whatever. I have a group.
Mailbox name: gmail
Mailbox type: POP3
Security (ports): SSL/TLS
Port: Default
APOP secure login: Off
Connection Settings / Outgoing Email:
My email address: [username]@gmail.com
User name:
[username]@gmail.com # note, its gmail, and not googlemail as in incoming!
Password: [password]
Outgoing mail serv.: smtp.gmail.com # note, its gmail.com and NOT googlemail.com
Security (ports): SSL/TLS
Port: Default
User Settings:
My name: [full name]
Send message: Immediately
Send copy to self: Yes
Include signature: No
New e-mail alerts: On
Reply-to: Off
Delete e-mails from: Phone and server #doesnt really remove nor archive from server
Retrieval Settings:
E-mail to retrieve: Msgs. & attachs.
Retrieval amount: All # this is IMPORTANT. If you select 30 new ones, then the mailbox will erase itself and only display the new emails.

Took me a while to get this setting right... its not obvious.


yk.

Tuesday, February 13, 2007

SPAM: No Listing

Ive read about the concept on No Listing awhile back, but never ventured in setting it up for the domains I look after. Reading xWingz post inspired me to try it out for real.

We currently have a few lines and therefore a few separate IP addresses within the MX groupings. So it was relatively easy for us to try this out. We just disabled Port 25 (smtp) on the main mail server. We initially just left it at that, without a response to the request to the sender. This meant that the delivery was delayed, as the sender had to wait one to two minutes before timing out to the "dummy" mailserver.

You can test this by telnetting to the port: 'telnet mail.host.com 25' and that would take forever before it returns any results.

Therefore, to be a better 'netizen, and as recommended by the No listing page, we have requested the server to return a "Reject" on any connections to port 25. This means that the connections are immediately terminated, and non-spam senders will immediately try MX record #2.

Additionally, instead of doing this blind, we have current statistics of spam rates collected over the year on some selected email accounts. So here is the graph of spam (red) vs ham (everything else) for the past two weeks:


As you can see spam for these accounts are at a "healthy" 80-90%. We shall see in a few weeks if the changes made to the MX records make a difference to our spam rates!

yk.

Monday, February 12, 2007

Firefox 2.0 - the upgrade

Ive finally upgraded to Firefox 2.0. The reason why I hadn't done earlier was because I was very happy with my setup with Firefox 1.5, and didnt really want to mess around with more settings and other twiddly things. I dont have time for that.

However I saw my colleague doing a search and I was impressed with the fact that it finally searches within text areas! Previously when I was updating large text files in webmin like httpd.conf or the aliases file, I had to Ctrl-A Ctrl-C (copy all) and Ctrl-V (paste) it into Notepad++ before I can do some proper searching and text editing.

Firefox 2's new spell checker is a bonus too. The dotted red lines are far less obtrusive than regular word processors wiggly red lines. Its nice.

What I didnt like about Firefox 2 was the way it displayed the tabs. Unlike Firefox 1.5, it would keep the width of the tabs and scroll new tabs along. This is unnecessary usage of screen real estate, and the individual close (x) buttons are either very hard to hit when you need them, or extremely easy to click on when you dont expect it to.

So here's how to change it to a better behaviour. Type in "about:config" in the URL bar. You should see something like this:

To change the close tab buttons to appear on the right hand side as in Firefox 1.5, change
browser.tabs.closeButtons = 3

To make sure that the tabs shrink to fit, change this:
browser.tabs.tabClipWidth = 0
browser.tabs.tabMinWidth = 0

Firefox 2.0's tab behavior would be close to what 1.5 handled them. Add-ons like "mouse gestures" and "Free Download Manager" was automatically upgraded and installed.

So far, no hassles.


yk.

Friday, February 09, 2007

Yum, PHP and Xen running 32bits on a 64bit machine.

My host Xen server is an AMD 64bi machine. The little Xen VMs are based on CentOS 4.4 32bit, which I plan to keep it as such to allow easy migration. However it comes with abit of risk.

I managed to run 'yum install httpd mysql mysql-server' without any problems. But when I needed to install PHP, typing in 'yum install php' would result in a horrific set of errors which look like this:

Error: Missing Dependency: libgssapi_krb5.so.2()(64bit) is needed by package openssl
Error: Missing Dependency: libdl.so.2()(64bit) is needed by package openssl

etc...

which indicates that yum has detected the 64bit nature of the host arch, as 'uname' gives it away.

So how do I force yum to install only i386 binaries? Simple, RTFM! 'man yum' ... somewhere in the middle of the documentation, it states:
Specifying package names
A package can be referred to for install,update,list,remove etc with any of the following:

name
name.arch
name-ver
name-ver-rel
name-ver-rel.arch
name-epoch:ver-rel.arch
epoch:name-ver-rel.arch

For example: yum remove kernel-2.4.1-10.i686
So to get php to install nicely, just type:

yum install php.i386

and it works!

[Update: 5 minutes later.
It kinda worked. there was a problem at the end of the installation. Yum complained that 'package php-pear-4.3.9-3.22 is intended for a x86_64 architecture'. So "no problem," I thought, "I just apply what I learnt to php-pear by using 'yum install php-pear.i386'"
No. yum resolved that php needed more stuff like openssl, and decided to look for the 64 bit installation. I tried my luck and did this:

yum install php-pear.i386 php.i386

on the reasoning that I should also force yum to install only i386 archs for these two items. Surprisingly, it kept all the dependencies to i386, and it resolved it well.

So NOW it works.]

yk.

Xen and Centos 4.4

After finding it "difficult" to install extra stuff in a rPath installation, Im now trying to use the CentOS images from jailtime.org.
Got it running, and after getting the network up, I needed to install these basic administrative tools
  1. webmin
  2. vi
I got the latest rpm from webmin.com, and typed in 'rpm -hiv webmin.xx.noarch.rpm' It complained that it needed perl, so I had to do this

yum install perl

After downloading 12MB of stuff, rpm'ing webmin was successful. Joy.

The default editor provided by jailtime is 'nano'. Its a nice interactive editor, but I guess Im way to used to 'vi'. 'vi' is definitely primitive by anybodies standards, but I guess typing in the 'Esc-W-Q' has become ingrained in my fingers, that I can't help but to install it.

Unfortunately it is not straightforward, as 'yum install vi' does NOT work.
Googling for this is hopeless, as when you do a search for 'yum install vi', you just get instructions on how to edit yum repositories with vi, and its not very helpful.

However a 'which vi' on a system which has 'vi', gives a hint:

alias vi='vim'
'usr/bin/vim'

however a 'yum install vim' also does not work, as the proper command is actually

yum install vim-enhanced

This will do the necessary dependency checks, and will offer to download 4.5MB worth of stuff! I never knew a console based text editor would be so bulky.

Anyway, I shut down the Xen image, made a copy of it so that next time I need to prep up a virtual server, I already have one preprepared.


yk.

Thursday, February 08, 2007

Rapid respawns

If you are every using rPath Linux in Xen, and you get this errors in your console:

INIT: Id "2" respawning too fast: disabled for 5 minutes
INIT: Id "3" respawning too fast: disabled for 5 minutes
INIT: Id "4" respawning too fast: disabled for 5 minutes
INIT: Id "5" respawning too fast: disabled for 5 minutes
INIT: Id "6" respawning too fast: disabled for 5 minutes

you will find that that the terms are not created yet in /dev i.e.

#ls /dev
tty tty1

so you would have to create em as such:
[removed the prompt, so its easy to copy&paste!]

cd /dev
mknod tty2 c 4 2
mknod tty3 c 4 3
mknod tty4 c 4 4
mknod tty5 c 4 5
mknod tty6 c 4 6

That should get rid of the pesky messages.

yk.