Monday, March 23, 2009

Why Google wins

Ever wonder how Google maintains its #1 position among search engines? Here's one reason: they send their robots to find places where stuff changes.

I first put up my website www.mashedge.com on a limited alpha test over a month ago. The first day I put it up, Googlebot was there and has been a regular visitor since. Only in the last 1 week, I have seen the MSN bot come by. There has been no trace of the Yahoo bot even now. If Microsoft and Yahoo want to catch up with Google, they better get their bots working right.

Saturday, March 7, 2009

Setting up sendmail relay with Airtel India as the ISP

This post is meant for those users who meet these requirements:

  1. You have obtained a static IP address from Airtel India.
  2. You have set up your host correctly - see my previous post.
  3. You plan to host a mailserver on your host with the ip address from step 1.
  4. You plan to use sendmail as the MTA (mail transport agent).
In order for sendmail to successfully relay messages to your ISP, and then onto the recipients, there are a number of steps to configure sendmail correctly. Some of these are required to eliminate spam (a very honorable goal).

First, you need to ask Airtel to enable your sendmail daemon to connect to their sendmail daemon on port 25. This is accomplished by sending a email to their customer service care.karnataka@airtel.in with cc: to d.blr@airtel.in. (Note these e-mail addresses will be different if you are in a different region in India). This step is mainly to get written confirmation from you that you will not send spam and have anti-virus measures properly done on your host.

Second, once port 25 is enabled, go to relay.airtelbroadband.in and register the e-mail address for which you need the relay. Let's say the webserver on your host will send mails from email address foo@blah.com, then you do the following:
  1. use the DSL userid and DSL password that Airtel gave you.
  2. In the relay addresses form, add "foo@blah.com". In the password field, enter the auth password of your choice for this email address, let's say it is "mypwd". Only emails from this address will be relayed. Everything else will be rejected by Airtel. Note that you should choose this email address to be the login account of your mailserver on your mailserver machine. In case you want to change this address later, you can login to relay.airtelbroadband.in with "foo@blah.com" and "mypwd" and then update the email address and/or passwd.
You should see that the email has been successfully registered. This completes the setup at Airtel ISP.

Now the important part on your side.

  1. cd to /etc/mail
  2. edit authinfo file and add this line: AuthInfo:relay.airtelbroadband.in "U:foo@blah.com" "I:foo@blah.com" "P:mypwd" "M:DIGEST-MD5 LOGIN PLAIN"
  3. edit sendmail.mc and add these lines. For more info about this, see this sendmail chapter at Mashedge:
define(`SMART_HOST', `esmtp:relay.airtelbroadband.in')dnl
FEATURE(authinfo)dnl
define(`confAUTH_OPTIONS', `A')dnl
TRUST_AUTH_MECH(`EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_REALM',`blah.com')dnl
define(`confCACERT_PATH', `/')dnl
define(`confCACERT', `ca-bundle.crt')dnl
define(`confSERVER_CERT', `sendmail.pem')dnl
define(`confSERVER_KEY', `sendmail.pem')dnl
define(`confCLIENT_CERT', `sendmail.pem')dnl


After you do these, do the following:

  • make -C /etc/mail (This will regenerate all the files required for sendmail)
  • /usr/sbin/service sendmail restart
This completes the setup.

You can test if sendmail is actually sending email by sending one test email as foo@blah.com from your host. Check the /var/log/maillog for any errors.

Monday, March 2, 2009

Sendmail from hosts with static IP addresses

Configuring sendmail to relay mails is straightforward. Look at this chapter on sendmail at Mashedge for suggestions by folks on the internet. The implicit assumption is that your host is allowed to send e-mail.

So, why would your host not be allowed to send mail? Due to the proliferation of spam, e-mail providers (such as Google, Yahoo etc) will refuse to relay mail from sendmail from a host unless both the DNS lookup and the reverse DNS lookup match for that host sending e-mail.

Let's say you have a domain name "blahblah.com". You get an static IP address from your ISP a.b.c.d.

You fix the DNS by adding the "A" entries using the domain management tools provided by the vendor from who you purchased the domain name. When you do "nslookup blahblah.com", you should see that "blahblah.com" resolves to "a.b.c.d". This is the easy part.

The next part is the reverse DNS. In this case, a lookup via the unix command "dig -x a.b.c.d" should resolve to "blahblah.com". Instead it will resolve to your ISP provider. Unless this part is fixed, you will NOT be able to send mails via sendmail from your host "blahblah.com". Fixing this is not in your control and you must contact your ISP to do the needful.

If you attempt to send mails without fixing the reverse DNS, your SMTP provider will reject the e-mail with an error 550 5.7.1 (IP name may be forged). Yikes! See here for more details about relaying denied.

Sunday, March 1, 2009

Open Source for your PC - Slowly advancing forward.

After using Apple Mac for years, I reluctantly bought a PC (S0ny VAIO NS VGN-NS25G) with windows vista on it! I was forced to because an accounting software that I planned to use (Tally) runs only on windows.

Not wanting to fork out more money for other Microsoft programs, I explored open source out there.

Here are the recommendations:

  1. OpenOffice is quite an excellent replacement for Microsoft Office.
  2. Mozilla's Thunderbird with Lightning and Google Contacts add-ons is a no-brainer replacement for Microsoft Outlook.

OpenOffice is getting major traction. Even some big banks in India have begun to use OpenOffice and it is real easy to download and set it up.

It is easy to configure Thunderbird to fetch e-mail from your e-mail provider. Using Google mail with IMAP was quite trivial. On the whole it took me about 3-4 hours to download and set up my laptop PC.

However, can my grandfather or father do this? Not likely. Can a non-computer professional set up their own PC with open source software? Not likely.

While all the great pieces of open source software exist and together can easily give Microsoft a run for their money, what is lacking is a comprehensive one click solution to install and set up all the various pieces of open source software into a complete workable solution on a PC running Windows.