If you already have a server with Debian on it and cannot or don't want to reinstall then feel free to skip this page. This may be the case if you are using a (virtual) root server from a hosting company or you do not have console access.
Dimensioning the server
So you can choose the actual server yourself? Great. This gives you the choice on the hardware, the disk partitioning scheme and choice of file systems. As a general guideline a decent mail server should have at least 2 GB of RAM and lots of disk space living on a hardware-based RAID controller. Users will collect a lot of mails with a lot of useless attachments. And don't expect them to clean up their inbox - especially when offering IMAP. Project 5 GB of mailbox space per user. Regarding the CPU load there is mainly spam and virus scanning that needs raw computing power. A common server will handle dozens of emails per second without spam checking. If you don't need spam checking or just get smaller amounts of email then even an old desktop PC will do well.
Basic installation and Partitioning
It's rumoured that even a chicken can install Debian if you just put enough grains on the enter key. And that depicts pretty much how easy it is to install Debian. Insert your boot medium and start the installation. Even if your native language is not english I still suggest you choose english as a system language. If later you have trouble with the server you will more likely find help when google'ing for english error messages.
Next I recommend that you take a little time though when it comes to partitioning your disk. When the installation asks how to partition choose "Manual". Throughout this tutorial you will store your users' emails in the /var/vmail partition and will hold the most files which also sum up to a lot of used space. The MySQL database will live in /var/lib/mysql. Log files will live in /var/log.
So my recommendation is:
- / (10 GB, ext4)
- /boot (500 MB - don't forget to mark it as "bootable", ext3)
- /var (5 GB, ext4)
- /var/vmail (the more the better, ext4)
- /tmp (1 GB, ext4, optional but recommended)
- swap (1 GB)
The file system can also be ext3, XFS or ReiserFS if you like. Choosing the right file system is a religious issue. XFS is almost always a safe choice for servers but in some conditions may become very slow. ext3 is okay if you don't want to reformat your /var/vmail partition but the file system check after a reboot can take hours. ReiserFS is also a decent choice but the future of the file system is not entirely clear.
If at all possible choose to use the logical volume manager (LVM) which gives you great flexibility about growing or (depending on the file system you chose) shrinking partitions or even making consistent backups using the snaphot feature. If you haven't dealt with LVM yet then don't fear it. In the Lenny tutorial I have given a lengthy introduction on LVM. Even if you have never used LVM you will quickly learn how it works and will never again want to install a server without it.
Installation wallpaper
If you are unsure how the installation procedure would look like (or you don't have a chicken handy) then feel free to follow this set of screenshots documenting the installation.
Recent comments