Koozali.org: home of the SME Server

Secure IMAP and POP3

8stargen

Secure IMAP and POP3
« on: October 20, 2004, 10:17:14 AM »
I've installed the Secure email contrib from pagefault. However, when I enable public access for both these services it doesn't open up the port for external access! Do I have to manually forward the ports?

I am running SME 6.01

Cheers,
Tim

Offline NickR

  • *
  • 283
  • +0/-0
    • http://www.witzendcs.co.uk/
Secure IMAP and POP3
« Reply #1 on: October 20, 2004, 09:30:36 PM »
How have you determined that the ports aren't open?  Try running this command:

# iptables -L | grep pop3s

I get this on my working secure email server:

ACCEPT     tcp  --  anywhere             anywhere           tcp dpt:pop3s

If you do too, then you need to look at your router settings.
--
Nick......

8stargen

Secure IMAP and POP3
« Reply #2 on: October 24, 2004, 05:10:36 AM »
Ok, I checked the IPTables as you suggested, and the port turns out to be open. Checked the router. No problem there. So I logged in via SSH and tried
Code: [Select]
telnet localhost 143
Worked fine. So then I tried
Code: [Select]
telnet localhost 993
And it returned
Code: [Select]
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused

Which is the same message I get when trying to log in via imaps from my workstation. Suprise suprise!

This suggests to me that the correct process isn't running or something. I'm using SME 6.01 and have installed the latest RPM's from pagefault. Why is it doing this? Could it be conflicting with another package I have installed? Are there any knows conflicts?

Cheers,  :-D

8stargen

Secure IMAP and POP3
« Reply #3 on: October 24, 2004, 05:18:57 AM »
Seems that ssl-imap wasn't running. Isn't the process supposed to be enabled when public / private access is switched on via the web panel?

Offline NickR

  • *
  • 283
  • +0/-0
    • http://www.witzendcs.co.uk/
Secure IMAP and POP3
« Reply #4 on: October 24, 2004, 09:44:27 AM »
You have actually turned the service on in the "Secure e-mail settings" web-panel, haven't you?
--
Nick......

8stargen

Secure IMAP and POP3
« Reply #5 on: October 24, 2004, 12:38:37 PM »
Yes! I have set it to public access.
Logging in to the shell and running
Code: [Select]
/etc/init.d/ssl-imapd start
gets everything working perfectly, why isn't the web panel doing this for me though??

Offline NickR

  • *
  • 283
  • +0/-0
    • http://www.witzendcs.co.uk/
Secure IMAP and POP3
« Reply #6 on: October 24, 2004, 01:26:19 PM »
Dunno - what does running this give you?

# /sbin/e-smith/config show ssl-imap
--
Nick......

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Secure IMAP and POP3
« Reply #7 on: October 26, 2004, 05:18:49 AM »
I too began playing with this tonight.  I have installed this on a fresh 6.01-01 server.  Here is what I am experiencing.  Upon initial install and configuration, the SSL portions seem to be started.  (I will reload and test this again)  Afterwards, if you change to disable and save, it doesn't stop the services.  465, 993 and 995 are still listening.  If you turn them on for either private or public, 110 and 143 are still listening.  My take was that if I enabled these services, then 143 and 110 should be stopped and 993 and 995 should listen.  If I turn them off, 993 and 995 should stop and 110 and 143 should listen.  The same for ssmtp either 25 and 465 should listen or just 465 depending on the choices.

Have I mis-understood how this should be working?

Thanks,

JB
......

Offline NickR

  • *
  • 283
  • +0/-0
    • http://www.witzendcs.co.uk/
Secure IMAP and POP3
« Reply #8 on: October 26, 2004, 09:20:07 AM »
You are mis-understanding their purpose. They are there to augment the existing services, not to replace them.  You would typically use the secure services when away from your server & connecting over the internet.  It doesn't make much sense to force all the users to use secure services on the LAN just because 1 user needs secure external access, does it?

If you turned off SMTP on port 25, how would any mail get delivered to your server from the outside world?
--
Nick......

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Secure IMAP and POP3
« Reply #9 on: October 26, 2004, 02:06:45 PM »
Turning off 25, that was just me being stupid last night.  Maybe too much :pint: during the game.

So, if I am understanding what you are telling me, the only thing that really tells me if this is working, is if I configure my client to use the secure ports and it works.  I say that because the unsecured ports are still open and I can still connect to them as well.  So this may just be a mindset thing on my end and a mis-understanding of how this is/was supposed to work.

But, there is still the issue with setting the services to disabled and the services not being shutdown.

I'll do more testing.

Thanks for your response NickR,

JB
......

Offline NickR

  • *
  • 283
  • +0/-0
    • http://www.witzendcs.co.uk/
Secure IMAP and POP3
« Reply #10 on: October 26, 2004, 05:42:08 PM »
Quote from: "mrjhb3"
So, if I am understanding what you are telling me, the only thing that really tells me if this is working, is if I configure my client to use the secure ports and it works.  I say that because the unsecured ports are still open and I can still connect to them as well.  So this may just be a mindset thing on my end and a mis-understanding of how this is/was supposed to work.
JB


I suspect that you aren't testing the external POP3 & IMAP ports correctly.  By default they are not open to the world, only the LAN.  If you grep iptables for pop3 or imap you'll see that they should be denylog'd & only their secure versions are ACCEPT.
--
Nick......

Offline mrjhb3

  • *
  • 1,188
  • +0/-0
    • John Bennett Services
Secure IMAP and POP3
« Reply #11 on: October 27, 2004, 04:38:59 AM »
But, I believe I am testing it correctly and seeing what I am seeing.

From my system, here are the settings:
[root@test601 /]# /sbin/e-smith/config show ssl-imap
ssl-imap=service
    access=public
    status=enabled
[root@test601 /]# /sbin/e-smith/config show ssl-popd
ssl-popd=service
    access=public
    status=enabled
[root@test601 /]#    
ssl-smtpfront-qmail=service
    access=public
    authentication=enabled
    status=enabled

[root@test601 etc]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination        

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination        

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination        

[root@test601 etc]# more e-smith-release
SME Server 6.0.1-01

Therein lies the problem.  You have something in your iptables and I don't.  Is your install on a 6.0.1-01 release?

I will now check why the iptables info isn't getting updated.

JB
......

Offline NickR

  • *
  • 283
  • +0/-0
    • http://www.witzendcs.co.uk/
Secure IMAP and POP3
« Reply #12 on: October 27, 2004, 10:08:40 AM »
Quote from: "mrjhb3"

Therein lies the problem.  You have something in your iptables and I don't.  Is your install on a 6.0.1-01 release?
JB


Your iptables is completely hosed unless you are running SME as server only. You are running server gateway, right?

Yes, mine is 6.01-01.
--
Nick......