relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
A useful command for configuring Postfix is postconf. It enables you to
display and change many configuration settings without editing and saving
configuration files. The command’s syntax is rather complex, but once
learned, it becomes a faster way to quickly adjust settings.
If you type the postconf command by itself, it outputs a list of all
configuration parameters. This can be quite long, so we recommend either
sorting using a pipe and grep or sending the output to a file. See Chapter 11,
“Command-Line Master Class, Part 1,” for more on how to do this. This
example shows the command piped into grep with a search for hostname:
Click here to view code image
matthew@seymour:~$ postconf | grep hostname
invalid_hostname_reject_code = 501
lmtp_lhlo_name = $myhostname
lmtp_tls_verify_cert_match = hostname
local_transport = local:$myhostname
milter_macro_daemon_name = $myhostname
myhostname = ubuntu
smtp_helo_name = $myhostname
smtp_tls_verify_cert_match = hostname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_proxy_ehlo = $myhostname
unknown_helo_hostname_tempfail_action = $reject_tempfail_action
unknown_hostname_reject_code = 450
To show the default parameter settings instead of the current settings, use this:
Click here to view code image
matthew@seymour:~$ postconf -d
Use this to discover which parameters have been changed from their defaults
and display the current settings:
Click here to view code image
matthew@seymour:~$ postconf -n
Setting a parameter requires root privileges. For example, to set the
myhostname parameter, use the following:
Click here to view code image
matthew@seymour:~$ sudo postconf -e
"myhostname=mail.matthewhelmke.com"