When dealing with SMTP for the RHCE or LFCE exams, there are some tips that can be very useful to know about Postfix.
First, you’ve got a very interesting website at http://www.postfix.org/postfix-manuals.html.
Then, during the exam, you can get some configuration examples in the /usr/share/doc/postfix-2.10.1/README_FILES directory for RHEL 7 (-/postfix-2.6.6/README_FILES for RHEL 6) in the BASIC_CONFIGURATION_README and STANDARD_CONFIGURATION_README files. This documentation comes with the postfix package.
In addition, the /etc/postfix/main.cf file, the main configuration file, is fully documented. This will help you decide what parameter to change.
But there are more to know!
You’ve got the choice to edit the /etc/postfix/main.cf file or to use the very powerful postconf command. Instead of wasting time, searching for the Postfix parameter in the main.cf file, if you know its name, you can directly assign a value to it or get its value:
# postconf -e 'relayhost=[192.168.1.1]'
# postconf relayhost
relayhost = [192.168.1.1]
This is not only very efficient, but the configuration is also definitively written in the main.cf file!
You can restart the Postfix processes or even reboot the server, it’s still there.
Also, by using the relayhost = [192.168.1.1] syntax during your test, you can avoid the use of a master DNS server and its associated MX record (MaileXchange), which can be very handy.
Finally, at any time, you can check the syntax of the main.cf file with the postfix check command.
You can also get the list of the parameters with non-default assigned values with the postconf -n command.
In conclusion, Postfix is really a powerful and well designed tool.