Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

This active check sends out special E-Mails to a defined mail address using the SMTP protocol and then tries to receive these emails back by querying the inbox of an IMAP or POP3 mailbox. With this check, you can verify that your whole mail delivery progress is working.

Status
colourGreen
titleLAST TESTED ON CHECKMK 2.2.0P1

Table of Contents

Step-by-step guide

...

  1. Setup ServicesHTTP, TCP, Email, ... → Check Email Delivery → Add Rule

    • Name: The service description will be Mail Loop plus this name
    • Subject: Here, you can specify the subject text instead of the default text 'Check_MK-Mail-Loop'.
    • SMTP Server: You can specify a hostname or IP address different from the IP address of the host this check will be assigned to.
    • Use TLS over SMTP: Encrypt SMTP communication using TLS
    • Use TLS for IMAP authentication: IMAP authentification uses TLS
    • SMTP TCP Port to connect to: The TCP Port the SMTP server is listening on. Defaulting to 25.
    • SMTP Authentication:  Your credentials for the SMTP Server



    • Mail Receiving
      • IMAP/POP3: Chose whether you want to use IMAP or POP3
      • IMAP Server: You can specify a hostname or IP address different from the IP address of the host this check will be assigned to.
      • SSL Encryption: Encrypt IMAP communication using TLS
      • Authentication: Your credentials for the IMAP Server
    • From: email address
    • Destination: email address

    • Connect Timeout: Timeout in seconds for network connects (defaults to 10)
    • Loop duration: Loop duration of the most recent mail in seconds or the average of all received emails within a single check to raise a WARNING/CRITICAL state
    • Delete processed messages: Delete all messages identified as being related to this check plugin. This is disabled by default, which might make your mailbox grow when you do not clean it up manually.


...

Code Block
languagebash
themeRDark
title~/lib/nagios/plugins
OMD[mysite]:~/lib/nagios/plugins$ ./check_mail_loop--pwstore=4@16@provider1,10@17@provider2 '--smtp-server=smtp.provider1.com' '--smtp-tls' '--smtp-username=user@provider1.com' '--smtp-password=*************' '--fetch-protocol=IMAP' '--fetch-server=imap.provider2.com' '--fetch-ssl' '--fetch-port=993' '--fetch-username=mail@provider2.com' '--fetch-password=*************' '--mail-from=user@provider1.com' '--mail-to=mail@provider2.com' '--delete-messages' '--status-suffix=localhost-Email Delivery' '--warning=120' '--critical=300' '--subject=Check_MK-Mail-Loop for Strato'


For a detailed log, you can use --debug at the end of the command:

Code Block
languagebash
themeRDark
title~/lib/nagios/plugins
OMD[mysite]:~/lib/nagios/plugins$ ./check_mail_loop--pwstore=4@16@provider1,10@17@provider2 '--smtp-server=smtp.provider1.com' '--smtp-tls' '--smtp-username=user@provider1.com' '--smtp-password=*************' '--fetch-protocol=IMAP' '--fetch-server=imap.provider2.com' '--fetch-ssl' '--fetch-port=993' '--fetch-username=mail@provider2.com' '--fetch-password=*************' '--mail-from=user@provider1.com' '--mail-to=mail@provider2.com' '--delete-messages' '--status-suffix=localhost-Email Delivery' '--warning=120' '--critical=300' '--subject=Check_MK-Mail-Loop for Strato' --debug


For more information, you can use --help option:

Code Block
languagebash
themeRDark
~/lib/nagios/plugins/check_mail_loop -h

...