Archive

Posts Tagged ‘blog’

Multi-Domain Linux Mail Server

August 4th, 2008

Over the last few weeks, I’ve done a lot of blogging on my new provider, Slicehost, and the steps I’m taking to move away from Windows Server hosting to the Linux platform, at least for my personal sites and client development.  I still have to use some Microsoft technologies at my day job, but I am even in the queue to switch to Linux on my workstation at work too as new machines get ordered.  I plan on running XP in a VM for necessary things on the new workstation.

Well, so far with Slicehost, I’m now up to 3 Slices.  The 512mb one for the websites, a 256mb for development which will turn into another webserver once the 512 is “full”, and now a new 256mb one as a mail server.  I found a good tutorial on how to setup Postfix, Courier, MySQL & Squirrelmail with Spam Assassin and ClamAV in a multi-domain virtualized setup. (LINK)

This took a few hours to get working as intended, there were a few minor details missing, but I was able to track them down and get it working.  Most of it was just copying and pasting commands and changing a few details to my configuration.

The only part I really changed during this installation is NOT to use Spam Assassin and ClamAV, at least for the near term.  Both of these programs take up large amounts of RAM even with the base setup.  With the 256mb Slice, it was going into the swap memory as soon as I booted up and accessed anything.  Without these programs and with a bit of Apache tweaking, I got the memory down to around 116mb while idle.

Also, instead of SquirrelMail, which is “ugly” compared to modern web interfaces, I chose Roundcube, which has really gotten better over the last year.  It is still simplistic, but is very nice and functional.  With my setup, any email user just logs into the Roundcube interface with their email address and password.

Since all the usernames/passwords for this mail server are stored in the database, I was able to quickly write up a little PHP web interface to add/remove/modify email accounts and domains.  Once it is more stable to functional, I will release it here on this blog for others who have a similar setup.

As a test, I’ve been forwarding all my email on my primary account to a test account on this new server and every email has been received properly.  No problems whatsoever.

I plan on moving a few of my friends and family onto this to see how it works for them, if good, then all my customers will be migrated.

Linux, Software, Technical , , , , , , , , , , , , ,

Moving away from Windows & IIS (ASP) to Linux @ SliceHost

July 24th, 2008

I have, for years, been developing web apps and so on using ASP (Classic) on IIS.  It’s a “fine” platform, but I have, over time, become weary of the Microsoft bloat that accompanies running a Windows Server… Especially in a colo/dedicated/VPS environment.

Over the last few months, since my major GoDaddy Windows Dedicated servers got hit by a worm or something, I’ve seriously started learning PHP with MySQL.  I used MySQL quite a bit with ASP and am quite familiar with it, but PHP experience was rather limited.  In the last few weeks, I’ve written a few things and ported a customer’s website over from an ASP CMS I wrote to PHP (still need to finish the CMS in PHP).  The site runs so much faster and I am now able to host it on my new Slice VPS that I setup earlier this month.  In 15 minutes or so, I can have an entire new Slice setup with Apache or Lighttpd and PHP/MySQL and, with a little tweaking and securing, have a server up and serving sites.   Can’t do that with Windows that quickly.

Slice is still running strong and I’m going to do my best to get ALL my ASP sites “ported” over to PHP over the next few months.  I’ve been using ASP/PHP cross reference sites like Design 215 and a few others and have been able to do things very quickly.  The database part was the only part I really needed to find good samples  for, but they aren’t even too hard once you use them a few times.

SliceHost has inspired me to really learn Linux and abandon the Microsoft OS, but there is still one caveat to Linux that I am very disappointed with.  There is not a single (that I’ve found), reasonably priced, multi-domain, domain level administratable email server with a nice webmail interface for users and administrative functions.

I know there are a ton of “pieces” that I can put together to get something like that, like Postfix, EXIM4, Dovecat, etc., but I just simply don’t have the time to wade through the massive pile of config files to get all those pieces working together in a nice secure and highly reliable fashion.

So, I am going to continue moving all my websites over to Linux/Apache/Lighttpd/PHP/MySQL and keep a small (30gb, 768mb RAM) Windows Virtual Dedicated server running with SmarterMail 5.x mail server on it. SmarterMail is probably one of the BEST email servers for a web hosting environment.  It is a snap to setup, backup and move to a new server if needed (Trust me, I know!). I already own an Enterprise license and am just waiting for one last very important domain to move off a temporary dedicated server before I move it to a new Windows VPS to serve the remainder of my customer’s email needs.  SliceHost isn’t a fully “managed” solution, but with the Slice Backup capability, you can have daily and weekly images made and restore to them quickly at anytime in case anything happens…

Mosso is good and is finally rectifying the Compute Cycle issue I mentioned previously,  I may keep them if I can break even with the few sites I still host on there, but their servers aren’t nearly as responsive as a VPS or Dedicated server probably due to the massively clustered setup they run.  I don’t really need individual site scalability… If a site has high requirements, I’ll just stick them on a new slice and charge the customer accordingly.  Most of my sites that would need to scale are Wordpress Blogs and could easily handle being Digg’ed etc, by installing WP-Supercache.

Ultimately I plan on hosting all websites and blogs on Ubuntu 8.04 @ SliceHost and email on a Windows VPS @ GoDaddy (for now) until I find a Windows VPS provider as excellent as SliceHost is (hint hint to SliceHost)…

That’s all for now…

If anyone knows of any turn-key type mail servers that are free/inexpensive (< $500) for Linux please leave a comment.

General, Software, Technical, Technology, Ubuntu , , , , , , , , , , , , , , , , , , , ,