LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   A question about imap over ssl... (https://www.linuxquestions.org/questions/linux-newbie-8/a-question-about-imap-over-ssl-869850/)

trist007 03-20-2011 05:33 PM

A question about imap over ssl...
 
I just setup dovecot to use imap. I'm using the same cert and key that I'm using on Postfix smtp over ssl. It's a self signed cert. After running this
Code:

openssl s_client -starttls imap -connect localhost:993
I get this
Code:

CONNECTED(00000003)
Nothing else is printed. And I'm not able to 'a login user pass.'
Shouldn't I be seeing something like this
Code:

CONNECTED(00000003)
depth=0 /C=DE/ST=BW/L=City/O=HomeServer
GmbH/OU=WebHosting/CN=XYZ.com/emailAddress=admin <at> XYZ.com
verify error:num=18:self signed certificate
verify return:1
depth=0 /C=DE/ST=BW/L=City/O=HomeServer
GmbH/OU=WebHosting/CN=XYZ.com/emailAddress=admin <at> XYZ.com
verify return:1
---
Certificate chain
0 s:/C=DE/ST=BW/L=City/O=HomeServer
GmbH/OU=WebHosting/CN=XYZ.com/emailAddress=admin <at> XYZ.com
    i:/C=DE/ST=BW/L=City/O=HomeServer
GmbH/OU=WebHosting/CN=XYZ.com/emailAddress=admin <at> XYZ.com
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIC6TCCAlKgAwIBAgIJAN4Jfaj9QgEhMA0GCSqGSIb3DQEBBQUAMIGqMQswCQYD
VQQGEwJERTEbMBkGA1UECBMSQmFkZW4tV3VlcnR0ZW1iZXJnMREwDwYDVQQHEwhO
ZXVicm9ubjEWMBQGA1UEChMNTmV0T2NlYW4gR21iSDETMBEGA1UECxMKV2ViSG9z
dGluZzEYMBYGA1UEAxMPc2VydmVyLm5ldG9jZWFuMSQwIgYJKoZIhvcNAQkBFhVh
ZG1pbkBzZXJ2ZXIubmV0b2NlYW4wHhcNMTAwNzExMTgwMzQ4WhcNMzAwNzA2MTgw
MzQ4WjCBqjELMAkGA1UEBhMCREUxGzAZBgNVBAgTEkJhZGVuLVd1ZXJ0dGVtYmVy

It's almost as if it can't find the cert and key. I made sure that the cert has 444 and key has 400 permissions and owned by root.

/etc/dovecot.conf
Code:

protocols = imap imaps
ssl_disable = no
disable_plaintext_auth = yes
syslog_facility = mail
ssl_cert_file = /etc/ssl/certs/dovecot.pem
ssl_key_file = /etc/ssl/private/dovecot.pem
verbose_ssl = yes
mail_location = mbox:~/mbox:INBOX=/var/mail/%u
auth_verbose = yes
auth_debug = yes

Any ideas on what would cause this?

AlucardZero 03-20-2011 05:44 PM

*shrug* that's how it works for me. I think it's working.

Edit: you edited your post after my post and added a ton of info. That was rude.

trist007 03-21-2011 10:35 AM

bump

trist007 03-21-2011 05:57 PM

Haha it was working all along. I was using this command to test it.
Code:

openssl s_client -starttls imap -connect localhost:993
But I should've been using this since imaps does not have the starttls command.
Code:

openssl s_client -connect localhost:993
I feel stupid hehe.


All times are GMT -5. The time now is 03:49 AM.