Tag Archives: Amazon

Two servers: SheevaPlug and Amazon

After my SheevaPlug died, I was in search for a new (temporary) host. I decided on Amazon AWS, because it allowed me to set up my own server, use the software I want, and configure it the way I need to. The SheevaPlug itself was quickly repaired, but I decided to keep Amazon. Why? Because the server there is actually a bit faster then the SheevaPlug. Although the SheevaPlug could run dynamic web pages (such as this blog), it was not ideal, and pages loaded slowly. Most web pages were served statically.

But running Amazon AWS also has its disadvantages, especially with mail. The service offered by Amazon is great for spammers. You can set up a server, send all the spam, and cancel the account. For this reason, Amazon limits the number of mails you can send from an Amazon account. Even worse, many mail providers block all mail from Amazon. Hotmail is one such provider. If you try to send a mail to Hotmail, you get a quick message back, that mail is refused.

To solve this, I had to “split” the server. Web pages are still hosted at Amazon, but the mail server is hosted at the SheevaPlug. It was a bit complicated to set up, but it all works beautifully now. If a web page (on Amazon) now tries to send a mail, it used postfix. In postfix, the relay SMTP host is set to the web address of the SheevaPlug. So all mail is first send to the SheevaPlug, and only then to the addressee. The web mail is still hosted at Amazon, but it reads the mail from the SheevaPlug. Newly received mail is delivered directly to the SheevaPlug. This can be achieved by setting MX-1 DNS record.

The SheevaPlug died…

This Friday my SheevaPlug suddenly died. All that was left was a device with the green blinking LED. Nothing worked, including the serial interface, which should always work. Searching the web, it turns out this is a problem with the power supply (PSU). Apparently it happens more often. My SheevaPlug was still under warrenty, so NewIT will replace the it. Unfortunately, the new PSU is not available until January. So what to do with all the sites that I run on my SheevePlug’s web server?

I decided to use Amazon EC2. You can place your own virtual server in Amazon’s cloud. When you sign up, you get one micro server for free. Such a micro server is even a little bit faster than the SheevaPlug, so that it an added bonus. Because you run your own server, you can choose whatever OS you want (I choose Debian, only Lenny was available though), and you can set it up the way you want it. So it was an easy process of copying all the data and configuration files to the new server. Within a couple of hours, the web server was up and running again. There seems to be some cost to data transfer out from the server (so for every web request). But it is a ridiculous low $0.01 per GB. After two days I used 7 MB, so I’ll take a while before I have to pay 2 cents.

It’s not all bad, because when I had to set up a new server, I could use my own articles. I could updated some articles, to include extra information, or correct some errors.

Update 1: First problem found. Hotmail refuses all mail sent from Amazon EC2 servers, because the IP range is listed in Spamhaus’ Policy Block List. So you would need to use an external SMTP relay host.

Update 2 (28 December): I received a new PSU from NewIT today. Installing this was easy. The SheevaPlug is now working again. Very quick response from NewIT.