PDA

View Full Version : My Linode Adventure (And Mail questions)


Jerman
2008-04-26, 14:43
So ever since Brad mentioned Linode on the serve move thread, I have been toying with trying it out for myself. I have had experience setting up web servers, compiling and installing PHP, etc. I have been having issue after issue with my present host (Dreamhost) so I figured why not?

Setting up my first system was incredibly painless. Linode offers one-click installs. In fact they already offer Ubuntu 8.04. Having familiarity with Ubuntu, I decided to go with this distro.

I am using iptables to secure the server, and have successfully installed Apache2, Php5, ftp server, etc. Pretty much all the essentials I will need for web hosting.

I also decided to use Open DNS instead of Linode's built in DNS service, as they claim it is still in beta.

So I had a fully functional (and from what I can tell) secure web server. It was time to look into hosting email. I knew it would be the most complicated piece of the puzzle, but wasn't expecting it to be quite this difficult.

I chose to use this tutorial: http://workaround.org/articles/ispmail-etch/ to help walk me through the process. It lets me set up users via mysql so I don't have to create a different user for each address. It took me about two hours to run through the whole process, and at the end, I can log into the server, but I cannot seem to actually receive mail. I know my MX records are correct, as I had it working on another test a couple of days ago.

I am still in the testing stages on this server, so I figure the easiest thing to do will be to start over from scratch. (As I had expected to have to do many times). But before I run through this guide again, do any of you have experience in setting up mail servers on Unix?

ghoti
2008-04-26, 14:52
You could instead try to use Google Applications for Domains (http://www.google.com/a/) to host your email. You only need to set the MX records, and of course set up an account with Google and activate email there. It's very painless and you get IMAP access, the excellent gmail web interface, tons of storage, and a more reliable service than you could set up yourself (since you're supposed to have at least one backup mail server, which you can't have with only one VPS - gmail gives you seven mail servers).

Jerman
2008-04-26, 16:41
With my Linode server, I think I am going for an all-or-nothing solution. From the things I have read, they are so rock solid that I am not too concerned about not having a failover. (At least not yet)

That being said, I AM a bit confused on how one would even go about setting up a backup mail server. How would it remain synced up with the main server, etc?

Would there be any way to use the Google solution as a backup and my VPS as the primary? Thanks!

Brad
2008-04-27, 03:56
I am still in the testing stages on this server, so I figure the easiest thing to do will be to start over from scratch. (As I had expected to have to do many times). But before I run through this guide again, do any of you have experience in setting up mail servers on Unix?
For me it's mostly a trial-and-error thing. It took me several hours of toiling to get SMTP and IMAP working nicely with SQL-based virtual mailboxes on AppleNova. Short of pointing you at other similar tutorials on the web, there's not much else I think I could suggest. :\

Jerman
2008-04-27, 12:29
Hehe, I am just glad I am not the only one a bit stumped by this. :) Did you happen to use the tutorial I linked to, or something else?

I think I figured out what happened though with my initial try... I had tried a different approach, and I had not nuked all of the config files. So instead of pointing to the correct database name, it was pointing to another. I decided just to start from scratch. I'll be done shortly, so hopefully it'll all work!

Brad
2008-04-27, 12:48
I didn't find and use the one you linked, but I did cherry-pick from a whole host of others. :)

I can't recall exactly which one(s) I used the most, but here are the links I saved during the process.

http://www.linux-noob.com/forums/lofiversion/index.php/t2490.html
http://www.lunarforums.com/lunarpages_webmin/simple_mail_server_setup_on_centos_4-t34596.0.html
http://rimuhosting.com/support/settingupemail.jsp?mta=postfix&t=catchall
http://postfix.wiki.xs4all.nl/index.php?title=Virtual_Users_and_Domains_with_Cou rier-IMAP_and_MySQL
http://insanegenius.net/postfix.html
http://small.dropbear.id.au/myscripts/postfixmysql.html
http://www.akadia.com/services/postfix_spamassassin.html

Jerman
2008-04-27, 16:47
Thanks so much for the links, really appreciate it!

So did you end up using Dovecot? I have pretty much everything working, except it looks like Dovecot is unable to actually look up users, so I am trying to figure out that piece of the puzzle at the moment...

Jerman
2008-04-27, 17:27
Oh, and out of curiosity... What Unix distro did you choose Brad?

Jerman
2008-04-27, 18:53
Update: Finally got mail working! I had a few errors in my config files. I had to allow connections to postfix from any address (*) and add the following to my dovecot.conf file:

disable_plaintext_auth = no

So now to figure out this whole signing the ssl certificate thing. :)

Brad
2008-04-27, 21:16
So did you end up using Dovecot? I have pretty much everything working, except it looks like Dovecot is unable to actually look up users, so I am trying to figure out that piece of the puzzle at the moment...
Yup. I'm using Dovecot and Postfix, both accessing user credentials in MySQL.

Oh, and out of curiosity... What Unix distro did you choose Brad?
CentOS 5, mostly because I've been working with RHEL machines at my day job for the past few years.

torifile
2008-04-28, 16:24
CentOS.
Completely OT, but whenever I hear about CentOS, I think of This (http://www.centos.org/modules/news/article.php?storyid=127) story. :lol: Cracks me up every time.

Jerman
2008-04-28, 16:25
Ooh, that's right! Get this website off my homepage!!!!!

Jerman
2008-04-29, 02:32
So out of curiosity, I searched for "Jerry A Taylor" and found this page:

http://www.tuttle-ok.gov/index.asp?Type=B_BASIC&SEC=%7BCC5DEFB6-1B2A-4783-A5F8-A92275C95081%7D

It says, "Jerry Taylor resigned as city manager on April 15, 2008. We wish Jerry all the best in his future endeavors.

Don Cluck will be interim city manager."

So amazed he lasted this long! Lol!

turtle
2008-04-29, 08:21
So if I were to get something like a Linode server set up I could host my own email out of it? I wouldn't have to deal with the shared host not being able to support my IMAP connections, etc.?

Does the virtual servers start bare with only an IP address for me to install whatever OS and plugins I want? I figured it'd be more like shared hosting in that it comes with a certain set of software pre-installed.

Can I get a little more of an explanation? I'm moving away from hosting a bunch of my stuff locally and looking to do more off-site.

Brad
2008-04-29, 08:25
So if I were to get something like a Linode server set up I could host my own email out of it? I wouldn't have to deal with the shared host not being able to support my IMAP connections, etc.?

Does the virtual servers start bare with only an IP address for me to install whatever OS and plugins I want? I figured it'd be more like shared hosting in that it comes with a certain set of software pre-installed.

Can I get a little more of an explanation? I'm moving away from hosting a bunch of my stuff locally and looking to do more off-site.
Yes, yes (mostly), and yes. :)


Linode's VPS service basically provides you with a blank slate. You choose your drive/partition sizes for your needs (I have four partitions currently, FWIW) and on-the-fly using a web-based wizard install one of a set of Linux distros. You can wipe and reinstall or swap boot partitions as frequently as you'd like.

Here's the current spread of distros available to me:

Current Distributions Min Space
Arch Linux 2007.08 436 MiB
Centos 5.0 594 MiB
Debian 4.0 168 MiB
Fedora Core 8 740 MiB
Gentoo 2007.0 1800 MiB
OpenSUSE 10.3 605 MiB
Slackware 12.0 315 MiB
Ubuntu 8.04 LTS 350 MiB

Other Distributions Min Space
CentOS 4.0 (RHEL) 800 MiB
Fedora Core 6 875 MiB
Mandrake 9.1 (Small) 775 MiB
Slackware 10 (small) 230 MiB
Ubuntu 6.06 250 MiB
Ubuntu 7.04 252 MiB
Ubuntu 7.10 237 MiB

Note that it's up to you to manage all aspects of the software itself. You want IMAP? You have to install and configure the necessary software and keep it running. If you're comfortable with that, then Linode is a great solution.

turtle
2008-04-29, 08:52
Thanks Brad. I don't know if a Linode is for me yet then. I don't know enough about setting up that kind of environment yet. I liked the fact that I can run SME Server on it if I want though, they just won't support it at all. However SME has mail built in. :) Maybe I'll get the $20 plan and play just to see what I can do. I've got a few domains that I can play with before anyone would notice. :)

If I needed help, would you all help me in the GB or PN? I give cookies. :D

Jerman
2008-05-02, 23:03
Just an update from my end. I am now running a site live on my server. I really need to finish setting up iptables, but I sure had my fill getting email working properly. :) But since it is now wide open, I had better plug the holes tonight.

I have been so impressed with the speed of this server as opposed to Dreamhost. Sometimes sites would take 3 seconds or more simply to respond. It is pretty much instantaneous all the time with my Linode.

Loving it so far. :)