Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

Server Requirements for Postfix

The Postfix email software package enables you to to install and configure a full featured Internet email system with a minimum amount of expense. But first you need a server available for it to run on. This chapter from Postfix walks you through the server requirements.
This chapter is from the book

This chapter is from the book

Before you can get your feet wet with Postfix, you must have a server available for it to run on. The Postfix package was written specifically for the Unix platform. Postfix requires several features of the Unix operating system to operate properly. This prevents Postfix from running on a standard Microsoft Windows workstation (even Windows 2000). Fortunately, many Unix implementations are available that can support Postfix.

Novice mail administrators often are not familiar with the operating system that is used for the mail server. This chapter presents a brief description of the Unix operating system that Postfix requires. It also describes one popular free Unix implementation that is available for Postfix: Linux. If you are new to the Unix world and have not yet chosen an operating system to run Postfix on, you may want to read this chapter before deciding.


The Postfix package is an extremely robust software package that can run under any Unix operating system. I stress that the operating system used must be an implementation of Unix. Several features of the Postfix system utilize Unix features that are not present on other operating systems. Also, while this chapter discusses only Linux, you have many different Unix systems to choose from that can fully support Postfix.

The Unix Operating System

The core of the Unix operating system is the kernel. The kernel must control the hardware and software on the system, allocating hardware when necessary and executing software when required. The kernel is primarily responsible for system memory management, software program management, hardware management, and filesystem management. The following sections describe each of these functions in more detail.

Memory Management

One of the primary functions of the operating system kernel is memory management. Not only does the kernel manage the physical memory available on the server, it can also create and manage virtual memory, or memory that does not physically exist in RAM.

It does this by using space on the hard disk, called the swap space, and swapping memory locations back and forth from the hard disk to the actual physical memory. This allows the system to think there is more memory available than what physically exists as RAM. The memory locations are grouped into blocks called pages. Each page of memory is located either in the physical memory or the swap space. The kernel must maintain a table of the memory pages that indicates which pages are where.

The kernel automatically copies memory pages that have not been accessed for a period of time to the swap space area on the hard disk. When a program wants to access a memory page that has been "swapped out," the kernel must swap out a different memory page and swap in the required page from the swap space. To use virtual memory, you must explicitly create swap space on the hard disk or indicate a special file to be used for swap. This is often done during system installation. The fdisk command partitions the installed hard drive on the system. During the partition time, you can create special swap partitions on the disks. The format of the fdisk command is

fdisk [option] [device]

where device is the hard disk device that is being partitioned. Unix systems use different naming standards for hard disk devices. Table 3.1 shows the Linux hard disk naming standard.

Table 3.1 Linux Hard Disk Devices




IDE disk drives


SCSI disk drives


ESDI disk drives


XT disk drives

The first available drive of a particular type is labeled as drive "a," the second one drive "b," and so on. Within a particular drive, partitions are numbered starting at partition 1. Listing 3.1 shows a sample partition from a Linux system.

Listing 3.1 Sample fdisk Partition Listing

[root@shadrach]# /sbin/fdisk /dev/sda

 Command (m for help): p

 Disk /dev/sda: 64 heads, 32 sectors, 521 cylinders
 Units = cylinders of 2048 * 512 bytes

 Device Boot Start  End Blocks Id System
 /dev/sda1    1  460 471024 83 Linux native
 /dev/sda2   461  521 62464 5 Extended
 /dev/sda5   461  521 62448 82 Linux swap

 Command (m for help): q

The first line shows the fdisk command being run on the first SCSI disk on the Linux system: /dev/sda. fdisk is an interactive program that allows the system administrator to manipulate the partition table on the disk drive. You enter the p command to print the current partition table. The /dev/sda5 line shows the partition that is available on the hard drive for the Linux swap area.

After a swap area has been created on a hard drive, the kernel must know that it is available and activate it. The swapon program activates memory page swapping. The swapon command sets up the virtual memory information in the kernel. This information is lost when the server is rebooted. This requires that the swapon command be executed at every boot time. Most Unix distributions allow the swapon command to be run from a startup script when the system boots.

On Linux systems, the current status of the virtual memory can be determined by viewing the special /proc/meminfo file. Listing 3.2 shows a sample /proc/meminfo entry.

Listing 3.2 Sample /proc/meminfo File

[root@shadrach]# cat /proc/meminfo
  total: used: free: shared: buffers: cached:
 Mem: 31535104 29708288 1826816 31817728 3051520 15773696
 Swap: 63942656 2838528 61104128
 MemTotal:  30796 kB
 MemFree:  1784 kB
 MemShared: 31072 kB
 Buffers:  2980 kB
 Cached:  15404 kB
 SwapTotal: 62444 kB
 SwapFree:  59672 kB

The first line shows the Linux command used to view the /proc/meminfo file. The third line shows that this Linux server has 32MB of physical memory. It also shows that about 18MB is not currently being used. The next line shows that there is about 64MB of swap space memory available on this system. This corresponds with Listing 3.1, which showed a 64MB swap space partition on the /dev/sda hard drive.

By default, each process running on the Unix system has its own private memory area. One process cannot access memory being used by another process. No processes can access memory used by the kernel processes. To facilitate data sharing, you can create shared memory segments. Multiple processes can read and write to a common shared memory area. The kernel must maintain and administer the shared memory areas. You can use the ipcs command to view the current shared memory segments on the system. Listing 3.3 shows the output from a sample ipcs command.

Listing 3.3 Sample ipcs Command Output

[root@shadrach]# ipcs -m

 ------ Shared Memory Segments --------
 key  shmid  owner  perms  bytes  nattch status
 0x00000000 0   rich  600  52228  6   dest
 0x395ec51c 1   oracle 640  5787648 6

This shows the ipcs command using the -m option to display just the shared memory segments. Each shared memory segment has an owner who created the segment. Each segment also has standard Unix permissions that set the availability of the segment to other users. The key value allows other users to gain access to the shared memory segment.

Process Management

The Unix operating system handles programs as processes. The kernel controls how processes are managed in the system. The kernel creates the first process, called the init process, to start all other processes on the system. When the kernel starts, the init process is loaded into virtual memory. As each process is started, it is given an area in virtual memory to store data and code that the system will execute.

Some Unix implementations contain a table of terminal processes to start automatically on bootup. On Linux systems, when the init process starts, it reads the file /etc/inittab to determine what processes it must start on the system.

The Unix operating system uses an init system that utilizes run levels. A run level can direct the init process to run only certain types of processes. There are multiple run levels in the Linux operating system and each one can be configured to start different processes.

At run level 1, only the basic system processes are started, along with one console terminal process. This is called single user mode, which is most often used for filesystem maintenance. The standard init run level is 3. At this run level, most application software such as network support software is started. Another popular run level in Unix is run level 5, which is where the graphical X Window System software is started for GUI terminals. Notice how the Unix system can control the overall system functionality by controlling the init run level. By changing the run level from 3 to 5, the system can change from a console-based system to an advanced graphical X Window System.

To view the currently active process on the Unix system, you can use the ps command. The format of the ps command is

ps [options]

where options is a list of options that can modify the output of the ps command. Table 3.2 shows the options that are available.

Table 3.2 ps Command Options




Uses the long format to display


Uses user format (shows user name and start time)


Uses job format (shows process gid and sid)


Uses signal format


Uses vm format


Displays memory information


Uses "forest" format (displays processes as a tree)


Shows processes of other users


Shows processes without a controlling terminal


Shows child CPU and time and page faults


Command name for task_struct


Shows environment after command line and a +


Uses wide output format


Does not display the header


Shows running processes only


Shows numeric output for USER and WCHAN


Shows the processes that are controlled by terminal ttyxx


Orders the process listing using sort keys k1, k2, and so on


Shows only the specified pids

Lots of options are available to modify the ps command output. Listing 3.4 shows a sample output.

Listing 3.4 Sample ps Command Output

[rich@shadrach]$ ps ax
 1 ?  S  0:03 init
 2 ?  SW  0:00 [kflushd]
 3 ?  SW  0:00 [kupdate]
 4 ?  SW  0:00 [kpiod]
 5 ?  SW  0:00 [kswapd]
 243 ?  SW  0:00 [portmap]
 295 ?  S  0:00 syslogd
 305 ?  S  0:00 klogd
 320 ?  S  0:00 /usr/sbin/atd
 335 ?  S  0:00 crond
 350 ?  S  0:00 inetd
 365 ?  SW  0:00 [lpd]
 403 ttyS0 S  0:00 gpm -t ms
 418 ?  S  0:00 httpd
 423 ?  S  0:00 httpd
 424 ?  SW  0:00 [httpd]
 425 ?  SW  0:00 [httpd]
 426 ?  SW  0:00 [httpd]
 427 ?  SW  0:00 [httpd]
 428 ?  SW  0:00 [httpd]
 429 ?  SW  0:00 [httpd]
 430 ?  SW  0:00 [httpd]
 432 ?  S  0:02 /usr/local/jdk1.2.2/bin/i386/green_threads/java org.a
 436 ?  SW  0:00 [httpd]
 437 ?  SW  0:00 [httpd]
 438 ?  SW  0:00 [httpd]
 470 ?  S  0:02 xfs -port -1
 485 ?  SW  0:00 [smbd]
 495 ?  S  0:00 nmbd -D
 533 ?  SW  0:00 [postmaster]
 538 tty1  SW  0:00 [mingetty]
 539 tty2  SW  0:00 [mingetty]
 540 tty3  SW  0:00 [mingetty]
 541 tty4  SW  0:00 [mingetty]
 542 tty5  SW  0:00 [mingetty]
 543 tty6  SW  0:00 [mingetty]
 544 ?  SW  0:00 [prefdm]
 548 ?  S  2:23 /etc/X11/X -auth /usr/X11R6/lib/X11/xdm/authdir/A:0-u
 549 ?  SW  0:00 [prefdm]
 559 ?  S  0:02 [kwm]
 585 ?  S  0:06 kikbd
 594 ?  S  0:00 kwmsound
 595 ?  S  0:03 kpanel
 596 ?  S  0:02 kfm
 597 ?  S  0:00 krootwm
 598 ?  S  0:01 kbgndwm
 611 ?  S  0:00 kcmlaptop -daemon
 666 ?  S  0:00 /usr/libexec/postfix/master
 668 ?  S  0:00 qmgr -l -t fifo -u
 787 ?  S  0:00 pickup -l -t fifo
 790 ?  S  0:00 telnetd: [vt100]
 791 pts/0 S  0:00 login -- rich
 792 pts/0 S  0:00 -bash
 805 pts/0 R  0:00 ps ax

The first line shows the ps command as entered on the command line. Both the a and x options are used for the output to display all processes running on the system. The first column in the output shows the process ID (or PID) of the process. The third line shows the init process started by the kernel. The init process is assigned PID 1. All other processes that start after the init process are assigned PIDs in numerical order. No two processes can have the same PID.

The third column shows the current status of the process. Table 3.3 lists the possible process status codes.

Table 3.3 Process Status Codes




Uninterruptible sleep


Process has pages locked into memory


Low priority task




The process has asked for a page replacement (sleeping)


Traced or stopped


A defunct (zombie) process


Process has no resident pages


High priority process

The process name is shown in the last column. Processes that are in brackets ([ ]) have been swapped out of memory to the disk swap space due to inactivity. You can see that some of the processes have been swapped out, but most of the running processes have not.

Device Driver Management

Still another responsibility for the kernel is hardware management. Any device that the Unix system must communicate with needs driver code inserted inside the kernel code. The driver code allows the kernel to pass data back and forth to the device. Two methods are used for inserting device driver code in the Unix kernel.

Previously, the only way to insert a device driver code was to recompile the kernel. Each time a new device was added to the system, the kernel code needed to be recompiled. This process became more inefficient as Unix kernels supported more hardware. A better method was developed to insert driver code into the running kernel. The concept of kernel modules was developed to allow driver code to be inserted into a running kernel and also removed from the kernel when the device is no longer being used.

Hardware devices are identified on the Unix server as special device files. There are three different classifications of device files:

  • Character
  • Block
  • Network

Character device files can only handle data one character at a time. Most types of modems are character devices. Block device files can handle data in large blocks at a time, such as disk drives. Network devices use packets to send and receive data. This includes network cards and the special loopback device that allows the Unix system to communicate with itself using common network programming protocols.

Device files are created in the filesystem as nodes. Each node has a unique number pair that identifies it to the Unix kernel. The number pair includes a major and a minor device number. Similar devices are grouped into the same major device number. The minor device number identifies the device within the major device numbers. Listing 3.5 shows an example of device files on a Linux server.

Listing 3.5 Sample Device Listing from a Linux Server

[rich@shadrach /dev]$ ls -al sda* ttyS*
 brw-rw---- 1 root  disk  8, 0 May 5 1998 sda
 brw-rw---- 1 root  disk  8, 1 May 5 1998 sda1
 brw-rw---- 1 root  disk  8, 10 May 5 1998 sda10
 brw-rw---- 1 root  disk  8, 11 May 5 1998 sda11
 brw-rw---- 1 root  disk  8, 12 May 5 1998 sda12
 brw-rw---- 1 root  disk  8, 13 May 5 1998 sda13
 brw-rw---- 1 root  disk  8, 14 May 5 1998 sda14
 brw-rw---- 1 root  disk  8, 15 May 5 1998 sda15
 brw-rw---- 1 root  disk  8, 2 May 5 1998 sda2
 brw-rw---- 1 root  disk  8, 3 May 5 1998 sda3
 brw-rw---- 1 root  disk  8, 4 May 5 1998 sda4
 brw-rw---- 1 root  disk  8, 5 May 5 1998 sda5
 brw-rw---- 1 root  disk  8, 6 May 5 1998 sda6
 brw-rw---- 1 root  disk  8, 7 May 5 1998 sda7
 brw-rw---- 1 root  disk  8, 8 May 5 1998 sda8
 brw-rw---- 1 root  disk  8, 9 May 5 1998 sda9
 crw------- 1 root  tty  4, 64 Nov 29 16:09 ttyS0
 crw------- 1 root  tty  4, 65 May 5 1998 ttyS1
 crw------- 1 root  tty  4, 66 May 5 1998 ttyS2
 crw------- 1 root  tty  4, 67 May 5 1998 ttyS3

This shows the ls command being used to display all of the entries for the sda and ttyS devices. The sda device is the first SCSI hard drive, and the ttyS devices are the standard IBM PC COM ports. The listing shows all of the sda devices that were created on the sample Linux system. Not all are actually used, but they are created in case the administrator needs them. Similarly, the listing shows all of the ttyS devices created.

The fifth column is the major device node number. Notice that all of the sda devices have the same major device node, 8, and all of the ttyS devices use 4. The sixth column is the minor device node number. Each device within a major number has its own unique minor device node number.

The first column indicates the permissions for the device file. The first character of the permissions indicates the type of file. Notice that the SCSI hard drive files are all marked as block (b) files, whereas the COM port device files are marked as character (c) files.

To create a new device node, you can use the mknod command. The format of the mknod command is


where NAME is the filename and TYPE is the filetype (character or block). The OPTION parameter has only one usable option. The -m option allows you to set the permissions of the file as it is created. You must be careful to select a unique major and minor device node number pair.

Filesystem Management

Unlike some other operating systems, the Unix kernel can support different types of filesystems to read and write data to hard drives. Currently 16 different filesystem types are available on Linux systems. The kernel must be compiled with support for all types of filesystems that the system will use. Table 3.4 lists the standard filesystems that a Unix system can use to read and write data.

Table 3.4 Unix Filesystems




Amiga filesystem


Linux Extended filesystem


Second extended filesystem


OS/2 high performance filesystem


ISO 9660 filesystem (CD-ROMs)


MINIX filesystem


Microsoft FAT16


Netware filesystem


Network file system


Access to system information


Samba SMB filesystem


Older Unix filesystem


BSD filesystem


Unix-like filesystem that resides on top of MS-DOS


Windows 95 filesystem (fat32)


Similar to ext2, not used

Any hard drive that a Unix server accesses must be formatted using one of the filesystem types listed in Table 3.4. Formatting a Unix filesystem is similar to formatting an MS-DOS type disk. The operating system must build the necessary filesystem information onto the disk before the disk can be used to store information. The command that Linux uses to format filesystems is the mkfs command. The format of the mkfs command is

mkfs [ -V ] [ -t fstype ] [ fs-options ] filesys [ blocks ]

where fstype is the type of filesystem to use, and blocks is the number of blocks to use. The default filesystem type for Linux systems is ext2, and the default block count is all blocks available on the partition.

The Linux kernel interfaces with each filesystem using the Virtual File System (VFS). This provides a standard interface for the kernel to communicate with any type of filesystem. VFS caches information in memory as each filesystem is mounted and used.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020