LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
LinkBack Search this Thread
Old 06-21-2005, 07:25 PM   #1
mcd
Member
 
Registered: Aug 2003
Location: Boulder, CO
Distribution: Slackware, RHEL, CentOS
Posts: 825

Rep: Reputation: 33
imaps certificate


i've had an imap server running for a while using inetd, and i decided recently to try implementing it with ssl using stunnel. so i added the following line to my /etc/inetd.conf:

Code:
imaps stream tcp nowait root /usr/sbin/stunnel stunnel /usr/stunnel/imaps.conf
and /usr/stunnel/imaps.conf has only the following:

Code:
cert = /etc/stunnel/stunnel.pem

exec = /usr/sbin/imapd
execargs = imapd
i opened tcp port 993 on my firewall and set up port forwarding from my router to my server. i can now connect successfully using thunderbird with ssl. my problem though, is that thunderbird refuses to recognize the certificate permanently. when i click on that mailbox, a dialog box pops up asking if i would like to

a) accept this certificate permanently
b) accept it for this session only
c) do not accept this certificate and do not connect to this website

if i select choice a, the dialog box simply refreshes. so i select choice b and continue, but i get an error message saying:

Quote:
Security Error: Domain Name Mismatch

You have attempted to establish a connection with "ironmonkey.homelinux.net." However, the certificate presented belongs to "ironmonkey." It is possible, although unlikely, that someone may be attempting to intercept your communication with this website.
i click OK and continue without trouble. i can check my mail, send mail, and everything is ok. but i have to go through all that every time i start thunderbird, which is not cool.

i figure i need to issue myself a new certificate for "ironmonkey.homelinux.net" instead of just "ironmonkey." so i struggled through the openssl man page, and the openssl req man page, since i believe that's the command to issue a new certificate. i tried the following:

Code:
openssl req -nodes -x509 -newkey rsa:1024 -keyout key.pem -out req.pem
and then edited /etc/stunnel/imaps.conf to use req.pem as the certificate. unfortunately, thunderbird then gives me an error saying:

Code:
Unable to connect to your IMAP server.  You may have exceeded the maximum number of connections to this server.
which is clearly crap. anyone know what i did wrong?

Last edited by mcd; 06-21-2005 at 07:53 PM.
 
Old 06-21-2005, 07:30 PM   #2
mcd
Member
 
Registered: Aug 2003
Location: Boulder, CO
Distribution: Slackware, RHEL, CentOS
Posts: 825

Original Poster
Rep: Reputation: 33
doh! silly me. so i copied the contents of key.pem and req.pem into a new file called imaps.pem. then i pointed my config file to that as my certificate, and everything works perfectly now. sorry to waste everyone's time! although since i already have this topic open, does anyone have any further suggestions or comments?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dovecot IMAPs SSL certificate nyk Linux - Software 1 11-14-2005 07:58 AM
BlackBerry and IMAPS ddaas Linux - Networking 0 11-10-2005 08:59 AM
Imaps ajaye1971 Linux - Newbie 1 09-09-2005 02:37 PM
SPOP3 and IMAPS hypernetics Linux - Security 1 10-17-2003 08:25 PM
Configuring imaps on RH 7.1 bbunge Linux - General 2 09-28-2001 09:51 PM


All times are GMT -5. The time now is 04:12 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration