The global Postfix configuration file is located at /etc/postfix/main.cf. This file contains the main parameters that control the behavior of the Postfix mail server. It is a plain text file that consists of parameter-value pairs, comments, and blank lines. The syntax of the file is as follows:
parameter = value
commentThe parameter names are case-insensitive, and the values can be enclosed in quotes if they contain spaces or special characters. The values can also reference other parameters by using the $parameter syntax. The file can be edited manually or by using the postconf command. The postconf command can also be used to display the current values of the parameters, or to set new values. For example:
postconf -d # display default values of all parameters postconf -n # display non-default values of all parameters postconf -e ‘parameter = value’ # set a new value for a parameter
The main.cf file is read by Postfix when it starts or reloads. To reload Postfix after making changes to the file, use the command:
postfix reload
References:
LPIC-2 Exam 202 Objectives, Objective 205.3: Managing a postfix server
Postfix Basic Configuration, Postfix Documentation
Postfix Configuration Parameters, Postfix Documentation
How do I change postfix configuration after installing it?, Server Fault
What are the Configuration Files for Postfix, The Geek Search