How to enable debug mode of postfix

Solution Unverified - Updated -

Environment

  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 5

Issue

How to enable debug mode of postfix

Resolution

  • You can do it as following approach
  1. to debug connection from specific host, you can configure it on main.cf file with debug_peer_level and debug_peer_list:
    For example
     debug_peer_level = 10

     debug_peer_list = 127.0.0.1
     debug_peer_list = example.domain

  1. if you need some procedure in each components of postfix (smtpd, cleanup,smtp and so on...), you can add -v on /etc/postfix/master.cf file.

For example:

smtp      inet  n       -       n       -       -       smtpd -v
(snip)
cleanup   unix  n       -       n       -       0       cleanup -v
(snip)
smtp      unix  -       -       n       -       -       smtp -v

** add -v at the end of each lines as option

Then restart postfix service , In above example, smtpd , cleanup , and smtp process will be started in verbose mode.
By this configuration, each component print many informations in /var/log/maillog.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments