Adam M. Dunn
2006-Mar-09 21:15 UTC
[Dovecot] Segfault problem when using TWO dovecot servers!
Forgive me if this gets submitted twice. I had issues signing up for the listserv but I think I'm strait now. Hi all, I just started working with Dovecot and I'd like to use it for my organization, but I've run into a little problem. So far I love it and it does what I need. One thing we need is to be able to write to multiple mailbox formats on a per user basis (mbox or Maildir), and it does just that. I want users to be able to choose their format, and I can let it autodetect for me. The way I do that is I have Maildrop filters check for the presence of a ~Maildir, and if it finds that it writes to it, otherwise it writes to ~mbox. Dovecot is the only IMAP server I've found to read either or without hard coding one or the other in the config file. The problem: We also want failover. Mail/home directories are NFS mounted. I was planning to setup two dovecot servers, and noticed that whenever one server writes its temp files to the mail directory, if another server tries to read it you get a segfault and the child process fails and dies. So it basically looks like only one server can own the files, and it won't share. I considered trying to set the INDEX option on the mail boxes to write local indexes, but if I try to specify something like: default_mail_env = INDEX=/var/indexes/%d/%n, it doesn't work. Sure I can make it work by putting in a mailbox format before the INDEX, but then I can't use the autodetect which I need. Here's the syslog error: kernel: imap[13689]: segfault at 00007fffffe38000 rip 00002aaaaad3823f rsp 00007fffffe351f0 error 4 Any solutions? I really need this to work badly, or we may have to rethink our entire mail strategy. I'm also using the latest version 1.0beta3. I considered namespaces, but correct me if I'm wrong, you can't setup two namespaces and have it pick the first mailbox format available like the autodetect feature does. I tried seting up namespaces for both mbox and Maildir, but it just creates both. Please help someone. I need a solution to present to my boss, even if that means we have to run one server until the bug is fixed in the next version. Thanks, Adam
Timo Sirainen
2006-Mar-09 21:38 UTC
[Dovecot] Segfault problem when using TWO dovecot servers!
On Mar 9, 2006, at 11:15 PM, Adam M. Dunn wrote:> We also want failover. Mail/home directories are NFS mounted. I was > planning to setup two dovecot servers, and noticed that whenever one > server writes its temp files to the mail directory, if another server > tries to read it you get a segfault and the child process fails and > dies. > So it basically looks like only one server can own the files, and > it won't > share. I considered trying to set the INDEX option on the mail > boxes to > write local indexes, but if I try to specify something like: > default_mail_env = INDEX=/var/indexes/%d/%n, it doesn't work. Sure > I can > make it work by putting in a mailbox format before the INDEX, but > then I > can't use the autodetect which I need.There's currently no way to setup autodetection + indexes elsewhere. You could somewhat easily modify the sources though (lib-storage/ index/*/*-storage.c *_create()). But if you take the latest nightly Dovecot snapshot, it should work pretty well with indexes in NFS also, as long as you set mmap_disable=yes and change lock_method. As for the segfault, it shouldn't really be doing that, but you'd need to give gdb backtrace for me to figure out why it happens, see http://dovecot.org/bugreport.html -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20060309/188ec075/attachment.bin>