CompuBlab

If it's computer related, we'll blab about it!

Category: Software

Victory Over Email Services!

I am happy to report that after quite a lot of time trying various email solutions, I have FINALLY been able to get email services (in this case “out-bound only” email capability) running on my linux solid state server that I wrote about a while back (click here for the original post). You would think that this would be a rather simple thing to accomplish…but due to the current state of older software and spam protection mechanisms, it turns out to be more involved than you might think.

This story begins back when I began running automated scripts each night on my server. One thing I wanted to do was have my nightly scripts, which do things like back up data to a NAS device (network attached storage), email me if there are any problems encountered. Obviously, I don’t want to have a system crash and THEN discover that my nightly backups have not been “backing up” for the last year!

Well, in the scripting world on Linux (sorry this is going to get a bit technical), a program called “sendmail” is the old workhorse for whenever you need to send an email from a program or script. Sendmail was my first attempt at setting up out-bound email…and it gave me nothing but headaches.

Sendmail is not the most simple piece of software to configure. However, it has been around for a long time, so I had the benefit of other people’s experience (by looking up the escapades of other people like myself on the web). It turns out that one of the “protections” that my internet service provider has in place to prevent people from sending massive amounts of spam email from their homes is that they block outbound traffic on TCP port 25.  Note that when you connect to a standard email server to send mail (an SMTP server), you usually connect on port 25. With this outbound port blocked by my ISP, I had to use a different port.

Sidenote: I had decided to use the email server of my web hosting company (which happens to be Hostgator…a company I have been with for years and can highly recommend) rather than my ISP’s email server because of problems I have had with my ISP’s mail server in the past.

It turns out that my web hosting company also provides a mail server connection on port 26, so all I had to do was get sendmail to send to port 26 rather than port 25 and all would be set. After many hours of research, I came to the conclusion that sendmail, being as old as it is, HAS NO WAY TO CONNECT TO A PORT OTHER THAN TCP PORT 25! Thus, I had to scrap my plans to use the sendmail package.

Next up was a full featured mail server called Exim. I installed Exim, and while I knew it was gross overkill to use a full email server for my sparse needs, I had heard that Exim was a solid piece of software and well documented. I thought that for sure Exim would be able to solve myproblem…even if it WAS overkill.

As it turned out, after many hours of tinkering with Exim…I gave up on it. Could it solve my problem? Most definitely! Was it well documented? I’d have to say “yes.” Was it royally over-the-top overkill? You betcha!

The problem with Exim *is* the fact that it is so full featured. It has so many gizmos and such to handle the most demanding of emailing needs that it requires a significant investment in time just to learn how to set it up. Now keep in mind, computers are not new to me. I hold both a bachelors and a masters degree in computer science and I have dealt with email servers before…but nothing on this level of completeness/complexity. I decided that I would have to study for weeks (maybe an exaggeration) before I would know enough to properly configure that beast…so I gave it up as a bad idea as well.

Then I found the most wonderful piece of software for my needs that I could possibly stumble upon. I came across a software package called ssmtp. It was written by folks that were trying to solve exactly the same problem that I was working on. They just wanted to send out-bound email from scripts running on a server. This package, which is available directly from the package management system on Ubuntu Linux (and probably all other distributions of Linux) installs in seconds. You configure it by setting some obvious fields in its rather small config file (like “address of outbound mail server/smarthost”, user name for the outbound mail server, password for the outbound mail server, etc.) and you are off and running!

I had the mail services up and running within 10 minutes once I started working with ssmtp!

I would like to point out that I found a really good write-up online regarding how to configure ssmtp. You can find that writeup by clicking here.

So now I have the ability to send emails via my solid state server. So what else can I do with this? Well, my next trick will be to download weather information from the National Weather Service and put together a short “summary” to email to my cell phone. I don’t own a “smart phone,” but with just a little bit of coding, I intend to turn my “Plain Jane” cell phone into a “smarter” phone by having weather reports sent to it at key times during the day.

Yes, I know, there are probably existing ways of doing this already, but it is good practice for the geek in me! I’ll let you know how that goes as well…when I get around to it.

Until that time…live well!

Email Server Follies!

Over the last two weeks I have been embarking on quite an adventure (or perhaps “misadventure” would be a better word) trying to get a small email server up and running on my Linux computer at home. Why would I want such a thing, you ask? Well, I have been setting up automated services on this machine…and I want those programs to be able to email me should something go wrong. That way, I don’t have to keep checking the computer…I know it will contact me if something is amiss.

Given my needs, I only need the ability to send email…not receive it.

So first I tried to configure SendMail, a well known Linux/Unix emailing program, to send emails through to my internet service provider (ISP) for final delivery. WHAT A MESS! I’ve had root canals that hurt less than trying to configure SendMail!

After countless hours of frustration, I deleted sendmail from the computer and installed Exim…a full-featured (and more recent) email server. The configuration for this software is much better documented…but I am still having a lot of problems with the setup. I have not invested anywhere near the amount of time in Exim that I did in SendMail…so there is still lots of exploring to do. I think in time I *will* be able to get Exim to do what I want…with an added bonus.

Also on my home computer network is a DLink NAS: a “network attached storage” device that provides all of the computers in our home with a place to store, backup, and share files on the network (without having to have a dedicated computer handling the traffic…the NAS has all the smarts necessary to make the hard drives available to users on the network). This NAS has features such that I can have it run diagnostics on a nightly basis and then email me the results. Sadly, the firmware on this device ONLY sends email on port 25…a port that is blocked by my ISP. Since there is no way to change this setting (I’ve checked with the manufacturer), I am stuck. However, once I get Exim up and running, I could configure the NAS to send its email to Exim running on my Linux computer, and then have my Linux computer forward the email to my ISP on the special port required.

All of this is fun, and more than just a little bit frustrating! However, I look forward to getting all of this working.

If you are curious as to why it is so complex and difficult to set up an email server, it has to do with the fact that email spam has gotten so bad over the years, that more and more rules and protocols have been instituted to try to cut down on all of that junk email. As such, more and more is required of modern day email servers in order to satisfy these growing requirements. There really won’t be any relief in the future for all of these”anti-spam” kludges until the email protocols themselves (designed way back in the early days of the internet…and with no knowledge of today’s hostile Internet environment) get reworked. However, since SO much software today relies upon the old email protocols, making such a change is difficult.

Until next time…

 

 

A Great O/S for Older Computers

I was putting together a computer for a friend of mine and was trying to figure out what operating system (O/S) I could/should use. The computer is an older laptop using an AMD K6 processor (equivalent in power to roughly a Pentium II processor). The machine still worked (I take good care of my computers), but it runs the venerable Windows 98.

Now, I wasn’t so worried about the Windows 98 O/S except for the fact that when I finished getting everything set up I had a serious problem with the web browser. For one, the computer came loaded with Internet Explorer 5!!! After playing with this version of IE I discovered that:

  1. Facebook would not even let me log in because the version of the browser was so old
  2. IE 5 was crashing left and right
  3. IE 5 couldn’t deal with wide web pages very well at all.

To make matters worse, I had a very difficult time finding a version of ANY browser that ran with any level of decency on Windows 98. Ultimately I decided to use Firefox 2…which works okay…but was plagued with poor memory management problems (which is to say in layman’s terms, it was a memory HOG!). Thus, I was not able to get very good performance out of it (which translates to: It runs very slowly).

Finally, I decided to find out if an alternative operating system might not work better than Windows 98. My search ultimately lead me to a distribution of Linux called “Puppy Linux” (http:\\puppylinux.org). I have to say, I was mighty impressed.

First of all, you should know that puppy linux comes as a “live CD”. What does that mean? It means that you can insert the CD into your computer’s CD drive and boot the operating system directly from the CD without having to disturb what is on your hard disk. In fact, if your older computer supports it, you can also boot puppy linux from a flash drive.

Second, puppy linux was DESIGNED for older computers. It boots a very small footprint (which means, it takes up a very small amount of memory), but yet packs a lot of powerful apps. I was very impressed.

From a selection of top flight browsers, to a spreadsheet program, a database program, a document creation/editing program, and a ton of other useful applications, this O/S is just right for making use out of those older computers that may not have a powerful processor or a lot of memory.

I have always been annoyed at the fact that as we progress with later versions of Windows, the memory and hardware requirements just keep going up and up and up at an insane rate. I’m sorry, but unless you have some specialty application such as video editing, or major league photo editing, or sound editing, I just can’t see why I should buy an entirely new computer just to run the latest version of Windows. Within a certain limit, yes…it makes sense to periodically upgrade your hardware. But it seems like each new version just requires more and more and more.

Perhaps the best part about puppy linux is that it is 100% free!

Now, from time to time (and perhaps more often as of late) you will see me make posts on this site regarding what I feel to be the evils of this country’s patent system. One of the big reasons I oppose the current patent system is that large corporations are trying to use the patent system to prevent people from giving away free software such as puppy linux! I don’t want to go into that right now (there are already a wealth of other posts on CompuBlab.com that address this issue…and no doubt there will be more in the future). Just know that when I post regarding the problems with the US Patent system, THIS is what I am talking about.

At any rate, the point of this post is to point out that if you have an older computer that you don’t want to junk (maybe you want to allow your kids to use it for their own purposes, or perhaps you want to give it to someone who just wants basic email/web surfing/and letter writing), you have an operating system alternative that you can try out without even disturbing whatever is already on the hard drive.

I should point out that in the case of the computer I was configuring for my friend, I ultimately had to leave Windows 98 on the computer. The problem was that:

  1. The bios of the laptop did not support booting from a flash drive (it was too old)
  2. I couldn’t burn a CD that the CD-ROM drive on that machine could read (know that in the early days of computing with CD-ROM drives, many of those older drives cannot read the CD-RW discs that you can burn in a computer’s CD drive today).

I was looking for a solution to these problems so my friend could use puppy linux, but I ran out of time (he drove in from out of town) and he decided he would take it as is with Windows 98 loaded on it. I will most likely continue to dabble with puppy linux until I figure out how to get it running on that computer.

Anyway, now you know that thanks to Puppy Linux, you have options for what to run on those older computers.

Powered by WordPress & Theme by Anders Norén