Dovecot (director, lmtp) IPv4/IPv6?
Hello, I'm build system with two director/proxy and dual stack network (or IPv6-only local services) http://wiki2.dovecot.org/Director say "This also means that a single director ring must use either IPv4 or IPv6 addresses, but not both at the same time." OK
All servers have 2 interface (public and local network), and all dual stack IPv4/IPv6, imap/pop (mail) and lmtp (mx) proxy run in dedicated server. If network IPv4-only this work fine IPv6-only or IPv4/IPv6 configs not work (on mail director)
dovecot-2.2.10-5.el7, CentOS Linux release 7.2.1511 (Core)
My configs contain
Directors
listen = IPv4-public1, IPv4-local1, IPv6-public1, IPv6-local1 director_servers = IPv6-local1 IPv6-local2 director_mail_servers = IPv4-public3 IPv4-local3 IPv6-public3 IPv6-local3
service lmtp { client_limit = 5 executable = lmtp -L idle_kill = 0 process_limit = 0 process_min_avail = 0 protocol = lmtp service_count = 0 inet_listener lmtp { address = IPv6-local1 IPv4-local1 port = 24 } }
# 20-lmtp lmtp_proxy = yes
service director { unix_listener login/director { mode = 0666 } fifo_listener login/proxy-notify { mode = 0600 } unix_listener director-userdb { mode = 0600 } inet_listener { address = IPv6-local1 port = 9090 } }
Without line "address =" in service, all services start all listen.
If director contain
service imap-login { executable = imap-login director idle_kill = 10 secs inet_listener imap { port = 143 } process_limit = 400 process_min_avail = 10 service_count = 0 vsz_limit = 512 M }
log after start server # systemctl status dovecot ● dovecot.service - Dovecot IMAP/POP3 email server Loaded: loaded (/usr/lib/systemd/system/dovecot.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2016-01-28 13:12:49 MSK; 5s ago Process: 11111 ExecStartPre=/usr/libexec/dovecot/prestartscript (code=exited, status=0/SUCCESS) Main PID: 11114 (dovecot) CGroup: /system.slice/dovecot.service ├─11114 /usr/sbin/dovecot -F ├─11116 dovecot-director/imap-login director ├─11117 dovecot-director/anvil [10 connections] ├─11118 dovecot-director/log ├─11120 dovecot-director/imap-login director ├─11121 dovecot-director/imap-login director ├─11122 dovecot-director/imap-login director ├─11123 dovecot-director/imap-login director ├─11124 dovecot-director/imap-login director ├─11125 dovecot-director/imap-login director ├─11126 dovecot-director/imap-login director ├─11127 dovecot-director/imap-login director ├─11128 dovecot-director/imap-login director └─11129 dovecot-director/config
Jan 28 13:12:49 mail systemd[1]: Starting Dovecot IMAP/POP3 email server... Jan 28 13:12:49 mail systemd[1]: Started Dovecot IMAP/POP3 email server. Jan 28 13:12:49 mail dovecot[11114]: master: Dovecot v2.2.10 starting up for imap, pop3 (core dumps disabled) Jan 28 13:12:49 mail dovecot[11114]: master: Error: service(director): command startup failed, throttling for 2 secs Jan 28 13:12:49 mail dovecot[11118]: director: Fatal: Invalid director port in IPv6-local1 Jan 28 13:12:54 mail dovecot[11118]: director: Fatal: Invalid director port in IPv6-local1 Jan 28 13:12:54 mail dovecot[11114]: master: Error: service(director): command startup failed, throttling for 4 secs
# systemctl status dovecot ● dovecot.service - Dovecot IMAP/POP3 email server Loaded: loaded (/usr/lib/systemd/system/dovecot.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2016-01-28 13:05:52 MSK; 10min ago Process: 10232 ExecStartPre=/usr/libexec/dovecot/prestartscript (code=exited, status=0/SUCCESS) Main PID: 10235 (dovecot) CGroup: /system.slice/dovecot.service ├─10235 /usr/sbin/dovecot -F ├─10237 dovecot-proxy/anvil [0 connections] └─10238 dovecot-proxy/log
Jan 28 13:05:52 mx systemd[1]: Starting Dovecot IMAP/POP3 email server... Jan 28 13:05:52 mx systemd[1]: Started Dovecot IMAP/POP3 email server. Jan 28 13:05:52 mx dovecot[10235]: master: Dovecot v2.2.10 starting up for lmtp (core dumps disabled) Jan 28 13:06:18 mx dovecot[10238]: director: Fatal: Invalid director port in IPv6-local1 Jan 28 13:06:18 mx dovecot[10235]: master: Error: service(director): command startup failed, throttling for 2 secs Jan 28 13:06:18 mx dovecot[10250]: lmtp(10250): Error: passdb lookup(mailadm@mx): Disconnected unexpectedly Jan 28 13:06:20 mx dovecot[10238]: director: Fatal: Invalid director port in IPv6-local1
On 28 Jan 2016, at 12:35, Andrey Fesenko f0andrey@gmail.com wrote:
Jan 28 13:12:49 mail dovecot[11118]: director: Fatal: Invalid director port in IPv6-local1
Oh, you're not actually using "IPv6-local1" here but the actual IP. That confused me for a while how this error could happen. Anyway that part of the code attempts to find :port from the string. So you have two possibilities:
a) Don't define IPv6 address, but a hostname and in /etc/hosts map it into the actual IPv6 address
b) Append :port after the address (it'll look ugly/confusing, but should work for now - maybe in future it gets changed though)
On Fri, Jan 29, 2016 at 5:38 PM, Timo Sirainen tss@iki.fi wrote:
On 28 Jan 2016, at 12:35, Andrey Fesenko f0andrey@gmail.com wrote:
Jan 28 13:12:49 mail dovecot[11118]: director: Fatal: Invalid director port in IPv6-local1
b) Append :port after the address (it'll look ugly/confusing, but should work for now - maybe in future it gets changed though)
What format dovecot expects to receive port? Colon is used to separate parts of the address, dovecot accept any format [IPv6-local1]:port ?
On 29 Jan 2016, at 16:51, Andrey Fesenko f0andrey@gmail.com wrote:
On Fri, Jan 29, 2016 at 5:38 PM, Timo Sirainen tss@iki.fi wrote:
On 28 Jan 2016, at 12:35, Andrey Fesenko f0andrey@gmail.com wrote:
Jan 28 13:12:49 mail dovecot[11118]: director: Fatal: Invalid director port in IPv6-local1
b) Append :port after the address (it'll look ugly/confusing, but should work for now - maybe in future it gets changed though)
What format dovecot expects to receive port? Colon is used to separate parts of the address, dovecot accept any format [IPv6-local1]:port ?
That actually works, but you'd need v2.2.20+ for that. With your v2.2.10 you'd have to use the confusing format of IPv6-local1:port without [].
participants (2)
-
Andrey Fesenko
-
Timo Sirainen