Limit replication to one user

2016-09-14 Thread Arne Hoffmann
Hello, 

we have a setup here where the main (and only important) feature of the IMAP
server is the public folder. Two Dovecot instances are running in a
active/passive cluster and mailstorage should be replicated between the two. 

Since there is a race condition when using public namespaces (locking on
user level and not on mailbox level) I had the intention of limiting the
replication to one user. 

I read somewhere that dsync is replicating all the users the command
"doveadm user '*'" shows. And the command only shows *one* user because I
have modified the iterate_query: 


,[/etc/dovecot/mysql.conf]
| iterate_query  = SELECT username AS user FROM mailbox WHERE username = 
'data_replicat...@example.com'
`


root [~]# doveadm user '*'
data_replicat...@example.com 
root [~]#


So, why does Dovecot still replicate mails from other users inboxes? And why
does doveadm replicator still show other users? 


root [~]# doveadm replicator status '*'
username  priority fast sync full sync success sync 
failed
data_replicat...@example.com  none 00:57:14  01:13:21  00:57:12 -
arne.hoffm...@example.com none 00:20:04  00:31:40  00:20:02 -
root [~]#


[I removed some whitespace to keep line length in check] 


Any explanation of this behavior would be just awesome. Hints to possible 
solution even more! :) 



   

root [~]# doveconf -n
# 2.2.24 (a82c823): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.13 (7b14904)
# OS: Linux 3.16.0-4-amd64 x86_64 Debian 8.5 ext4
debug_log_path = /var/log/mail.debug
disable_plaintext_auth = no
doveadm_password =  # hidden, use -P to show it
mail_debug = yes
mail_location = 
maildir:/var/mail/vmail/%d/%n/Maildir:INBOX=/var/mail/vmail/%d/%n/Maildir
mail_plugins = " listescape notify replication"
mail_privileged_group = vmail
namespace {
  location = maildir:/var/mail/vmail/Öffentliche 
Ordner:INDEXPVT=~/Maildir/Öffentliche Ordner
  mailbox "Gelöschte Elemente" {
auto = subscribe
special_use = \Trash
  }
  mailbox XYZ-Projekt {
auto = subscribe
  }
  prefix = Öffentliche Ordner/
  separator = /
  subscriptions = no
  type = public
}
namespace inbox {
  inbox = yes
  location =
  mailbox "Gelöschte Elemente" {
auto = subscribe
special_use = \Trash
  }
  prefix =
  separator = /
  type = private
}
passdb {
  args = /etc/dovecot/mysql.conf
  driver = sql
}
plugin {
  mail_replica = tcps:10.162.70.70:22001
}
protocols = imap
replication_max_conns = 1
service aggregator {
  fifo_listener replication-notify-fifo {
user = vmail
  }
  unix_listener replication-notify {
user = vmail
  }
}
service doveadm {
  inet_listener {
port = 22001
ssl = yes
  }
}
service replicator {
  process_min_avail = 1
  unix_listener replicator-doveadm {
mode = 0660
user = vmail
  }
}
ssl = required
ssl_ca = 

Re: How to obtain a "non-stripped" executable for producing a usable core-dump

2016-09-14 Thread Ben Johnson
On 9/14/2016 12:31 AM, Aki Tuomi wrote:
> Can you post output of bt full? 
> 
> Aki

Sure! It seems better suited to pastebin:

http://pastebin.com/4xdGNXa6

Thanks for any help!

-Ben


No Autoindex?

2016-09-14 Thread Larry Rosenman
I used to get my mail auto-indexed, but something(tm) changed recently, but
I'm
not sure what.

I do have fts_autoindex = yes in my dovecot config, and if I do a doveadm
index \*
it does the index.

Ideas?

doveconf -n attached

-- 
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 (c) E-Mail: larry...@gmail.com
US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281


dc.n
Description: Binary data


Re: 2.2.25 dumps core with "Panic: file imap-client.c: line 837 (client_check_command_hangs): assertion failed: (client->io != NULL)"

2016-09-14 Thread Piper Andreas
Am 12.09.2016 um 08:16 schrieb Aki Tuomi:
> 
> 
> On 12.09.2016 09:02, Piper Andreas wrote:
>> Am 01.09.2016 um 14:17 schrieb Aki Tuomi:
>>>
>>> On 01.09.2016 14:20, Piper Andreas wrote:
 Hello Timo,

 with the newly build CSW-package the crashes still occur, today already
 twice within two hours. The log shows always the same:

 Sep  1 11:50:13 surz113 dovecot: [ID 583609 mail.crit] imap(user):
 Panic: file imap-client.c: line 837 (client_check_command_hangs):
 assertion failed: (client->io != NULL)
 Sep  1 11:50:13 surz113 dovecot: [ID 583609 mail.error] imap(user):
 Error: Raw backtrace: 0x80ffb633d88d -> 0x80ffb636ae82 ->
 0x41eba0 -> 0x41ecf3 -> 0x80ffb635d248 -> 0x80ffb6350d2f ->
 0x80ffb63519e0 -> 0x80ffb6350dce -> 0x80ffb6350f90 ->
 0x80ffb62e3ebb -> 0x42f169 -> 0x41292c
 Sep  1 11:50:13 surz113 dovecot: [ID 583609 mail.crit] imap(user):
 Fatal: master: service(imap): child 11227 killed with signal 6 (core not
 dumped - set service imap { drop_priv_before_exec=yes })

 This happens with different users, the last one with a relatively small
 mailbox of 600MB.

 doveconf -n is attached.

 Dovecot 2.2.25
 OS: Solaris 11 (SunOS 5.11 11.3 i86pc i386 i86pc)
 Virtualization: VMware
 Filesystem: ZFS
 active users: ~4000

 The system was transferred at beginning of last week from an old
 SPARC-station with Solaris 10 running dovecot-2.2.15 to this virtualized
 platform under VMware. The mailboxes (maildir-format) were transferred
 without change by switching the storage-hardware to the new server. I
 had to remove all dovecot.index*-files for errors of "CPU Architecture
 changed", but after doing this all seemed to work ok except for these
 occasional crashes.

 If you need more information, please let me know.

 Thanks for any help,
 Andreas

> Hi Jake,
>
> thanks for fixing this. I have installed now the newly built package on
> my production system and will report, if any more core dumps occur.
>
> Regards,
> Andreas
>
>>> Hi!
>>>
>>> Is it possible for you test out a small patch (attached) to see if it
>>> fixes this issue?
>>>
>>> Aki
>>>
>> Hello Aki,
>>
>> your patch missed a trailing '{', which was corrected by the
>> OpenCSW-maintainer, who implemented the patch into a test-version of
>> dovecot-2.2.25 for me.
>>
>> I started this version on my production system on Friday morning (09.
>> Sep, 07:30). After that the server crashed once on Sunday evening
>> (11.Sep, 20:40), but with a completely different error message:
>>
>> Sep 11 20:40:37 surz113 dovecot: [ID 583609 mail.crit] imap(user1):
>> Panic: file imap-fetch.c: line 555 (imap_fetch_more): assertion failed:
>> (ctx->client->output_cmd_lock == NULL || ctx->client->output_cmd_lock ==
>> cmd)
>> Sep 11 20:40:37 surz113 dovecot: [ID 583609 mail.error] imap(user1):
>> Error: Raw backtrace: 0x80ffb5fcd88d -> 0x80ffb5ffae82 ->
>> 0x4225c1 -> 0x4153e5 -> 0x41ffae -> 0x41e4bf -> 0x41e865 -> 0x41ede4 ->
>> 0x80ffb5fe0d2f -> 0x80ffb5fe19e0 -> 0x80ffb5fe0dce ->
>> 0x80ffb5fe0f90 -> 0x80ffb5f73ebb -> 0x42f169 -> 0x41292c
>> Sep 11 20:40:37 surz113 dovecot: [ID 583609 mail.crit] imap(user1):
>> Fatal: master: service(imap): child 12150 killed with signal 6 (core not
>> dumped - set service imap { drop_priv_before_exec=yes })
>>
>> May this be related to your patch, or is it something completely different?
>>
>> Thanks and best regards,
>> Andreas
> Hi!
> 
> Apologies, I forgot to send you an email about this, it should be fixed with
> https://github.com/dovecot/core/commit/cd9cf45dcf9fcabc89e156117c4dcf464ec4eb85
> 
> Aki
> 

Hello and thanks for this information,

the OpenCSW-maintainer has implemented this fix into another test
version, which is now running on my production system. I'll report, if
there are any more problems.

Best regards,
Andreas




smime.p7s
Description: S/MIME Cryptographic Signature