Koozali.org: home of the SME Server

Changing the IMAP port

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Changing the IMAP port
« on: October 18, 2011, 01:17:08 PM »
Hi, I am trying to change the port on which the imap server listens to. I have tried:

Code: [Select]
config setprop imap TCPPort 144
signal-event email-update

but it does not seem to work.
am I missing something?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Changing the IMAP port
« Reply #1 on: October 18, 2011, 06:47:01 PM »
Hi, I am trying to change the port on which the imap server listens to. I have tried:
I am curious why you want to do that. Care to explain?
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Re: Changing the IMAP port
« Reply #2 on: October 18, 2011, 07:32:07 PM »
because you cannot specify the port that crapberries connect to. I am using zarafa as mail server and I want to change the zarafa imap port to 143.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Changing the IMAP port
« Reply #3 on: October 18, 2011, 08:41:08 PM »
because you cannot specify the port that crapberries connect to. I am using zarafa as mail server and I want to change the zarafa imap port to 143.
Did you already try the trick siggested here: http://supportforums.blackberry.com/t5/Device-software-for-BlackBerry/Change-IMAP-Port/td-p/395730 ?
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Re: Changing the IMAP port
« Reply #4 on: October 19, 2011, 10:18:16 AM »
Yes I have, that's the only way you can specify the username if it is different from the email address but you still can't change the port.

Does anyone know how to change the port the imap server listens to on sme server? what is the db variable TCPPort for on imap?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Changing the IMAP port
« Reply #5 on: October 19, 2011, 10:33:09 AM »
Does anyone know how to change the port the imap server listens to on sme server? what is the db variable TCPPort for on imap?
AFAICT it is only used to configure the firewall to open that port, from your testing it seems the e-mailserver does not use that value.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Re: Changing the IMAP port
« Reply #6 on: October 19, 2011, 12:37:06 PM »
I see, do you  know where to change it then?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Changing the IMAP port
« Reply #7 on: October 19, 2011, 12:52:39 PM »
I see, do you  know where to change it then?
Based on this, you might get away with a custom template like this in /etc/e-smith/templates-custom/etc/dovecot.conf/:
Code: [Select]
listen 144
listen_ssl 994

After that you should do the following:
Code: [Select]
signal-event console-save
signal-event reboot
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Re: Changing the IMAP port
« Reply #8 on: October 19, 2011, 01:31:36 PM »
Thank you, I tried it but it did not work. I also tried the following:


protocol imap {
     listen = *:144
     ssl_listen = *:994
     }


see: https://help.ubuntu.com/community/Dovecot

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Changing the IMAP port
« Reply #9 on: October 19, 2011, 02:13:48 PM »
Based on this, you might get away with a custom template like this in /etc/e-smith/templates-custom/etc/dovecot.conf/:

Dovecot in SME server does not use dovecot.conf. See /service/imap/run. It's only using the /usr/libexec/dovecot/imap component of dovecot, wrapped via tcpsvd, stunnel-tls and imapfront-auth. IOW, it doesn't use the TCP listening, TLS and authentication code from dovecot, only the imap backend code.

To change the port, you need PORT=xxx in /var/service/imap/config.

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Re: Changing the IMAP port
« Reply #10 on: October 20, 2011, 05:27:14 PM »
Thank you Charlie, it worked!  :grin: