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 Dell

Did you find this article useful?
89 out of 207 people found this useful


Full Talkback thread

0 comments

Company/Topic Alerts

Create a new alert from the list below:
















Related Jobs

PHP / MYSQL / CSS / HTML / Javascript / Design Developer 25K Bolton

Essential skills include: PHP / MYSQL CSS, HTML, Javascript AJAX, XML, Linux, Apache (desirable) E-Commerce, Content Management (desirable) You will ...

Account Director

Experience with leading management or IT consultancies latterly in a client relationship role Banking or life and pensions sector focus Excellent ...

Linux / Cisco Network Specialist UNIX, Linux, Cisco -Oxfordshire, South

Cisco Routers, Cisco IOS, Linux (RHEL4), Firewalls such as PIX & Firewall 1, TCP/IP, DNS, POP, SMTP, SNMP, proxies, email servers, PHP, MySQL, ...

Featured Talkback

Why do so many (virtually all) software packages think that they are so important that they have to be started automatically every time the computer boots? What is the largest number of "speed access", "update check", "camera download" and whatever other background programs you have ever seen running? Of those, how many did you really need?

By: J.A. Watson

Read full story:
Annoying software: a rogues' gallery

Discussions

harpless harpless

SAP goes big business

Friday 25 July 2008, 6:17 PM

1 comment
pjc158 pjc158

Will Drizzle rain on Sun's MySql

Friday 25 July 2008, 5:30 PM

1 comment
pjc158 pjc158

Show me the money!

Friday 25 July 2008, 5:18 PM

5 comments

Vista Upgrade Blog

Microsoft's pre-modern message puts a...

Over at ZDNet.com, Ed Bott reports a first sighting of Microsoft's eagerly awaited $300 million ad campaign. Already the cause of much speculation, the consensus is that this will be... More

7 comments

A $40 CONSUMER-class router has create...

Believe it or not I don't work in IT, haven't for 7 years. Yes I work with Microsoft's Windows XP Embedded and as a result I have to know a lot about the OS, the kernal, Win API calls... More

Post a comment

Sick Puppy Redo

I generally follow a dispassionate investigative process when trying to discern what happened when a project goes bad. Although its a low priority item, it gets done simply because... More

Post a comment