Bug 121951 - KMail silently fails to connect to secure IMAP listening on non-standard ports
Summary: KMail silently fails to connect to secure IMAP listening on non-standard ports
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail
Classification: Applications
Component: IMAP (show other bugs)
Version: 1.8.3
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-14 12:20 UTC by Sebastian Wolfgarten
Modified: 2015-04-12 10:08 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Wolfgarten 2006-02-14 12:20:35 UTC
Version:           1.8.3 (using KDE KDE 3.5.1KDE 3.4.3)
Installed from:    Gentoo PackagesGentoo Packages
Compiler:          gcc version 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8) Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/specs
Configured with: /var/tmp/portage/gcc-3.3.6/work/gcc-3.3.6/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3.6 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.6 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.6/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.6/info --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/include/g++-v3 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libgcj --enable-languages=c,c++,f77 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
OS:                Linux

Hi,

I am using KMail to access my mail and would like to switch to Secure 
IMAP (Port 993). Due to a problem in my network setup (behind a firewall) I need to 
tunnel all connections from localhost to my mail server. This works fine for SMTP and POP3 but  I am having problems with IMAPS on a non standard port. First of all I set up a tunnel with SSH which is working alright as my local openssl clients shows:

$ openssl s_client -host localhost -port 3993
CONNECTED(00000003)
depth=0 /C=DE/ST=MyTown/L=MyHomeCity/O=mydomain.tld mail 
server/OU=Automatically-generated IMAP SSL 
key/CN=myserver.mydomain.tld/emailAddress=sebastian@mydomain.tld
verify error:num=18:self signed certificate
verify return:1
depth=0 /C=DE/ST=MyTown/L=MyHomeCity/O=mydomain.tld mail 
server/OU=Automatically-generated IMAP SSL 
key/CN=myserver.mydomain.tld/emailAddress=sebastian@mydomain.tld
verify return:1
---
Certificate chain
 0 s:/C=DE/ST=MyTown/L=MyHomeCity/O=mydomain.tld mail 
server/OU=Automatically-generated IMAP SSL 
key/CN=myserver.mydomain.tld/emailAddress=sebastian@mydomain.tld
   i:/C=DE/ST=MyTown/L=MyHomeCity/O=mydomain.tld mail 
server/OU=Automatically-generated IMAP SSL 
key/CN=myserver.mydomain.tld/emailAddress=sebastian@mydomain.tld
---
Server certificate
-----BEGIN CERTIFICATE-----

[ ... ]

-----END CERTIFICATE-----
subject=/C=DE/ST=MyTown/L=MyHomeCity/O=mydomain.tld mail 
server/OU=Automatically-generated IMAP SSL 
key/CN=myserver.mydomain.tld/emailAddress=sebastian@mydomain.tld
issuer=/C=DE/ST=MyTown/L=MyHomeCity/O=mydomain.tld mail 
server/OU=Automatically-generated IMAP SSL 
key/CN=myserver.mydomain.tld/emailAddress=sebastian@mydomain.tld
---
No client certificate CA names sent
---
SSL handshake has read 1017 bytes and written 340 bytes
---
New, TLSv1/SSLv3, Cipher is AES256-SHA
Server public key is 1024 bit
SSL-Session:
    Protocol  : TLSv1
    Cipher    : AES256-SHA
    Session-ID: 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Session-ID-ctx:
    Master-Key: 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Key-Arg   : None
    Start Time: 1139867383
    Timeout   : 300 (sec)
    Verify return code: 18 (self signed certificate)
---
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE 
THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 
AUTH=CRAM-SHA1 AUTH=CRAM-SHA256 IDLE AUTH=PLAIN ACL ACL2=UNION] 
Courier-IMAP ready. Copyright 1998-2005 Double Precision, Inc.  See 
COPYING for distribution information.

So the tunnel actually works, fine. I then tried to use Mozilla 
Thunderbird to access my mails securely and it works just fine
(localhost, port 3993, With "Use secure connection/SSL" enabled.
Now here's my problem: I also tried to use KMail (my favourite
mail client!) to connect to my mailserver but apparently this does
not work when I use the non-standard port 3993! When I check the 
capabilities of the mail server, Kmail basically hangs and
stops connecting to the server. It really weird, the software 
basically still works fine (I can access all other non-IMAP
mail accounts but KMail actually never attempts to connect to the tunnel
Therefore I am unable to get my mails with Kmail if the IMAPS server is 
running on a non-standard port. I am using the KDE packages
provided by my distribution (Gentoo) which is actually KDE 3.4.3
with KMail 1.8.3. I know I should try to use a newer version of KDE
but as this bug did not show up in any error report I decided to
post it anyway.

Any ideas? Thanks.

Best regards,
Sebastian
Comment 1 Laurent Montel 2015-04-12 10:08:06 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.