ZDNet UK


Skip to Main Content

ZDNet.co.uk - Winner of Best Business Website 2007
  1. Home
  2. News
  3. Blogs
  4. Reviews
  5. Prices
  6. Resources
  7. Community
  8. My ZDNet

 

ZDNet UK RSS Feeds


IT Jobs

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 friendly Print with HP

Did you find this article useful?
87 out of 205 people found this useful


Full Talkback thread

0 comments


Company/Topic Alerts

Create a new alert from the list below:
















Related Jobs

Contract Trial Clinical Data Manager - Sussex South East UK

Identifying errors and inconsistencies and resolve them or initiate their resolution Experience Required: The successful Clinical Data Manager will ...

Trainee Recruitment Consultant

Benefits: - 35-40,000 (OTE) & 23 days holiday (increases with length of service) - REC accredited training - Promotion based on merit - International ...

Data Integrity Support Administrator S28990

Provide reports to identify and analyse the cause of errors, with recommendations for preventative action, i.e.branch visits, referral to Audit ...

Vista Upgrade Blog

The game's up for Vista

I got an interesting invite last night to the media launch of a dedicated gaming centre housed in an HMV store in central London. Resplendent with around 80 Quad core PCs and Dual... More

1 comment

Windows Driver Updates

Because of my recent adventures with Windows Vista on my Lifebook, I've had to learn about and deal with the differences between Vista and XP in third-party device driver distribution... More

2 comments

Windows XP SP3 Installed

I have downloaded and installed Service Pack 3 for Windows XP Professional on my Fujitsu Lifebook S6510. Everything went smoothly, and it seems to work just fine. I don't see anything... More

Post a comment

Discussions

Macbrewer Macbrewer

Not really a security problem

Friday 16 May 2008, 4:17 PM

1 comment
harpless harpless

interesting..

Friday 16 May 2008, 4:06 PM

3 comments
harpless harpless

The game's up for Vista

Friday 16 May 2008, 3:48 PM

1 comment

Featured Talkback

"We don't recommend specific technologies — we promote the use of technology per se." What sort of nonsense is this?? Every Becta endorsed IT supplier to schools is a Microsoft shop. Every single one.

By: 1000193068

Read full story:
Becta takes Microsoft to the OFT