mercredi 9 décembre 2015

Dovecot Maximale Verbindungen per IMAP

Hi,

ich hab mein Server (Debian) neu aufgesetzt. Mit Postfix und Dovecot.
Dovecot hab ich weitesgehend default gelassen (config unten).

Problem ist nun: Wenn ich alle meine Geräte (PC + Handy + Tablet + 2t PC) anwerfe, dann verweigert mir Thunderbird ab und zu den Zugriff. Er sagt dann, dass der Server die Anfrage abgelehnt hat.

in der mail.log und auch mail.info konnte ich allerdrings keinerlei Gründer hierfür finden. Also bin ich davon ausgegangen, dass ich zu viele Verbindungen gleichzeitig aufgebaut habe.

Entsprechend hab ich:
Code:

service imap-login {
  ...
  client_limit = 1000
  process_limit = 500


protocol imaps {
  ...
  mail_max_userip_connections = 20
}

gesetzt. Aber keine sonderliche Verbesserung.

Also wollt ich grundsätzlich erstmal wissen, wieviele Sitzungen denn nun offen sind. Lt. Google gibt es hier wohl "doveadm stats top". Nur wird mir ausser dem Header nichts angezeigt. In der Config hab ich aber schon die entsprechenden Einträge gemacht, das diese Statistik wohl ermöglichen soll.

Langsam gehen mir die Möglichkeiten aus. Ohne Statistik seh ich nicht, ob ich schon am Limit bin... ohne Fehlerlogs auch nicht.

Weiß einer Rat ? Oder hat Tipps für mich.

Ggf. generell mal eine Antwort auf: Wie arbeitet IMAP. Baut IMAP eine Verbindung auf oder gleich zich hunderte. Sind dann "mail_max_userip_connections = 20" zu wenig ?

Danke

Code:

cat /etc/dovecot/dovecot.conf
# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.8 ext4

disable_plaintext_auth = no

mail_plugins = $mail_plugins stats

log_path = /var/log/dovecot.log
info_log_path = /var/log/dovecot-info.log
debug_log_path = /var/log/dovecot-debug.log
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l %c
mail_debug = yes

mail_location = http://maildir:/var/mail/%u/
mail_privileged_group = mail
namespace {
  hidden = yes
  list = no
  location = maildir:/var/mail/%u
  prefix = Public/
  separator = /
  subscriptions = no
  type = public
}
namespace inbox {
  inbox = yes
  location = maildir:/var/mail/%u
  mailbox "Deleted Messages" {
    special_use = \Trash
  }
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Junk-E-Mail {
    special_use = \Junk
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  mailbox junkmail {
    auto = subscribe
    special_use = \Junk
  }
  prefix =
  separator = /
  type = private
}
passdb {
  driver = passwd
}
passdb {
  driver = shadow
}
postmaster_address = info@domain.de
protocols = imap pop3
service auth {
  user = root
}
service imap-login {
  inet_listener imap {
    port = 0
  }
  client_limit = 2000
  process_limit = 1000
}
service pop3-login {
  inet_listener pop3 {
    port = 0
  }
}
shutdown_clients = no
ssl_ca = </etc/ssl/mail.domain.de.ca-bundle
ssl_cert = </etc/ssl/mail.domain.de.crt
ssl_key = </etc/ssl/mail.domain.de.key
userdb {
  driver = passwd
}
protocol imaps {
  imap_idle_notify_interval = 2 mins
  pop3_uidl_format = %08Xu%08Xv
  mail_max_userip_connections = 20
  mail_plugins = $mail_plugins imap_stats
}

protocol imap {
  mail_plugins = $mail_plugins imap_stats
}


plugin {
  # how often to session statistics (must be set)
  stats_refresh = 30 secs
  # track per-IMAP command statistics (optional)
  stats_track_cmds = yes
}

service stats {
  fifo_listener stats-mail {
    user = root
    mode = 0600
  }
}



Aucun commentaire:

Enregistrer un commentaire