Hello,
Can you explain me how this plugin works. How to open an SSL connection and IMAP session.
Main functions :
1 - Open a SSL connection with the mail server
2 - Open an IMAPS connection to the mail server with uer,password
3 - Check connection establishment time and, if necessary, raise an appropriate alarm
4 - For each folder given as input parameter, count mails (unseen or present) and raise an appropriate alarm is necessary.
Each mesure and count is treated as a nagios performance value.
Input parameters
-u : this user must be present in the file /usr/local/nagios/libexec/mdp.txt. The associated password is stored encrypted in the same file
-l : comma separated list of folders to analyze
-w : in number of unread mails
-c : in number of unread mails
-D [P|U] P: count mails present in the folder
U: count unseen mails in the folder
A specific option allows the creation of the user,password file
./check_unread_mails.pl -u -g
Thanks and Regards
Read number of mails unread
Re: Read number of mails unread
This is a 3rd party plugin. It looks like you need to edit the plugin directly in a lot of places throughout to set the mailserver/port/protocol values you want, it doesn't look like it supports you passing them in as arguments. It's a mix of arguments and editing the plugin directly, you would need multiple copies of the modified plugin to check both.
I would recommend you also take a look at some of the existing plugins on the XI system:
What specifically are you trying to do?
I would recommend you also take a look at some of the existing plugins on the XI system:
Code: Select all
/usr/local/nagios/libexec/check_smtp -h
/usr/local/nagios/libexec/check_smtp_send -h
/usr/local/nagios/libexec/check_imap -h
/usr/local/nagios/libexec/check_imap_receive -h
/usr/local/nagios/libexec/check_email_delivery -h-
FCC_Nagios_Support
- Posts: 161
- Joined: Tue Mar 10, 2020 11:07 am
Re: Read number of mails unread
Many Thanks
I am trying to read a remote mailbox
KR
I am trying to read a remote mailbox
KR
Re: Read number of mails unread
I tried the one you found and could not get it to work, this one I was able to get working:
https://exchange.nagios.org/directory/P ... ox/details
https://exchange.nagios.org/directory/P ... ox/details
Code: Select all
perl check_imap_mailbox --host=imap.gmail.com [email protected] --pass='XXXX' --folder=INBOX