Basic Postfix Configuration and Operation

Because Postfix is the Ubuntu-recommended client (and the mostly widely used client), the following sections provide a brief explanation and examples for configuring and operating your email system. As mentioned earlier, however, Postfix is an extremely complex program with many configuration options. As such, this chapter only covers some of the basics. For more information on Postfix, as well as other MTAs, see the "Reference" section at the end of this chapter.

Postfix configuration is handled by files in the /etc/postfix directory with much of the configuration being handled by the file main.cf. The actual syntax of the configuration file, main.cf, is fairly easy to read (see the following example):

# See /usr/share/postfix/main.cf.dist for a commented, more complete version

# Debian specific: Specifying a file name will cause the first

# line of that file to be used as the name. The Debian default

# is /etc/mailname. #myorigin = /etc/mailname smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no

# appending .domain is the MUA's job. append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h

# TLS parameters smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for

# information on enabling SSL in the smtp client.

myhostname = optimus alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydestination = optimus, localhost.localdomain, , localhost relayhost =

mynetworks = 127.0.0.0/8 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all

Complicated email server setup is beyond the scope of this book, and we would point you in the direction of Postfix: The Definitive Guide by Dent. This is a great reference, and rather unusual because it only runs to just under 300 pages. However, if you want to know something about Postfix, this is the book to read.

However, the following five sections address some commonly used advanced options.

Was this article helpful?

0 0

Post a comment