Need help setting up remote controlled mail server from scratch

By MrGaribaldi
Aug 16, 2005
Topic Status:
Not open for further replies.
  1. I'm tired of having multiple pop mail accounts on different servers, which means I can only access it at home, and paying a premium for those on my web hotel, so I've decided to put up my own mail server. This will be sitting at a nice 100mb direct connection to the Internet at an ISP (for free :D).

    But first I have to build, install and get to know the server.

    Hardware will probably be a server motherboard with a restart function (in case of power loss), a not too expensive cpu, 1GB ram and 100+ GB hdd.
    (Any suggestions for server mobo/cpu/ram combos appreciated, as my knowledge is mostly non-server)

    Then I'm wondering what OS to put on this server, and which mail server programs to use.

    The OS has to be secure, have a little footprint, be easily remote controlled and be easy to install new programs. (And Windows is out of the question if not on the first demand, then at least on the second)
    My knowledge of *nix is rather limited, as I've only used it on the university and then only for simple tasks, so the biggest demand will be that it should be easy to use, which means gui support.

    I like the "apt get" function of debian, as it'll be easier to deploy new packages when I decide I want to expand the use of the server (possible web server++), but I've also heard good things about freebsd and fedora core.

    As for the mail server suite security is the top priority, with ease of use coming in at a close second.
    I'm thinking about going IMAP, instead of POP3 with a webmail interface and using the "leave mail on server" option.
    It will have to accept relaying mail, though only by approved users.
    It should store mail in such a way that one corrupted email doesn't corrupt all the others, ie. one file for each mail instead of one continuous file for all the mail. This should also make it easier for me to move all my current mail into the webmail. (Or if it has an import function that supports thunderbird, it'd be great!)
    I should also be able to create virtual folders and fast searches of both mail and folders. (Hmm, sounds like a mail database is a possible solution, instead of x^n files)
    The possibility of anti-virus integration, so that I'm not sending virus laden email, is of course interesting, especially if it's free. And spam blocking would be nice (possibly with an ORBS integration).


    I'm sure there are plenty of things I'm forgetting or don't even know about, so any comments about other features are appreciated.


    Sorry for making such a large post, but I thought it'd be better to have a complete "how to make a remote controlled mail server from scratch" thread, than to spread it over 3 threads in different sub-fora.
  2. Nodsu

    Nodsu Newcomer, in training Posts: 9,431

    Remote control (or anything done remotely) is something you get for granted with a Unix-like OS..

    For a secure OS out of the box and ideology wise I would recommend OpenBSD, NetBSD or Solaris (you can forget about the ease of use and install with these though)

    As for mail server software (actually the "mail server" is in several independent parts on Unixes) you have the three main choices of the "MTA" part: Sendmail, Postfix and Qmail. Sendmail is the most common, but complex and difficult to configure and debug. Postfix is well-known and supported and I would recommend that. Qmail is the weirdo alternative..

    The mail storage format you want is called maildir (separate files for every message (originated from Qmail)) as opposed to mbox (one big file). Mbox is the default in Sendmail and Postfix setups but you can set them to use maildir.

    The mail folders are a feature of the IMAP daemon and I am pretty sure all of them support it.

    Antivirus support is best on BSD and Linux systems - you can use several versions of commercial AVs (some are free for non-Windows use) and throw in open source scanners too.

    The system I would set up would be:
    OpenBSD/NetBSD (Open is more secure but Net has better compatibility)
    Postfix (Sendmail is just eevil)
    Spamassassin (The anti-spam program of choice unless you want to cough up a lot of money for a commercial package)
    Several virus scanners (F-Secure is free for "workstation use", ClamAV is open source, there may still be some other free scanners available)
    A simple IMAP daemon with SSL support. (Small is Beautiful and SSL means secure)
    A webmail thingie. (Doesn't really matter.. Depends on what eatures you want)
    Apache. (The web server of choice to host all kinds of web interfaces and stuff)

    The learning curve with BSD is rather steep though so you could be better off with a flexible Linux version with wide, intelligent and rabid fanbase able to support you (Debian, Gentoo, Slackware..).

    You should think of some kind of a backup solution too. Could you rig a tape drive or a DVD writer to that server?
  3. MrGaribaldi

    MrGaribaldi TechSpot Ambassador Topic Starter Posts: 2,802

    Thank you for feedback!

    Last thing first, yes, I can add a tape drive or DVD writer to it. I can do more or less whatever I want with it, but I will not have physical access to the box at all.
    Anything that needs to be done with the box, I'll have to email a friend and have him do it for me. And he isn't too keen on having to do backups and such... :-/

    I'll try to read up on the OS' you suggest, and take a closer look at the different IMAP daemons and webmail interfaces. (Tried looking at squirrel, but it's having some serious problems...)
    For the MTA's I was thinking of either postfix or qmail. And postfix seems friendlier than qmail...
  4. MrGaribaldi

    MrGaribaldi TechSpot Ambassador Topic Starter Posts: 2,802

    Well, after reading a lot about the differences between the diff *BSD's, I've decided to go for FreeBSD for the time being.
    Though I guess I'll give Debian, Slackware and Solaris a go too, though a bit later...
  5. MrGaribaldi

    MrGaribaldi TechSpot Ambassador Topic Starter Posts: 2,802

    Ok, finally got the parts together and started to install...

    Well, let's just say I'll never complain about a windows install again...
    The first time I tried to install, it claimed I didn't have enough space on my harddrive, yet when I tried again after a reboot (without doing anything different) it worked.

    Setting it, freebsd, up is easier than I feared, yet harder than I'd hoped.
    To get Xorg started, I didn't have to mess about with different config files, but I did have to find out that I had to run xorgconfig etc...
    Or that I could get an instant server by a simple command :)
    So things really have progressed since I tried to install RedHat 6 years ago, but I still have to search by guesses to find out how to do what I want.
    (Ie. why is it called iconfig instead of ipconfig or netconfig or such?)

    So if anyone can point out a good freebsd guide for newbies (aside from freebsd.org and freebsddiary.org) I'd appreciate it.
  6. RealBlackStuff

    RealBlackStuff Newcomer, in training Posts: 8,165

  7. MrGaribaldi

    MrGaribaldi TechSpot Ambassador Topic Starter Posts: 2,802

    Cheers!

    It's interesting to work with as it's a totally new way of thinking compared to windows, though it can be frustrating when you can't find a good guide for what you want.

    But it's also quite rewarding when I do figure out how to do things :)
    And those sites looks like they'll gelp me in that dept.!
Topic Status:
Not open for further replies.


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.