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 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.

Posted in RHEL7

Leave a Reply

Be the First to Comment!

Notify of
wpDiscuz

RHCSA7: Task of the day

Allowed time: 10 minutes.
Set up a default configuration HTTP server with SELinux in Enforcing mode and active firewalld configuration.

RHCE7: Task of the day

Allowed time: 10 minutes.
Configure a system to forward all email to a central mail server at 192.168.1.1 (change the IP address accordingly).

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 ...