Free Hosting Online for WorkStations

< Previous | Contents | Next >

1.7.3. Log Files


Postfix sends all log messages to /var/log/mail.log. However error and warning messages can sometimes get lost in the normal log output so they are also logged to /var/log/mail.err and /var/log/mail.warn respectively.


To see messages entered into the logs in real time you can use the tail -f command:


tail -f /var/log/mail.err


The amount of detail that is recorded in the logs can be increased. Below are some configuration options for increasing the log level for some of the areas covered above.

• To increase TLS activity logging set the smtpd_tls_loglevel option to a value from 1 to 4.


sudo postconf -e 'smtpd_tls_loglevel = 4'

• If you are having trouble sending or receiving mail from a specific domain you can add the domain to the

debug_peer_list parameter.


sudo postconf -e 'debug_peer_list = problem.domain'

• You can increase the verbosity of any Postfix daemon process by editing the /etc/postfix/master.cf and adding a -v after the entry. For example edit the smtp entry:


smtp unix - - - - - smtp -v


It is important to note that after making one of the logging changes above the Postfix process will need to be reloaded in order to recognize the new configuration: sudo systemctl reload postfix.service


• To increase the amount of information logged when troubleshooting SASL issues you can set the following options in /etc/dovecot/conf.d/10-logging.conf


auth_debug=yes auth_debug_passwords=yes


Just like Postfix if you change a Dovecot configuration the process will need to be reloaded: sudo systemctl reload dovecot.service.


Some of the options above can drastically increase the amount of information sent to the log files. Remember to return the log level back to normal after you have corrected the problem. Then reload the appropriate daemon for the new configuration to take affect.


Top OS Cloud Computing at OnWorks: