Scalix IMAP + stunnel

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

donnie
Posts: 17
Joined: Fri Jun 09, 2006 4:53 am
Location: Sweden

Scalix IMAP + stunnel

Postby donnie » Mon Jul 31, 2006 4:19 am

Hello all!
I've been trying for 2 days now to get imap via stunnel working.
Googled around alot, but there are alot of version diffs.

* /etc/stunnel/stunnel.conf:
[imaps]
accept = 993
connect = 143

How to get stunnel listning after?
Should one use xinetd or what?
The port gets open but aint forwarded to imap.
Could this be a certificate problem or something? any logs to check?

* upon connection with telnet to port 993
Connected to karen.
Escape character is '^]'.
Connection closed by foreign host.

dkelly
Scalix
Scalix
Posts: 593
Joined: Thu Mar 18, 2004 2:03 pm

Postby dkelly » Mon Jul 31, 2006 1:00 pm

Is the stunnel process running and, if so, what is logged in the stunnel log file when you open a connection using a client ?

Using telnet isn't the best way as you don't get the SSL conversation.

Use the command

Code: Select all

openssl s_client -connect host:993
and you then get a telnet-like session to talk to the IMAP server.

Cheers

Dave

donnie
Posts: 17
Joined: Fri Jun 09, 2006 4:53 am
Location: Sweden

Postby donnie » Mon Jul 31, 2006 3:41 pm

if I do a pidof stunnel, no result comes back so I guess not.
I tryed to start with strace, the first time I could read that stunnel.pem was not in /etc/stunnel/
so I moved it there (I guess my stunnel.pem is alright, read about it on the net but not sure).

Second time with strace I saw one line with

Code: Select all

bind(4, {sa_family=AF_INET, sin_port=htons(993), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EADDRINUSE (Address already in use)"

lsof |grep 993 tells me nothing.

and allot of lines with missing files:

Code: Select all

open("/lib/tls/i686/libCSUNSAPI.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/tls/libCSUNSAPI.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/i686/libCSUNSAPI.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libCSUNSAPI.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
for example

openssl s_client -connect thehost:993 gives:

Code: Select all

CONNECTED(00000003)
write:errno=104


Is there no _good_ guides for how to do this, scalix site only tells one to enter the accept and connect parameters in stunnel.conf.
I _really_ have to get this working within the next two days or so, my boss is getting unpatient and this is the only thing left of our migration.
Please I need some kind of guide of what is needed, certificate wice and so.

regards Donnie.

dkelly
Scalix
Scalix
Posts: 593
Joined: Thu Mar 18, 2004 2:03 pm

Postby dkelly » Mon Jul 31, 2006 7:56 pm

Code: Select all

errno=104
is Connection reset by peer which means the server end of the connection closed down.

This could be for a number of things. The stunnel log should show the reason as that is responsible for maintaing the connection with the client.

Can you post your /etc/stunnel/stunnel.conf file and also the associated log file ?

Cheers

Dave

donnie
Posts: 17
Joined: Fri Jun 09, 2006 4:53 am
Location: Sweden

Postby donnie » Tue Aug 01, 2006 3:30 am

Ah! I've got it to work!
Finaly!

I will write down some of my experiences here in a while.


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 3 guests

cron