Advertisement
Promo

Office applications Toolkit

Keep it simple: Linux-based mail server

John Locke

Published: 08 Apr 2003 10:10 BST

  • Email
  • Trackback
  • Clip Link
  • Print friendly
  • Post Comment

For all the apparent simplicity of e-mail, setting up a mail server is one of the most difficult administrative tasks to do. You have to figure out how to send and receive legitimate mail without allowing spammers to use your system to spew junk to the world. You have to define where on your system to store user mail in a way that expands with the growth of your user base. You also need to figure out how users read the mail that ends up in your system. All of this just to relay a simple e-mail message.

In this article, I'll explain how to get a basic mail server running using Postfix as the mail transfer agent (MTA). By the end of the article, your basic mail server will be up, delivering outbound e-mail and accepting incoming mail for local users.

Read more about setting up an e-mail server
In my previous article, I discussed one set of software that makes up an inexpensive e-mail setup.

Before you start
The instructions in this article assume you already have a server with some flavour of Linux, with Apache, MySQL, and PHP already installed and running. The computer should be on a network, with a valid host and domain name. These instructions also assume you are familiar with user account administration, basic software compilation in a Unix environment, and editing configuration files. If not, I'd suggest you learn these things before attempting to install a mail server. I have built these systems on Red Hat 7.1 and Mandrake 9.0. This system should work on BSD, Solaris, OS X, or other distributions of Linux, but these steps may not work without modification. If you're having trouble, each of the software packages I use has active mailing lists with individuals willing to help.

You don't have to have the Web server/database on the same computer as the mail server, but to use MySQL for account information, you need to specify the location of libmysqlclient.so and mysql.h. If you installed MySQL from source, these will be on your computer. Mine are in /usr/local/mysql/lib/mysql and /usr/local/mysql/include/mysql, respectively. If you can't find them on your system, install the appropriate package for your distribution or install MySQL from source. You also need to have the development files for the Berkeley DB system. In Mandrake, install the libdb3.3-devel package. Or download and install the source code from Sleepycat Software.

Postfix uses SMTP to transfer mail to and from other mail servers. There are many different ways to store user account information, each with benefits for different situations. Later in this series, I'll create "virtual" users that don't have Unix accounts and store all of the user information in a MySQL database. In this article, I'll start by just getting Postfix to deliver mail locally, to valid Unix users.

Working with Postfix
Your first order of business is to download the source for the latest version from the Postfix home page. I put the tarball in /usr/src, and I keep all of the source files for server software in this location, where I can easily find what version is installed later. There have been quite a few improvements to Postfix since the fall of 2002. These instructions are for Postfix versions later than 2.0.

Next

Previous

1 2


  • Email
  • Trackback
  • Clip Link
  • Print friendlyPrint with EPSON

Did you find this article useful?
92 out of 216 people found this useful


Full Talkback thread

0 comments

Company/Topic Alerts

Create a new alert from the list below:
















Video icon

Video

Win a BlackBerry with Vlingo voice recognition

Win a BlackBerry with Vlingo voice recognition

What is ZDNet UK's usual tagline?

Competition closes - 14 Jan 2010

Discussions

Shibley R Shibley R

Eigg

Sunday 27 December 2009, 1:04 PM

1 comment
Tezzer Tezzer

Nice to see but...

Saturday 26 December 2009, 10:28 AM

5 comments
NoThomas NoThomas

Sure I can

Saturday 26 December 2009, 2:01 AM

11 comments

Vista Upgrade Blog

How to Upgrade From Windows Vista to W...

Did you get the news? Microsoft has unzipped its kitty and kept its latest, supposedly the best, offering on display. This is the brand new version of Microsoft operating system, named... More

Post a comment

Tinsel on the TARDIS

There were shepherds on the hill, and the Doctor popped his head out of the TARDIS and said "you might want to see this" and they were astounded. WHY do we pay for a TV license?... More

Post a comment

Can I have fries with that? (Consumer...

Licence policies of Tech company's have been for a long time both complicated and 'Dick Turpin-esque', people just click 'I agree' without reading the Agreement. I do the same, but... More

1 comment


Skip Sub Navigation Links to CNET Brand Links

Help

Become part of the ZDNet community.

Newsletters