Dominik Schulz wrote:
Hi, I'm using Dovecot 1.0rc15 from Debian stable/etch.
I'd like to have Dovecot listen on more than one interface. It shall listen on one IPv4 Interface and on one IPv6 Interface. The comments in the sample configuration file say, that it's not possible to listen on more than one interface at a time. Sadly it's no option to me to listen on all interfaces.
So I'd like to ask if there is a chance that Dovecot will support listening on several selected interfaces anytime soon?
The BDS socket bind() only allows one address to be specified (0 meaning all IPs on the system). In short, a program that wants to listen on few IPs but not all needs to open multiple sockets, and manage them. This adds some complexity because the program needs to know when it should read/write from each socket. This is easier in short request protocols like HTTP. it is not efficient in connected protocols.
The "common" practice in your case is to run multiple instances of the same program. This requires adding startup scripts and config files for each instance, but this is a one shot task. and an advantage of this is that you can chose completely different config parameters for each instance (including a "nice" level).
if your goal is to block access to few IPs, then consider doing this at a firewall level instead. if you have a NAT implementation on the system, you can even configure dovecot to listen on 127.0.0.1 and use your NAT to redirect whatever IPs to dovecot.