Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-04-2004, 08:39 AM
|
#1
|
Member
Registered: Dec 2003
Posts: 235
Rep:
|
SSL over POP on qmail
I have found plenty of sites on how to enable SSL over imap for qmail. Can anyone recomend sites for SSL over POP3?
Thanks
Justyn
|
|
|
11-04-2004, 09:54 AM
|
#2
|
Member
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736
Rep:
|
I don't know of any howtos for this, but I can tell you how to do it....
(1) Upgrade your stunnel package to v4.
(2) Create a config file for stunnel. (replace my.domain.com with yours... this also assumes you're running vpopmail... if not, just change that vpopmail line to whatever yours happens to be)
Code:
cd /var/qmail/control
cat > pop3s.conf <<EOF
cert = /var/qmail/control/servercert.pem
exec = /var/qmail/bin/qmail-popup
execargs = qmail-popup my.domain.com /home/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir
EOF
(3) create servercert.pem (or construct your own cert)
Code:
openssl req -new -x509 -nodes -out servercert.pem -days 366 -keyout servercert.pem
(4) Change your qmail-pop3d/run file
Code:
#!/bin/sh
exec /usr/local/bin/softlimit -m 7000000 \
/usr/local/bin/tcpserver -H -R -v -l 0 -c100 0 995 \
/usr/sbin/stunnel /var/qmail/control/pop3s.conf 2>&1
That's it! Restart qmail and test.
|
|
1 members found this post helpful.
|
11-04-2004, 10:00 AM
|
#3
|
Member
Registered: Dec 2003
Posts: 235
Original Poster
Rep:
|
what do I name the config file for stunnel as and where do I put it?
|
|
|
11-04-2004, 10:10 AM
|
#4
|
Member
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736
Rep:
|
If you follow my commands... the first line of code is cd /var/qmail/control. This is where your cert goes and where the stunnel conf file goes. The file is named pop3s.conf.
|
|
|
11-04-2004, 10:59 AM
|
#5
|
Member
Registered: Dec 2003
Posts: 235
Original Poster
Rep:
|
Nada. If I nmap my localhost I see pop3s running on port 995. However both Thunderbird and OE say they cannot connect. Is there a another step I'm missing? I'm a complete newbie when it comes to SSL so please bear with me.
|
|
|
11-04-2004, 11:13 AM
|
#6
|
Member
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736
Rep:
|
Well, you need to tell your email client to point to 995 instead of the usual port 110. While you're in there, you'll also need to tell it to use SSL.
You can test your pop3s connection at the prompt using...
openssl s_client -connect 127.0.0.1:995
It sounds like it's running on your machine but you're just having trouble connecting to it from the outside.
|
|
|
11-04-2004, 02:04 PM
|
#7
|
Member
Registered: Dec 2003
Posts: 235
Original Poster
Rep:
|
machine attempts to use 995. I made sure of that part :P
|
|
|
11-04-2004, 02:30 PM
|
#8
|
Member
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736
Rep:
|
One thing... You may want to be sure the permissions on the certificate is read only by the owner and no other permissions.... I think the owner and group should be root/root. I know that was a problem for me. Once I got the perms correct, it started working fine.
Hold on a minute... I just realized something... I have a seperate supervise for my secure stuff. I copied /var/qmail/supervise/qmail-pop3d and made /var/qmail/supervise/qmail-pop3ds for the secure version. The run file we created in that earlier post goes under there. This way, I still have normal pop3 running on port 110 so it doesn't interfere with the one running on 995.
I also have /var/log/qmail/qmail-pop3ds directory so it logs to there. That also means I have /var/qmail/supervise/qmail-pop3ds/log/run file that is identical in permission and content as the normal qmail-pop3d. That way, I have seperate logging for the secure version too.
Maybe that's what you need to do on yours.
Sorry for not being more clear about all that.
|
|
|
11-23-2004, 10:32 AM
|
#9
|
Member
Registered: Dec 2003
Posts: 235
Original Poster
Rep:
|
it sorta works now. It sees the cert. However its complaining about file premissions on the cert. And I have put root/root as owner/group
|
|
|
11-23-2004, 01:35 PM
|
#10
|
Member
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736
Rep:
|
You want the permissions to be read only for just the owner... in this case root.
if you're running vpopmail, the permissions are the same, but you probably want vpopmail/vchkpw as the user/group.
|
|
|
03-13-2013, 06:57 AM
|
#11
|
LQ Newbie
Registered: Apr 2010
Posts: 4
Rep:
|
Thanks for saving me
Dear Friend, Thank for saving my time. Wish you good luck. Give us such thing more and more.
Quote:
Originally Posted by Donboy
I don't know of any howtos for this, but I can tell you how to do it....
(1) Upgrade your stunnel package to v4.
(2) Create a config file for stunnel. (replace my.domain.com with yours... this also assumes you're running vpopmail... if not, just change that vpopmail line to whatever yours happens to be)
Code:
cd /var/qmail/control
cat > pop3s.conf <<EOF
cert = /var/qmail/control/servercert.pem
exec = /var/qmail/bin/qmail-popup
execargs = qmail-popup my.domain.com /home/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir
EOF
(3) create servercert.pem (or construct your own cert)
Code:
openssl req -new -x509 -nodes -out servercert.pem -days 366 -keyout servercert.pem
(4) Change your qmail-pop3d/run file
Code:
#!/bin/sh
exec /usr/local/bin/softlimit -m 7000000 \
/usr/local/bin/tcpserver -H -R -v -l 0 -c100 0 995 \
/usr/sbin/stunnel /var/qmail/control/pop3s.conf 2>&1
That's it! Restart qmail and test.
|
|
|
|
All times are GMT -5. The time now is 09:00 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|