[Dovecot] Multiple IP(or Host) listen in dovecot.conf.
Hi.
Does someone make update for `Multiple IP(or Host) listen in dovecot.conf'?
I made trivial patch so.
But this patch doesn't solve Support listening in multiple sockets' in TODO. It appends only the capability as multiple listen in dovecot.conf. So,
login_processes_count' becomes ambiguous.
In CASE1, login_processes_count = 2, forked imap-login processes are
8.
-- samples dovecot.conf applied this patch are following.
CASE 1:
listen = 127.0.0.1, 192.168.0.10, imap-server1, imap-server2.example.com
or CASE 2:
protocol imap { listen = 127.0.0.1:143, imap-server1:10143 ssl_listen = imap-server2:10943, 127.0.0.1 .. } protocol pop3 { listen = 127.0.0.1, pop-server1:10100 .. }
-- Update brief.
src/master/ master-setting.h: listen_fd and related members changed to array_t. also name add (s).
master-setting.c:
few member initialization delete.
main.c:
handle multiple IP and port, fds as array_t.
resolve_ip argment change.
login-process.h:
add listen_fd and ssl_listen_fd member to login_group structre.
login-process.c:
add login_groups_create function for mapping login process to
each listen fd.
change dup2 source fd in create_login_process.
src/lib network.c: change getnameinfo error value.
Kawabe,Yoshihiro sowhat@amnis.co.jp As the stars blink in the night sky, our married hearts are never splitted. Even if we will unclasp each other hands, until we retain that. by H.S.
On Wed, 2007-03-28 at 20:35 +0900, Yoshihiro Kawabe wrote:
Does someone make update for `Multiple IP(or Host) listen in dovecot.conf'?
Looks like I've managed to skip this mail for this long. Although it was still with unread-status..
But this patch doesn't solve
Support listening in multiple sockets' in TODO. It appends only the capability as multiple listen in dovecot.conf. So,
login_processes_count' becomes ambiguous. In CASE1, login_processes_count = 2, forked imap-login processes are 8.
That doesn't seem very good thing to do. I think a lot easier way to implement this would be to just pass multiple listen fds to all of the login processes.
array_t ARRAY_DEFINE(listen_fds, int);
array_t ARRAY_DEFINE(ssl_listen_fds, int);
array_t ARRAY_DEFINE(listen_ips, struct ip_addr);
array_t ARRAY_DEFINE(ssl_listen_ips, struct ip_addr);
array_t ARRAY_DEFINE(listen_ports, unsigned int);
array_t ARRAY_DEFINE(ssl_listen_ports, unsigned int);
And one array of struct { int fd; struct ip_addr ip; bool ssl; } would probably make the code a lot simpler as well.
src/lib network.c: change getnameinfo error value.
I'm not sure why I originally wrote the code that way. Either there was no man page for getnameinfo() and I just guessed, or there was a man page which contains wrong information. Anyway, this is now fixed for upcoming v1.0.1.
On Sun, 2007-06-10 at 22:25 +0300, Timo Sirainen wrote:
src/lib network.c: change getnameinfo error value.
I'm not sure why I originally wrote the code that way. Either there was no man page for getnameinfo() and I just guessed, or there was a man page which contains wrong information. Anyway, this is now fixed for upcoming v1.0.1.
Then again, why is getnameinfo() called at all in there? I think it's completely useless. Removing..
Hi, Timo.
"Timo" == Timo Sirainen tss@iki.fi writes:
Timo> That doesn't seem very good thing to do. I think a lot easier way to Timo> implement this would be to just pass multiple listen fds to all of the Timo> login processes.
I agree that implementation is distorted. However, in March, I hope to use multi-listen version so quickly and I had no time to change inter processes(master and each login processes) interface in create_login_process (login-process.c). Actually, I spent several days for that patch within hacking dovecot sources.
Timo> And one array of struct { int fd; struct ip_addr ip; bool ssl; } would Timo> probably make the code a lot simpler as well.
Yes, I think so. I intended that patch-applied source codes are as similar as original source code possible, but after all those are dissimilar.
I'll think about re-make.
Kawabe,Yoshihiro sowhat@amnis.co.jp I can't cry so anymore. I promised you, I live with you. from Blaze up.
participants (2)
-
Timo Sirainen
-
Yoshihiro Kawabe