How to configure dovecot imap to listen on multiple ports?

Rick Thomas rbthomas at pobox.com
Sun Aug 24 21:26:04 UTC 2014


On Aug 24, 2014, at 1:59 PM, Reindl Harald <h.reindl at thelounge.net> wrote:

> 
> 
> Am 24.08.2014 um 22:45 schrieb Rick Thomas:
>> I need my dovecot imap server to listen on ports 143, 993, and also 30143 and 30993.
> 
> no idea what that should gain

I have a dovecot imap server inside a NAT/firewall.

The NAT translates calls to port 30143 and 30993 (not the real ports, but just for example) coming from outside  to 143 and 993 inside.  So machines outside the NAT that want to talk to the server use ports 30xxx and machines inside the NAT use the regular ports.

Which works fine for machines that are at fixed locations.  But a laptop that’s sometimes inside, sometimes outside doesn’t have a fixed port to connect to.  For those cases, I’d like the dovecot server to recognize the outside ports on the inside.


> 
>> What syntax do I use in (I presume) the /etc/dovecot/conf.d/10-master.conf file to do this?
> 
> but try to duplicate these settings
> 
> (no i don't use "conf.d" directorys anywhere for good reasons)
> 
> # configure imap-proxy
> service imap-login {
>  inet_listener imap {
>    address                    = *
>    port                       = 143
>  }
>  inet_listener imaps {
>    address                    = *
>    port                       = 993
>  }
>  vsz_limit                    = 64M
>  service_count                = 1
>  process_min_avail            = 0
>  process_limit                = 100
> }
> 

Can I have multiple “service” clauses for the same service?  Each with a different port?
Or multiple “inet_listener imap”/“inet_listener imaps” clauses?
Or should I have something like this?
    port = 143,30143




More information about the dovecot mailing list