References > Template Reference > Postfix

Postfix

This template assesses the performance of the Postfix MTA agent installed on the target server. Perl scripts are used for monitoring the performance of queries.

Prerequisites

SSH and Perl installed on the target server. SNMP installed on the target server and permission to monitor master, qmgr and pickup processes.

Credentials

Root credentials on the target server.

Monitored Components

For details on monitors, see SAM Component Monitor Types.

You need to set thresholds for counters according to your environment. It is recommended to monitor counters for some period of time to understand potential value ranges and then set the thresholds accordingly.

Postfix statistic from maillog file

This monitor returns the Postfix mail statistic from the maillog file. The returned values are as follows:

  • Delivered - This component returns the number of successfully delivered messages. Search for these messages in the maillog file using the following search pattern: “status=sent (delivered to“.
  • Forwarded - This component returns the number of successfully forwarded messages. Search for these messages in the maillog file using the following search pattern: “status=sent (forwarded to“.
  • Rejected - This component returns the number of rejected messages. Search for these messages in the  maillog file using the following search pattern: “reject:“.
  • Received - This component returns the number of received messages. Search for these messages in the maillog file using the following search pattern: “postfix/pickup“. (Look in the strings for: “sender=“ or “uid=“).
  • Discarded - This component returns the number of discarded messages. Search for these messages in the maillog file using the following search pattern: “discard:“.
  • Deferred - This component returns the number of deferred messages. If a message still has recipients for which delivery failed for some transient reason, and the message has been delivered to all the recipients possible, Postfix places the message into the deferred queue. Search for these messages in the maillog file using the following search pattern: “status=deferred“.
  • Bounced - This component returns the number of bounced messages usually caused by undeliverable mail. Search for these messages in the maillog file using the following search pattern: “status=bounced“.
  • Held - This component returns the number of messages held. The administrator can define smtpd access policies and cleanup header and body checks that cause messages to be automatically diverted from normal processing and placed indefinitely in the hold queue. Messages placed in the hold queue stay there until the administrator intervenes. Search for these messages in the maillog file using the following search pattern: “hold:“.

By default, the script retrieves this information from the /var/log/maillog file. If this file has another location on the target server, you should correct the path in the script argument box. By default, this monitor has the Count statistic as difference box checked. It will show the total number of messages in the Message field while the Statistic field will show only new messages since the last polling period.

Messages from maillog file

This monitor returns the Postfix service messages statistic from the maillog file. The returned values are as follows:

  • Fatal - This component returns the number of fatal service messages. Search for these messages in the maillog file using the following search pattern: “ fatal:“.
  • Warning - This component returns the number of warning service messages. Search for these messages in the maillog file using the following search pattern: “ warning:“.
  • Panic - This component returns the number of panic service messages. Search for these messages in the maillog file using the following search pattern: “ panic:“.
  • Error - This component returns the number of error service messages. Search for these messages in the maillog file using the following search pattern: “ error:“.

By default, the script retrieves this information from the /var/log/maillog file. If this file has another location on the target server, you should correct the path in the script argument box. By default, this monitor has the Count statistic as difference box checked. It will show the total number of messages in the Message field while the Statistic field will show only new messages since the last polling period.

Mail queue

This monitor shows the length of the mail queue.

IMAP4 User Experience Monitor

This component monitor tests an email round trip from your SMTP mail server to your IMAP4 server and measures the time it takes to complete the trip.

By default, this component is disabled. To use this component, you should enable it and properly configure it.

POP3 User Experience Monitor

This component monitor tests an email round trip from your SMTP mail server to your POP3 mail server and measures the time it takes to complete the trip.

By default, this component is disabled. To use this component, you should enable it and properly configure it.

SMTP Monitor

This component monitor tests the ability of an SMTP server to accept incoming connections and respond with the correct code.

Process: master

This monitor returns the CPU and memory usage of the Postfix master process using SNMP. The Master daemon is the supervisor of Postfix, and it oversees all other Postfix daemons. The master waits for incoming jobs to be delegated to subordinate daemons. If there is a lot of work to do, the Master can invoke multiple instances of a daemon.

Process: qmgr

This monitor returns the CPU and memory usage of the Postfix qmgr process using SNMP. The qmgr daemon manages the Postfix queues; it is the heart of the Postfix mail system. It distributes delivery tasks to the local, smtp, lmtp, and pipe daemons. After delegating a job, it submits queue file path-name information, the message sender address, the target host (if the destination is remote), and one or more message-recipient addresses to the daemon it delegated the delivery task to.

Process: pickup

This monitor returns the CPU and memory usage of the Postfix pickup process using SNMP. The pickup daemon picks up messages put into the maildrop queue by the local sendmail user client program. After performing a few sanity checks, pickup passes messages to the cleanup daemon.