Skip to main content

Hello, 

I want to set up mail supervision via the imap server plugin

 

 

But when i try to use in login mode, i have this error : 

CRITICAL: Unable to connect to IMAP: Unable to connect to XXX.XXX.XXX.XXX: SSL connect attempt failed

 

And that whatever the options i used the error remains the same.

Here is the command line:
 

centreon_protocol_imap.pl --plugin=apps::protocols::imap::plugin --mode=login --hostname=ip-server-mail --username='user' --password='password'  --warning=''  --critical='' 

(Same with this parameters : --ssl, --insecure, --ssl-opt="SSL_verify_mode => SSL_VERIFY_NONE", ou --ssl='tlsv1')

Imap port is open : 

PORT    STATE SERVICE
143/tcp open  imap

Nmap done: 1 IP address (1 host up) scanned in 0.03 seconds

 

Have you ever encountered this problem? Or test ideas to find out what is blocking?

Thanks in advance for your help and answers.

Hi @Kevin_M,

Can you tell me:

  • What OS platform are you using? (EL7, EL8, EL9, Debian)
  • What do you get when you query a public IMAP server? 

As an example I get this with Google’s IMAP service:

/usr/lib/centreon/plugins/centreon_protocol_imap.pl --plugin apps::protocols::imap::plugin --mode login --hostname imap.gmail.com --ssl

I found a list of public servers you can try there, if you get the same result with one of them, please tell me: https://www.arclab.com/en/kb/email/list-of-smtp-and-imap-servers-mailserver-list.html


Hi @omercier , 

Thank you for your help 

  • OS platform is RHEL8
  • i have this with thecommand: 

CRITICAL: Unable to connect to IMAP: Unable to connect to imap.gmail.com: SSL wants a read first

It’s the same if i try with a mail/password gmail or another imap server or without SSL option
I think it’s block by security for external network. 


There must be something in RHEL8 different from AlmaLinux8, or maybe a network or proxy in your environment that causes the issue, because I’m getting this result:

sroot@central-al8-22-10 ~]# /usr/lib/centreon/plugins/centreon_protocol_imap.pl --plugin apps::protocols::imap::plugin --mode login --hostname imap.gmail.com --ssl
OK: Response time 0.109 | 'connection.time.seconds'=0.109;;;;

My version of the plugin is:

sroot@central-al8-22-10 ~]# rpm -q centreon-plugin-Applications-Protocol-Imap
centreon-plugin-Applications-Protocol-Imap-20230706-100638.el8.noarch

 


Hello,
My problem is solved.
There were 2 parallels issues:

  • The plugin worked badly and only go to 993 instead of 143, after upgrading the plugin it worked well
  • I didn't have the correct imap connection information, I had to use the FQDN and not the IP.

Thanks to those who helped me.


Hi @Kevin_M, I'm glad to see that your problem has been solved! In order to further improve the platform, don't hesitate to tell us what you think and how we could improve it. Thanks in advance 


Reply