[Dovecot] Dovecot optimisation

Proskurin Kirill k.proskurin at fxclub.org
Tue Jan 20 11:10:18 EET 2009


Hello all.

We start to use Dovecot at our email production but it runs not such 
fast as we expect.

We use Dell 2950 with 4GbRAM at FreeBSD-7.0-p9 - load avarage never 
upper a 0.5

We have about 500 clients most of it use Outlook 2007 via IMAP.

We run in this problems:
1) Sync of imap folder is really slow(I think it is Outlook problem)
2) Time after time we got Sync error from outlook
3) Time after time our monitoring system says what IMAP port not answer 
in 10 sec. In real life it start to answer in 15-20 sec what is not 
really good - client thinks what server don`t work. If I restart dovecot 
- it start to answer in 1-3 sec.

I think problem in my conf, may be I need tune it?

*dovecot -n don`t give full conf so i use this:*
mail# grep -v '#' /usr/local/etc/dovecot.conf | egrep -v '^$'
base_dir = /var/run/dovecot/
protocols = imap imaps pop3 pop3s managesieve
listen = *
disable_plaintext_auth = yes
shutdown_clients = yes
log_path = /var/log/dovecot/dovecot.log
info_log_path = /var/log/dovecot/dovecot.log
log_timestamp = "%b %d %H:%M:%S "
syslog_facility = mail
ssl_disable = no
ssl_cert_file = /usr/local/etc/certs/fxclub_org.crt
ssl_key_file = /usr/local/etc/certs/fxclub_org.key
ssl_ca_file = /usr/local/etc/certs/GlobalSignCA.crt
ssl_verify_client_cert = no
ssl_parameters_regenerate = 168
ssl_cipher_list = ALL:!LOW:!SSLv2
verbose_ssl = no
login_dir = /var/run/dovecot/login
login_user = dovecot
login_process_size = 64
login_process_per_connection = yes
login_processes_count = 10
login_max_processes_count = 128
login_greeting = Dovecot ready.
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l %c
login_log_format = %$: %s
mail_location = maildir:/var/spool/dovecot/domains/%d/%n/
mail_uid = dmail
mail_gid = dmail
mail_privileged_group = mail
mail_full_filesystem_access = no
mail_debug = no
mail_log_prefix = "%Us(%u): "
mail_log_max_lines_per_sec = 10
mmap_disable = no
dotlock_use_excl = yes
fsync_disable = no
mail_nfs_storage = no
mail_nfs_index = no
lock_method = fcntl
mail_drop_priv_before_exec = no
verbose_proctitle = yes
first_valid_uid = 500
first_valid_gid = 0
max_mail_processes = 512
mail_process_size = 256
mail_max_keyword_length = 50
mail_cache_min_mail_count = 0
mailbox_idle_check_interval = 30
mail_save_crlf = no
maildir_stat_dirs = no
maildir_copy_with_hardlinks = yes
maildir_copy_preserve_filename = no
mbox_read_locks = fcntl
mbox_write_locks = dotlock fcntl
mbox_lock_timeout = 300
mbox_dotlock_change_timeout = 120
mbox_min_index_size = 0
protocol imap {
login_executable = /usr/local/libexec/dovecot/imap-login

mail_executable = /usr/local/libexec/dovecot/imap
imap_max_line_length = 65536
mail_max_userip_connections = 10
mail_plugins = quota imap_quota autocreate
mail_plugin_dir = /usr/local/lib/dovecot/imap
login_greeting_capability = yes
imap_logout_format = bytes=%i/%o
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
}

protocol pop3 {
login_executable = /usr/local/libexec/dovecot/pop3-login
mail_executable = /usr/local/libexec/dovecot/pop3
pop3_enable_last = no
pop3_lock_session = no
pop3_uidl_format = %08Xu%08Xv
pop3_logout_format = top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
mail_max_userip_connections = 3
   mail_plugins = quota
   mail_plugin_dir = /usr/local/lib/dovecot/pop3
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
protocol lda {
postmaster_address = postmaster at fxclub.org
hostname = mail.fxclub.org
mail_plugins = cmusieve quota
mail_plugin_dir = /usr/local/lib/dovecot/lda
quota_full_tempfail = yes
deliver_log_format = msgid=%m: %$
log_path = /var/log/dovecot/deliver.log
info_log_path = /var/log/dovecot/deliver.log
sendmail_path = /usr/sbin/sendmail
rejection_reason = Your message to <%t> was automatically rejected:%n%r
auth_socket_path = /var/run/dovecot/auth-master
sieve_global_path = /var/spool/dovecot/global.sieve
}
protocol managesieve {
listen = *:2000
login_executable = /usr/local/libexec/dovecot/managesieve-login
mail_executable = /usr/local/libexec/dovecot/managesieve
managesieve_max_line_length = 65536
sieve_storage = %
sieve = ~/.dovecot.sieve
mail_location =
managesieve_implementation_string = dovecot
}
auth_executable = /usr/local/libexec/dovecot/dovecot-auth
auth_process_size = 256
auth_cache_size = 0
auth_cache_ttl = 3600
auth_cache_negative_ttl = 3600
auth_username_chars = 
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
auth_username_format = %Lu
auth_verbose = yes
auth_debug = no
auth_debug_passwords = no
auth_worker_max_count = 100
auth_failure_delay = 2
auth default {
mechanisms = plain login
   passdb ldap {
         args = /usr/local/etc/dovecot-ldap.conf
   }
   userdb ldap {
         args = /usr/local/etc/dovecot-ldap.conf
   }
   user = dovecot-auth
   count = 1
   ssl_require_client_cert = no
   socket listen {
     master {
       path = /var/run/dovecot/auth-master
       mode = 0600
       user = dmail
     }
     client {
       path = /var/run/dovecot/auth-client
       mode = 0660
       user = exim
     }
   }
}
dict {
}
plugin {

quota = maildir
quota_rule = *:storage=1024M
quota_rule2 = Trash:storage=1256M
quota_rule3 = SPAM:ignore
quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95
quota_warning2 = storage=80%% /usr/local/bin/quota-warning.sh 80
autocreate = Trash
autocreate2 = Sent
autocreate3 = Spam
autosubscribe = Trash
autosubscribe2 = Sent
autosubscribe3 = Spam
}

-- 
Best regards,
Proskurin Kirill


More information about the dovecot mailing list