Re: [Dovecot] One Dovecot serving 2 domains - possible?
----- Original Message ----- From: "Timo Sirainen" <tss@iki.fi> To: "k bah" <kbah@linuxmail.org> Cc: dovecot@dovecot.org Subject: Re: [Dovecot] One Dovecot serving 2 domains - possible? Date: Thu, 26 Feb 2009 15:14:32 -0500
On Wed, 2009-02-25 at 13:54 -0300, k bah wrote:
I'm talking about Dovecot 1.0.x, since 1.1.x showed some problems > > on some of my servers. What problems?
This:
Feb 16 10:05:56 server dovecot: Panic: IMAP(user): file istream-tee.c: line 144 (i_stream_tee_read): assertion failed: (ret > 0)
auth-worker died. That happened with Dovecot 1.1.4, 1.1.7 and 1.1.11, 1.1.7 was not with me, was with another user I found, on some mailing list. The problem occurred when copying or deleting messages, sometimes even viewing (Webmail). Since it's a production server, I compiled the latest 1.0.x and I'm using it. This particular server was running Ubuntu 8.04 (the default package is 1.0.x) and I upgraded to 8.10 (the default package is 1.1.x).
The above assert isn't from v1.1.11 and I had added some extra checks there since 1.1.7. Do you have the exact assert message from v1.1.11?
root@server:~/dovecot-1.1.11/src/lib# grep -n assert istream-tee.c 38: i_assert(tstream->istream.skip + old_used <= size); 85: i_assert(tee->input->v_offset <= tee->max_read_offset); 119: i_assert(last_high_offset <= input->v_offset + size); 142: i_assert(stream->buffer == data); 144: i_assert(ret > 0); root@server:~/dovecot-1.1.11/src/lib#
The full log message:
server dovecot: Panic: IMAP(john): file istream-tee.c: line 144 (i_stream_tee_read): assertion failed: (ret > 0) server dovecot: IMAP(john): Raw backtrace: imap [0x7f3a6ae67eb2] -> imap [0x7f3a6ae67f37] -> imap [0x7f3a6ae675e8] -> imap [0x7f3a6ae6e4ca] -> imap(i_stream_read+0x27) [0x7f3a6ae6c1f7] -> imap(i_stream_read_data+0x46) [0x7f3a6ae6c2d6] -> imap [0x7f3a6ae6050e] -> imap [0x7f3a6ae60a5e] -> imap(message_parser_parse_next_block+0x29) [0x7f3a6ae60669] -> imap(index_mail_cache_parse_continue+0x1f) [0x7f3a6ae2a7ef] -> imap(maildir_save_continue+0x55) [0x7f3a6ae0f6c5] -> imap(mail_storage_copy+0xe7) [0x7f3a6ae35327] -> imap(maildir_copy+0x75) [0x7f3a6ae0c035] -> /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so [0x7f3a6a43a463] -> imap(cmd_copy+0x200) [0x7f3a6adf1c60] -> imap [0x7f3a6adf6bdc] -> imap [0x7f3a6adf6c8d] -> imap [0x7f3a6adf72c5] -> imap(client_input+0x66) [0x7f3a6adf7796] -> imap(io_loop_handler_run+0xcb) [0x7f3a6ae6f4fb] -> imap(io_loop_run+0x18) [0x7f3a6ae6e8b8] -> imap(main+0x42d) [0x7f3a6adff6ad] -> /lib/libc.so.6(__libc_start_main+0xe6) [0x7f3a6a65c466] -> imap [0x7f3a6adf0ca9] server dovecot: child 924 (imap) killed with signal 6 server dovecot: child 553 (auth-worker) killed with signal 11
a) Since I can make mailbox names unique with Dovecot variables (mailbox name is "susan~domain.org" which is different from susan~anotherdomain.org), when mail arrives, the mail message will be saved to the correct mailbox (even if I have, under the same mailbox root, two users with "susan" as the login, but from different domains).
Why do you use ~ instead of @? Dovecot makes things easier if you use @. But you can convert ~ to @ automatically:
auth_username_translation = ~@
"username~domain.org" is the the format I chose for the uid field on my LDAP server. Yeah, I could forget about those variables and use this instead, thanks for the tip.
c) Ok, the two above give me the possibility to have all mailboxes, from the two domains, under the same mailbox root, users will be unique no matter the scenario (mail arriving, user checking mail), BUT, I would like to keep them separated anyways, is that possible to force that?
Where in filesystem do you want them? For example you could do:
mail_location = /var/mail/%d/%n
to have two domain directories and the username under them. << signature.asc >>
It's so obvious I feel kinda dumb =). It must be the stress that kept me from seeing it before!
Thanks for your time!
= Free Trial - ETF Trading Service Professional management of exchange traded fund (ETF) portfolio with buy/sell recommendations on semis SMH, bonds, ETF TLT, gold, SPY, QQQQ, DIA, OIH, autotrading available at major brokers. http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=3d70d4ea0e9cbc38748457af...
-- Powered by Outblaze
On Feb 27, 2009, at 8:21 AM, k bah wrote:
The above assert isn't from v1.1.11 and I had added some extra checks there since 1.1.7. Do you have the exact assert message from v1.1.11?
root@server:~/dovecot-1.1.11/src/lib# grep -n assert istream-tee.c 38: i_assert(tstream->istream.skip + old_used <= size); 85: i_assert(tee->input->v_offset <= tee-
max_read_offset); 119: i_assert(last_high_offset <= input->v_offset + size); 142: i_assert(stream->buffer == data); 144: i_assert(ret > 0); root@server:~/dovecot-1.1.11/src/lib#
Oh. Looks like I changed the code after v1.1.11 :)
http://hg.dovecot.org/dovecot-1.1/rev/e1cac844aa1e
Does that fix help with your crashes?
server dovecot: child 553 (auth-worker) killed with signal 11
This is also interesting. A crashing imap process should have no
effect on auth-worker. Can you get a gdb backtrace from that?
participants (2)
-
k bah
-
Timo Sirainen