Listening on additional ports
=============================

(Dovecot v1.1 and later support natively listening on multiple IPs and ports.)

Here's a little trick to get servers to listen on additional ports. This can be
used for SMTP as well or any other protocol. However be aware that Dovecot
makes the insecure assumption that connections from local ip addresses are
always "secured", that means, in particular, the requirement for TLS for plain
text authentication won't be enforced - this obviously also will apply to
connections forwarded using socat running on the same host.

with Linux
==========

This requires netfilter compiled into the kernel or loaded as module and the
user-space iptables command:

---%<-------------------------------------------------------------------------
iptables -v -t nat -A PREROUTING -p tcp -j REDIRECT --dport 109 --to-ports 110
---%<-------------------------------------------------------------------------

using socat
===========

You can achieve the same result:

---%<-------------------------------------------------------------------------
socat tcp4-listen:109,setuid=nobody,fork,reuseaddr
tcp4-connect:localhost:110,bind=localhost&
---%<-------------------------------------------------------------------------

(This file was created from the wiki on 2009-02-04 04:42)
