Page 1 of 1

IMAPS LOGIN from script

Posted: Tue Jan 07, 2020 1:17 pm
by robertitox
Hi people, I have a ZCS with external LDAP authentication.

I need to make a script that execute a LOGIN to the IMAPS service from Zimbra. But when I try to LOGIN I fail:

openssl s_client -crlf -connect

a1 LOGIN p4$$w0rd


When I try the same command against a testing ZCS server with no external LDAP authentication, the LOGIN is successful.

So I think my problem is related to the LDAP authentication. In Zimbra admin console I've defined the external LDAP account for authentication:


Please can you tell me how to LOGIN from command line against my ZCS IMAPS service using external LDAP authentication?

Thnks in advance, regards !!!

Re: IMAPS LOGIN from script

Posted: Tue Jan 07, 2020 1:49 pm
by gabrieles
curl -v --ssl --url "imap://" --user ""
-v helps you with more verbosity
--ssl forces STARTTLS even if you are using imap

if you want to use imaps:
curl -v --insecure --url "imap://" --user ""
-- insecure if you use selfsigned certs

Re: IMAPS LOGIN from script

Posted: Tue Jan 07, 2020 2:20 pm
by robertitox
Thanks Gabrieles, but it fails again.

Maybe I have to use any extra option from command line indicating the LDAP external authentication or something like that, because if I use a local authentication everything is OK; but when I use an external LDAP authentication it fails.

I tell youi everything is OK when I login from Zimbra web interface using external LDAP authentication, my problem is from command line using curl, telnet or openssl commands it's the same.

Thanks again!