Postfix tips.

Share this link

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

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/ 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/ file or to use the very powerful postconf command. Instead of wasting time, searching for the Postfix parameter in the file, if you know its name, you can directly assign a value to it or get its value:

# postconf -e 'relayhost=[]'
# postconf relayhost
relayhost = []

This is not only very efficient, but the configuration is also definitively written in the file!
You can restart the Postfix processes or even reboot the server, it’s still there.

Also, by using the relayhost = [] 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 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.

Posted in RHEL7

RHCSA7: Task of the day

Allowed time: 5 minutes.
Configure a cron task to write the uptime at 2PM every day.

RHCE7: Task of the day

Allowed time: 10 minutes.
Change the SSH process configuration to only listen on the 443 port.

Follow me on Twitter

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...