Mail logs in CentOS

We use maillogs when a mail problem just happened. In this case you can usually tail the log and see all the actions recorded in a file and investigate the errors. All logs are very important, but mail log is the top of them.

Let’s see what is maillog and there is it located on a server.

Paths to Mail logs


These files are containing the log information from the mail server that is running on the system. For example, sendmail logs information about all the sent items to this file.

Dealing with Rsyslog

Rsyslog is an open-source fast system for log processing. The service offers high-performance and great security features. While it started as a regular syslogd, rsyslog being able to accept inputs from a wide variety of sources, transform them, and output to the results to diverse destinations. Rsyslog can deliver over 1M messages per second to local destinations when limited processing is applied.

Install is very simple:

# yum install rsyslog

Yum service will install rsyslog maillog and auto create the necessary structure of files.
Then you are able to tail -t the file and see your mail activity effectively in rsyslog.

How to restart rsyslog?

# systemctl restart rsyslog.service

Looking for a custom solution?

Our technicians can provide you with the best custom made solutions on the market, no matter whether you're a small business or large enterprise.

Get in touch