We are in the process of migrating away from Courier-IMAP/POP3 and Maildrop. I want to use Dovecot (LDA, IMAP, POP3). During my testing, it has worked great except for dotlocking on the dovecot-uidlist file.

The problem:

When a delivery is being made with deliver and a mail client has the mailbox open (Thunderbird in this case), neither Thunderbird or deliver can get a dotlock on the dovecot-uidlist file, causing both deliver and Thunderbird to hang until the dotlock timeout runs out and the lock gets replaced. Once the lock is replaced, both will go about their business until the next lock miss and hang again. Eventually, everything is delivered and Thunderbird wakes up.

Looking at each of the processes with truss, they are looping trying to stat the dotcot-uidlist.lock file, which no longer exists.

We are using NFS, and based on reading through the mailing list archives, it can be a little difficult to get working reliably. But, I've read quite a few posts with our same or similar configuration having good luck with the setup. To reduce multiple box access-issues for now, I've been doing all testing with a single NFS client.

Our configuration:

NetApp filers for storage
FreeBSD 6.2-RELEASE NFS clients
Postfix 2.3.9 MTA
Dovecot 1.0.0 LDA for local deliveries
Dovecot 1.0.0 IMAP for pickup

My dovecot.conf file is at the end of this message. NFS access cachcing on the FreeBSD has been disabled (vfs.nfs.access_cache_timeout = 0, see NFS mount options below). Postfix destination recipient and concurrency limit for the Dovecot LDA is set to 1.

The NFS mount options:

rw,tcp,-r=32768,-w=32768,nfsv3,dumbtimer,noatime,acregmin=0,
acregmax=0,acdirmin=0,acdirmax=0

The dovecot.conf file:

protocols = imap imaps pop3 pop3s
disable_plaintext_auth = no
syslog_facility = local0
ssl_cert_file = /nethere/conf/dovecot/ssl-nh-cert.pem
ssl_key_file = /nethere/conf/dovecot/ssl-nh-key.pem
login_greeting = Server ready.
login_log_format_elements = user=<%u> ip=[%r] method=%m encryption=%c pid=%p
login_log_format = %U$: %s
mail_location = maildir:~/Maildir:INDEX=MEMORY
mmap_disable = yes
dotlock_use_excl = no
lock_method = dotlock
first_valid_uid = 200
last_valid_uid = 200
first_valid_gid = 200
last_valid_gid = 200
maildir_copy_with_hardlinks = yes

namespace private {
  prefix = INBOX.
  inbox = yes
}

protocol imap {
  login_executable = /usr/local/libexec/dovecot/imap-login
  mail_executable = /usr/local/libexec/dovecot/imap
  imap_client_workarounds = outlook-idle delay-newmail
}

protocol pop3 {
  login_executable = /usr/local/libexec/dovecot/pop3-login
  mail_executable = /usr/local/libexec/dovecot/pop3
  pop3_uidl_format = UID%u-%v
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}

protocol lda {
  postmaster_address = [EMAIL PROTECTED]
  sendmail_path = /usr/sbin/sendmail
  auth_socket_path = /var/run/dovecot/auth-master
  syslog_facility = mail
}

auth_executable = /usr/local/libexec/dovecot/dovecot-auth

auth default {
  mechanisms = plain digest-md5 cram-md5
  passdb ldap {
    args = /nethere/conf/dovecot/dovecot-ldap.conf
  }
  userdb ldap {
    args = /nethere/conf/dovecot/dovecot-ldap.conf
  }
  user = root
  socket listen {
    master {
      path = /var/run/dovecot/auth-master
      mode = 0600
      user = mailuser
      group = mailuser
    }
  }
}

It may just be "how it works", but the lock contention seems a little too fragile for busy mailboxes.

Does anyone have any ideas?  Thanks in advance for any assistance.

-Doug

Reply via email to