[Dovecot] Dovecot 2.0.5 and BSDI 4.3 again

The Doctor doctor at doctor.nl2k.ab.ca
Mon Oct 11 02:02:11 EEST 2010


Right,


Changes made to dovecot-2.0.5/src/lib-master/master-service.c


       conn.listen_fd = l->fd;
        conn.fd = net_accept(l->fd, &conn.remote_ip, &conn.remote_port);
                        i_error("conn.fd: %d",conn.fd);
                        i_error("l->fd: %d",l->fd);
                        i_error("&conn.remote_ip: %d",&conn.remote_ip);
                        i_error("&conn.remote_port: %d",&conn.remote_port);
        if (conn.fd < 0) {
                struct stat st;
                int orig_errno = errno;

                if (conn.fd == -1)
                        return;

                if (errno == ENOTSOCK) {
                        /* it's not a socket. should be a fifo. */
                } else if (errno == EINVAL &&
                           (fstat(l->fd, &st) < 0 || !S_ISFIFO(st.st_mode))) {
                        /* BSDI fails accept(fifo) with EINVAL. */
                } else {
                        errno = orig_errno;
                        i_error("net_accept() failed: %m");
                        master_service_error(service);
                        return;
                }
                /* use the "listener" as the connection fd and stop the
                   listener. */
                conn.fd = l->fd;
                conn.listen_fd = l->fd;
                conn.fifo = TRUE;

                io_remove(&l->io);
                l->fd = -1;
        }
        conn.ssl = l->ssl;
        net_set_nonblock(conn.fd, TRUE);                                        


to generate below log for debugging.



Oct 10 16:30:45 doctor dovecot: master: Dovecot v2.0.5 starting up (core dumps d
isabled)
Oct 10 16:30:45 doctor dovecot: log: Error: l->fd: 20
Oct 10 16:30:45 doctor dovecot: log: Error: &conn.remote_ip: 134511880
Oct 10 16:30:45 doctor dovecot: log: Error: &conn.remote_port: 134511900
Oct 10 16:30:45 doctor dovecot: log: Error: net_accept() failed: Invalid argumen
t
Oct 10 16:30:45 doctor dovecot: master: Error: service(imap-login): command star
tup failed, throttling
Oct 10 16:30:46 doctor dovecot: master: Error: service(pop3-login): command star
tup failed, throttling
Oct 10 16:31:46 doctor dovecot: master: Error: service(pop3-login): command star
tup failed, throttling
Oct 10 16:32:47 doctor dovecot: master: Error: service(pop3-login): command star
tup failed, throttling
Oct 10 16:33:44 doctor dovecot: master: Error: service(imap-login): command star
tup failed, throttling
Oct 10 16:33:47 doctor dovecot: master: Error: service(pop3-login): command star
tup failed, throttling    

Oct 10 16:50:21 doctor dovecot: master: Dovecot v2.0.5 starting up (core dumps d
isabled)
Oct 10 16:50:21 doctor dovecot: log: Error: conn.fd: -2
Oct 10 16:50:21 doctor dovecot: log: Error: l->fd: 20
Oct 10 16:50:21 doctor dovecot: log: Error: &conn.remote_ip: 134511880
Oct 10 16:50:21 doctor dovecot: log: Error: &conn.remote_port: 134511900
Oct 10 16:50:21 doctor dovecot: log: Error: net_accept() failed: Invalid argumen
t
Oct 10 16:50:21 doctor dovecot: master: Error: service(pop3-login): command star
tup failed, throttling
Oct 10 16:50:21 doctor dovecot: master: Error: service(imap-login): command star
tup failed, throttling
Oct 10 16:50:52 doctor dovecot: master: Error: service(anvil): Initial status no
tification not received in 30 seconds, killing the process
Oct 10 16:50:52 doctor dovecot: master: Error: service(anvil): child 7962 killed
 with signal 9
Oct 10 16:50:52 doctor dovecot: master: Error: service(anvil): command startup f
ailed, throttling
Oct 10 16:51:21 doctor dovecot: master: Error: service(pop3-login): command star
tup failed, throttling
Oct 10 16:51:22 doctor dovecot: master: Error: service(imap-login): command star
tup failed, throttling
Oct 10 16:52:22 doctor dovecot: master: Error: service(pop3-login): command star
tup failed, throttling                        


Configuration being used


# 2.0.0: dovecot.conf
# OS: BSD/OS 4.3 i386  
auth_cache_negative_ttl = 3600 s
base_dir = /var/run/dovecot/
disable_plaintext_auth = no
first_valid_uid = 100
listen = *
##listen = 204.209.81.1
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l %c
mail_debug=yes
mail_location = mbox:~/mail:INBOX=/var/mail/%u
mail_log_prefix = %Us(%u): 
mdbox_rotate_size = 2048
passdb {
  args = /etc/master.passwd
  driver = passwd-file
}
protocols =  imap   pop3
service auth {
  executable = /usr/dovecot2/libexec/dovecot/auth postlogin
  user = root
  vsz_limit = 256
}
service imap-login {
  chroot = login
  client_limit = 256
  executable = /usr/dovecot2/libexec/dovecot/imap-login postlogin
  inet_listener imaps {
    address = 204.209.81.1
  }
  process_limit = 128
  process_min_avail = 3
  service_count = 1
  user = dovecot
  vsz_limit = 64
}
service imap {
  executable = /usr/dovecot2/libexec/dovecot/imap postlogin
  process_limit = 512
  vsz_limit = 256
}
service pop3-login {
  chroot = login
  client_limit = 256
  executable = /usr/dovecot2/libexec/dovecot/pop3-login postlogin
  inet_listener pop3s {
    address = 204.209.81.1
  }
  process_limit = 128
  process_min_avail = 3
  service_count = 1
  user = dovecot
  vsz_limit = 64
}
service pop3 {
  executable = /usr/dovecot2/libexec/dovecot/pop3 postlogin
  process_limit = 512
  vsz_limit = 256
}
ssl_cert = /etc/ssl/certs/dovecot.pem
ssl_cipher_list = ALL:!LOW:!SSLv2
ssl_key = /etc/ssl/private/dovecot.pem
userdb {
  driver = passwd
}
userdb {
  args = /etc/passwd
  driver = passwd-file
}
protocol imap {
  imap_client_workarounds = delay-newmail  tb-extra-mailbox-sep
  imap_idle_notify_interval = 120 s
  imap_logout_format = bytes=%i/%o
  imap_max_line_length = 65536
  mail_max_userip_connections = 10
  mail_plugin_dir = /usr/dovecot2/lib/dovecot/imap
}
protocol pop3 {
  mail_max_userip_connections = 3
  mail_plugin_dir = /usr/dovecot2/lib/dovecot/pop3
  pop3_enable_last = no
  pop3_lock_session = no
  pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
  pop3_no_flag_updates = no
  pop3_reuse_xuidl = no
  pop3_save_uidl = no
  pop3_uidl_format = %08Xu%08Xv
}
plugin {
  home=/usr/dovecot2
}
service postlogin {
   executable = /usr/dovecot2/libexec/dovecot/script-login /usr/dovecot2/libexec/dovecot/rawlog
   unix_listener postlogin {
   }
}
-- 
Member - Liberal International	This is doctor at nl2k.ab.ca Ici doctor at nl2k.ab.ca
God, Queen and country! Never Satan President Republic! Beware AntiChrist rising! 
http://twitter.com/rootnl2k http://www.facebook.com/dyadallee
Are you a real human: http://www.cuttingedge.org/news/n1334.cfm


More information about the dovecot mailing list