setec / check-email-loop

Nagios plugin to check email infrastructure via sending & retrieving emails
GNU General Public License v2.0
15 stars 11 forks source link

Pending Mails #7

Open achmet9948 opened 1 year ago

achmet9948 commented 1 year ago

Hello all, I have created a mailbox on web.de. On this mailbox is a working rule that automatically forwards the mails to my own mail server. I get every mail in the monitoring mailbox with the token in the subject into the inbox, but the script has still Pending mails

./check_email_loop -pophost=imap.myserver.de -passwd=password -popuser=icinga@myserver.de -popauth=PASS -smtphost=smtp.web.de -from icinga.mydomain@web.de -to=icinga@mydomain.de -lostcrit=5 --pendcrit=5 -useimap -usestarttls --imapfolder INBOX -smtpuser=icinga.mydomain@web.de -smtppasswd=password -usesmtpssl Someone an idea?

bentolor commented 1 year ago

@achmet9948 a little hard to diagnose w/o more info.

It's pretty normal that you have PENDING mails unless you have instant delivery:

 # This example will send each time this check is executed a new
 # mail to remaileradress@friend.com using the SMTP-Host mailer.
 # Then it looks for any back-forwarded mails in the POP3 host
 # mypop. In this Configuration CRITICAL state will be reached if
 # more than 2 Mails are pending (meaning that they did not came
 # back till now) or if a mails got lost (meaning a mail, that was
 # send later came back prior to another mail). 

Depending on the frequency you call the script vs. the turnaround-time for mail delivery a specific number of pending mails is to be expected.

i.e. you call the script all 10seconds, but mail delivery takes 2 minutes; hence you'll have 2*6 = 12 mails pending in steady state.

bentolor commented 1 year ago

btw.: Everything is quite forward. There is a statefile which keeps track of the outstanding message ids. You can simply compare that list to the list in your INBOX to better understand the situation. @achmet9948