Merging maildirs
Hi List How do I merge files from one maildir into another maildir? Long version: I've been using dovecot/postfix for a 12 user environment for several years, and today was the first time I ran into an issue I could not solve from reading the documentation. The server is gentoo running on esxi. A few times a year I've made a snapshot of the server and copied the files to my home esxi server as a full system backup. 5 days ago the internet connection at the office broke, and I decided to power on the last copy of the server at my home and change public dns so that users could access their new mails via webmail from this spare server. (I didn't allow imap through firewall.) Now the network at the office is back. DNS is updated so that mails are delivered to the office server again. But all the mails sent / received during those 5 days is only at my house. How can I merge those into the office server?I'd like to do this as a server administrator. I do not want to have each user forward the mails to them self from the temporarily webmail. I tried to just copy the mail files on my own account - like I did once when I used courier-imap, but that did not work with dovecot. I hope someone has an idea of how to solve this.
Panic in service(log)
Hello, I'm using the Debian builds of dovecot-2.2 by S[r]us. Today I started getting the following panic: log: Panic: file priorityq.c: line 122 (priorityq_remove_idx): assertion failed: (idx count) log: Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(+0x7f1ae) [0x7fd368dc31ae] - /usr/lib/dovecot/libdovecot.so.0(+0x7f269) [0x7fd368dc3269] - /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7fd368d6c81e] - /usr/lib/dovecot/libdovecot.so.0(+0xa0de8) [0x7fd368de4de8] - /usr/lib/dovecot/libdovecot.so.0(priorityq_remove+0xb) [0x7fd368de4eeb] - /usr/lib/dovecot/libdovecot.so.0(+0x9179c) [0x7fd368dd579c] - /usr/lib/dovecot/libdovecot.so.0(master_status_update+0x93) [0x7fd368d71263] - /usr/lib/dovecot/libdovecot.so.0(+0x2ecf3) [0x7fd368d72cf3] - /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x4c) [0x7fd368dd6b2c] - /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0xc5) [0x7fd368dd7e35] - /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x25) [0x7fd368dd6bb5] - /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x38) [0x7fd368dd6d58] - /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13) [0x7fd368d72213] - dovecot/log(main+0x11c) [0x555e9f81771c] - /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fd3689bcb45] - dovecot/log(+0x277d) [0x555e9f81777d] master: Error: service(log): child 28845 killed with signal 6 (core dumps disabled) Could anyone please advise? -- Eugene Paskevich | *==)--- | Plug me into eug...@raptor.kiev.ua| ---(==* | The Matrix
Re: question on autch cache parameters
hi teemu, thx for your reply. the user is a masteruser that hast a static passwd file. this is where the ACL_GROUPS is applied cat /etc/dovecot/passwd.masteruser master@uma:{SHA}ojN+jsbELZbRJeRb0qj9+MMjPUs=::userdb_acl_groups=umareadmaster allow_nets=127.0.0.1 ## * the standard lookup method for users is ldap. only masterusers are in static user/passdbs * auth cache is enabled I cant post my whole conf but will paste the parts you requested. if its not enough for you to reproduce, I will setup a clean instance and reproduce it there. ## # 2.2.16: /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.7 # OS: Linux 3.15.10-dist i686 auth_cache_negative_ttl = 30 mins auth_cache_size = 10 k auth_master_user_separator = * snip default namespace: (maildir gets overwritten by ldap lookup on most users) namespace { hidden = no inbox = no list = children location = maildir:/var/data/vmail/public/%%Lu/Maildir:LAYOUT=fs:INBOX=/var/data/vmail/public/%%Lu/Maildir/INBOX prefix = public/%%u/ separator = / subscriptions = no type = shared } userdb { args = uid=vmail gid=vmail home=/var/data/vmail/public/%Ln driver = static } protocol imap { imap_client_workarounds = tb-extra-mailbox-sep mail_plugins = acl notify mailbox_alias imap_acl ssl = yes ssl_cert = /etc/ssl/certs/imap.cert ssl_key = /etc/ssl/private/imap.key userdb { args = /etc/dovecot/dovecot-imap-ldap.conf.ext driver = ldap name = } } ## content of dovecot-imap-ldap.conf.ext: base = dc=spdev, dc=local # Filter for user lookups. user_filter = ((sAMAccountName=%Ln)(!(userAccountControl:1.2.840.113556.1.4.803:=2))((sAMAccountType=805306368))) # User attributes are given in LDAP-name=dovecot-internal-name list. user_attrs = name=home=/var/data/vmail/private/%Ln, =spuser=private/%L{ldap:sAMAccountName} several masteruser passdbs passdb { args = /etc/dovecot/passwd.masteruser driver = passwd-file master = yes } passdb { args = /etc/dovecot/passwd.system driver = passwd-file master = yes } passdb { args = /etc/dovecot/passwd.email-shredder driver = passwd-file master = yes } passdb { args = /etc/dovecot/passwd.imap-set-del-flag driver = passwd-file master = yes } passdb { args = /etc/dovecot/dovecot-ldap-passdb.conf.ext driver = ldap } # contents of ldap-passdb.conf # LDAP base. base = dc=spdev, dc=local # Filter for user lookups. user_filter = ((sAMAccountName=%Ln)(!(userAccountControl:1.2.840.113556.1.4.803:=2))) protocols = imap service auth { unix_listener auth-client { group = mode = 0600 user = $default_internal_user } unix_listener auth-login { group = mode = 0600 user = $default_internal_user } unix_listener auth-master { group = mode = 0600 user = $default_internal_user } unix_listener auth-userdb { group = vmail mode = 0660 user = $default_internal_user } unix_listener login/login { group = mode = 0666 user = $default_internal_user } user = $default_internal_user } ## We use a global ACL file. where masterusers have different rights and the one mentioned is the only one that gets a ACL_GROUP in passdb. my guess: it might be related to the several masteruser passdbs point. but thats just a guess from the outside ;) hope this helps, if not let me know greetz Matze On Thu, 27 Aug 2015 14:37:59 +0300 Teemu Huovila teemu.huov...@dovecot.fi wrote: Hello Thank you for your report. We really appreciate it, especially when you can pinpoint a commit. However, I am unable to reproduce this. Could you post your doveconf -n please? Im especially interested in your passdb and userdb configurations and auth-cache settings. br, Teemu Huovila On 08/06/2015 01:07 PM, matthias lay wrote: hi timo, I checked out the commit causing this. its this one: http://hg.dovecot.org/dovecot-2.2/diff/5e445c659f89/src/auth/auth-request.c#l1.32 if I move this block back as it was. everything is fine diff -r a46620d6e0ff -r 5e445c659f89 src/auth/auth-request.c --- a/src/auth/auth-request.c Tue May 05 13:35:52 2015 +0300 +++ b/src/auth/auth-request.c Tue May 05 14:16:31 2015 +0300 @@ -618,30 +627,28 @@ auth_request_want_skip_passdb(request, next_passdb)) next_passdb = next_passdb-next; + if (*result == PASSDB_RESULT_OK) { + /* this passdb lookup succeeded, preserve its extra fields */ + auth_fields_snapshot(request-extra_fields); + request-snapshot_have_userdb_prefetch_set = + request-userdb_prefetch_set; +
Re: Mailbox can't be created
On 27/08/15 13:07, Muzaffer Tolga Ozses wrote: Make it 755 and be done with it. Unfortunately that doesn't work either. I still get that dovecot can't create mailbox. :-/
Re: Mailbox can't be created
Am 27.08.2015 um 13:46 schrieb Paulo Matos: On 27/08/15 10:42, Muzaffer Tolga Ozses wrote: Please check permissions as this sounds like a permissions issue m I am confused then. /home/vmail/Maildir is 700 for vmail:vmail. If dovecot-lda runs as vmail then there's no problem, if it runs as root it shouldn't face problems either. That statement is not correct nowadays as UNIX permissions aren't all any longer. There are tools like AppArmor and in your case with Fedora there is SELinux preventing even actions by root user. Make sure the SELinux context fits. /home/vmail and the subfolder Maildir has to be SELinux labeled correctly. ausearch -m avc How can I determine which user dovecot-lda runs under? Thanks, Alexander
Re: Panic in service(log)
Op 8/27/2015 om 6:17 PM schreef Eugene Paskevich: 27.08.2015, 16:09, Eugene Paskevich eug...@raptor.kiev.ua: Hello, I'm using the Debian builds of dovecot-2.2 by S[r]us. Today I started getting the following panic: log: Panic: file priorityq.c: line 122 (priorityq_remove_idx): assertion failed: (idx count) Just in case, here is the full backtrace. OK, that confirms my suspicion. Should be fixed now. Thanks. Regards, Stephan. (gdb) thread apply all bt full Thread 1 (LWP 28412): #0 0x7fe01d5df107 in raise () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. #1 0x7fe01d5e04e8 in abort () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. #2 0x7fe01d9d21a6 in default_fatal_finish (type=optimized out, status=status@entry=0) at failures.c:202 backtrace = 0x559b3daf8198 /usr/lib/dovecot/libdovecot.so.0(+0x7f1ae) [0x7fe01d9d21ae] - /usr/lib/dovecot/libdovecot.so.0(+0x7f29c) [0x7fe01d9d229c] - /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7fe01d97b81e] - /usr/lib/d... #3 0x7fe01d9d229c in i_internal_fatal_handler (ctx=0x7fffdc318f70, format=optimized out, args=optimized out) at failures.c:671 status = 0 #4 0x7fe01d97b81e in i_panic (format=format@entry=0x7fe01d9ff898 file %s: line %d (%s): assertion failed: (%s)) at failures.c:276 ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0, timestamp_usecs = 0} args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fffdc319070, reg_save_area = 0x7fffdc318fb0}} #5 0x7fe01d9f3de8 in priorityq_remove_idx (pq=0x559b3db007e0, idx=4294967295) at priorityq.c:122 pq = 0x559b3db007e0 idx = 4294967295 count = 1 #6 0x7fe01d9f3eeb in priorityq_remove (pq=optimized out, item=item@entry=0x559b3db221f0) at priorityq.c:138 No locals. #7 0x7fe01d9e479c in timeout_reset_timeval (timeout=0x559b3db221f0, tv_now=tv_now@entry=0x0) at ioloop.c:329 __FUNCTION__ = timeout_reset_timeval #8 0x7fe01d9e4b4d in timeout_reset (timeout=optimized out) at ioloop.c:336 __FUNCTION__ = timeout_reset #9 0x7fe01dd062a6 in index_mailbox_want_full_sync (box=box@entry=0x559b3db1c410, flags=flags@entry=(unknown: 0)) at index-sync.c:49 ibox = 0x559b3db1c888 #10 0x7fe01dcbbb60 in maildir_storage_sync_init (box=0x559b3db1c410, flags=(unknown: 0)) at maildir-sync.c:1101 mbox = 0x559b3db1c410 lost_files = false force_resync = false ret = 0 __FUNCTION__ = maildir_storage_sync_init #11 0x7fe01dc90bbb in mailbox_sync_init (box=box@entry=0x559b3db1c410, flags=flags@entry=(unknown: 0)) at mail-storage.c:1651 _data_stack_cur_id = 4 ctx = optimized out #12 0x559b3d622a01 in imap_sync_init (client=0x559b3db19010, box=optimized out, imap_flags=imap_flags@entry=(unknown: 0), flags=flags@entry=(unknown: 0)) at imap-sync.c:230 __FUNCTION__ = imap_sync_init #13 0x559b3d60f05e in idle_sync_now (box=optimized out, ctx=0x559b3db19d08) at cmd-idle.c:145 No locals. #14 0x559b3d60f35d in cmd_idle (cmd=0x559b3db19bf0) at cmd-idle.c:308 client = 0x559b3db19010 #15 0x559b3d61875c in command_exec (cmd=cmd@entry=0x559b3db19bf0) at imap-commands.c:168 hook = 0x559b3db01120 diff = optimized out finished = optimized out #16 0x559b3d616cf2 in client_command_input (cmd=cmd@entry=0x559b3db19bf0) at imap-client.c:821 client = 0x559b3db19010 command = optimized out __FUNCTION__ = client_command_input #17 0x559b3d616d80 in client_command_input (cmd=0x559b3db19bf0) at imap-client.c:881 client = 0x559b3db19010 command = optimized out __FUNCTION__ = client_command_input #18 0x559b3d6170ed in client_handle_next_command (remove_io_r=synthetic pointer, client=0x559b3db19010) at imap-client.c:919 No locals. #19 client_handle_input (client=0x559b3db19010) at imap-client.c:931 _data_stack_cur_id = 3 remove_io = false handled_commands = false client = 0x559b3db19010 #20 0x559b3d6174b5 in client_input (client=0x559b3db19010) at imap-client.c:973 cmd = 0xa51de output = 0x559b3db19a30 bytes = 8 __FUNCTION__ = client_input #21 0x7fe01d9e5b2c in io_loop_call_io (io=0x559b3db19b00) at ioloop.c:540 ioloop = 0x559b3db00770 t_id = 2 __FUNCTION__ = io_loop_call_io #22 0x7fe01d9e6e35 in io_loop_handler_run_internal (ioloop=ioloop@entry=0x559b3db00770) at ioloop-epoll.c:220 ctx = 0x559b3db01510 io = optimized out tv = {tv_sec = 1799, tv_usec = 999712} events_count = optimized out msecs = optimized out ret = 1 i = 0 j = optimized out call = optimized out __FUNCTION__ =
Allow delivery to existing accounts only with LDAP and static
Hi, we are using LDAP binding as a passdb, and static with allow_all_users=yes as an userdb. Works fine, but problem is, Maildirs are created for non-existent accounts too. We would like to prevent it. The LDAP binding does not supporta user lookups. Is the correct way to use checkpassword as a passdb before LDAP, check for account existency here and: result_success=continue result_failure=return-fail ? Thank you, regards, Miloslav
Re: Merging maildirs
On 08/27/2015 16:26, Petter Gunnerud wrote: Hi List How do I merge files from one maildir into another maildir? Long version: I've been using dovecot/postfix for a 12 user environment for several years, and today was the first time I ran into an issue I could not solve from reading the documentation. The server is gentoo running on esxi. A few times a year I've made a snapshot of the server and copied the files to my home esxi server as a full system backup. 5 days ago the internet connection at the office broke, and I decided to power on the last copy of the server at my home and change public dns so that users could access their new mails via webmail from this spare server. (I didn't allow imap through firewall.) Now the network at the office is back. DNS is updated so that mails are delivered to the office server again. But all the mails sent / received during those 5 days is only at my house. How can I merge those into the office server?I'd like to do this as a server administrator. I do not want to have each user forward the mails to them self from the temporarily webmail. I tried to just copy the mail files on my own account - like I did once when I used courier-imap, but that did not work with dovecot. I hope someone has an idea of how to solve this. Just using rsync should work - I've done it before. You'll have to check the file system permissions. The cleaner way would be to use imapsync or Dovecots dsync. signature.asc Description: OpenPGP digital signature
Re: Panic in service(log)
27.08.2015, 16:09, Eugene Paskevich eug...@raptor.kiev.ua: Hello, I'm using the Debian builds of dovecot-2.2 by S[r]us. Today I started getting the following panic: log: Panic: file priorityq.c: line 122 (priorityq_remove_idx): assertion failed: (idx count) Just in case, here is the full backtrace. (gdb) thread apply all bt full Thread 1 (LWP 28412): #0 0x7fe01d5df107 in raise () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. #1 0x7fe01d5e04e8 in abort () from /lib/x86_64-linux-gnu/libc.so.6 No symbol table info available. #2 0x7fe01d9d21a6 in default_fatal_finish (type=optimized out, status=status@entry=0) at failures.c:202 backtrace = 0x559b3daf8198 /usr/lib/dovecot/libdovecot.so.0(+0x7f1ae) [0x7fe01d9d21ae] - /usr/lib/dovecot/libdovecot.so.0(+0x7f29c) [0x7fe01d9d229c] - /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7fe01d97b81e] - /usr/lib/d... #3 0x7fe01d9d229c in i_internal_fatal_handler (ctx=0x7fffdc318f70, format=optimized out, args=optimized out) at failures.c:671 status = 0 #4 0x7fe01d97b81e in i_panic (format=format@entry=0x7fe01d9ff898 file %s: line %d (%s): assertion failed: (%s)) at failures.c:276 ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0, timestamp_usecs = 0} args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fffdc319070, reg_save_area = 0x7fffdc318fb0}} #5 0x7fe01d9f3de8 in priorityq_remove_idx (pq=0x559b3db007e0, idx=4294967295) at priorityq.c:122 pq = 0x559b3db007e0 idx = 4294967295 count = 1 #6 0x7fe01d9f3eeb in priorityq_remove (pq=optimized out, item=item@entry=0x559b3db221f0) at priorityq.c:138 No locals. #7 0x7fe01d9e479c in timeout_reset_timeval (timeout=0x559b3db221f0, tv_now=tv_now@entry=0x0) at ioloop.c:329 __FUNCTION__ = timeout_reset_timeval #8 0x7fe01d9e4b4d in timeout_reset (timeout=optimized out) at ioloop.c:336 __FUNCTION__ = timeout_reset #9 0x7fe01dd062a6 in index_mailbox_want_full_sync (box=box@entry=0x559b3db1c410, flags=flags@entry=(unknown: 0)) at index-sync.c:49 ibox = 0x559b3db1c888 #10 0x7fe01dcbbb60 in maildir_storage_sync_init (box=0x559b3db1c410, flags=(unknown: 0)) at maildir-sync.c:1101 mbox = 0x559b3db1c410 lost_files = false force_resync = false ret = 0 __FUNCTION__ = maildir_storage_sync_init #11 0x7fe01dc90bbb in mailbox_sync_init (box=box@entry=0x559b3db1c410, flags=flags@entry=(unknown: 0)) at mail-storage.c:1651 _data_stack_cur_id = 4 ctx = optimized out #12 0x559b3d622a01 in imap_sync_init (client=0x559b3db19010, box=optimized out, imap_flags=imap_flags@entry=(unknown: 0), flags=flags@entry=(unknown: 0)) at imap-sync.c:230 __FUNCTION__ = imap_sync_init #13 0x559b3d60f05e in idle_sync_now (box=optimized out, ctx=0x559b3db19d08) at cmd-idle.c:145 No locals. #14 0x559b3d60f35d in cmd_idle (cmd=0x559b3db19bf0) at cmd-idle.c:308 client = 0x559b3db19010 #15 0x559b3d61875c in command_exec (cmd=cmd@entry=0x559b3db19bf0) at imap-commands.c:168 hook = 0x559b3db01120 diff = optimized out finished = optimized out #16 0x559b3d616cf2 in client_command_input (cmd=cmd@entry=0x559b3db19bf0) at imap-client.c:821 client = 0x559b3db19010 command = optimized out __FUNCTION__ = client_command_input #17 0x559b3d616d80 in client_command_input (cmd=0x559b3db19bf0) at imap-client.c:881 client = 0x559b3db19010 command = optimized out __FUNCTION__ = client_command_input #18 0x559b3d6170ed in client_handle_next_command (remove_io_r=synthetic pointer, client=0x559b3db19010) at imap-client.c:919 No locals. #19 client_handle_input (client=0x559b3db19010) at imap-client.c:931 _data_stack_cur_id = 3 remove_io = false handled_commands = false client = 0x559b3db19010 #20 0x559b3d6174b5 in client_input (client=0x559b3db19010) at imap-client.c:973 cmd = 0xa51de output = 0x559b3db19a30 bytes = 8 __FUNCTION__ = client_input #21 0x7fe01d9e5b2c in io_loop_call_io (io=0x559b3db19b00) at ioloop.c:540 ioloop = 0x559b3db00770 t_id = 2 __FUNCTION__ = io_loop_call_io #22 0x7fe01d9e6e35 in io_loop_handler_run_internal (ioloop=ioloop@entry=0x559b3db00770) at ioloop-epoll.c:220 ctx = 0x559b3db01510 io = optimized out tv = {tv_sec = 1799, tv_usec = 999712} events_count = optimized out msecs = optimized out ret = 1 i = 0 j = optimized out call = optimized out __FUNCTION__ = io_loop_handler_run_internal #23 0x7fe01d9e5bb5 in io_loop_handler_run (ioloop=ioloop@entry=0x559b3db00770) at ioloop.c:588 No locals. #24 0x7fe01d9e5d58 in io_loop_run (ioloop=0x559b3db00770) at ioloop.c:564 __FUNCTION__ = io_loop_run #25
Re: IMAP hibernate feature committed
* Teemu Huovila teemu.huov...@dovecot.fi 2015.08.27 13:58: Did you specify a value other than zero for 'imap_hibernate_timeout'? Yes I did: $ doveconf imap_hibernate_timeout imap_hibernate_timeout = 1 mins I sometimes see one imap-hibernate process (only one), but several imap processes active which should be idling... signature.asc Description: Digital signature
Re: Mailbox can't be created
Please check permissions as this sounds like a permissions issue m On 27/08/2015 12:08 PM, Paulo Matos pa...@matos-sorge.com wrote: Hi, I have setup postfix master.cf to use dovecot-lda to deliver (using -m) all messages to PreInbox: dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -a ${recipient} -d ${user}@${nexthop} -m PreINBOX And enabled lda_mailbox_autocreate. The message I have now it: Aug 27 10:02:29 lda(): Info: msgid=dae42d0cf57bf4496a3dd53e162f8281@localhost.localdomain: save failed to open mailbox PreINBOX: Mailbox can't be created Aug 27 10:02:29 lda(): Info: msgid=dae42d0cf57bf4496a3dd53e162f8281@localhost.localdomain: saved mail to INBOX Why wouldn't dovecot itself be able to create mailboxes? I am using virtual domains and users on a mysql database through postfix and mailboxes saved in MailDir format. Configuration of dovecot is: # 2.2.18: /etc/dovecot/dovecot.conf # OS: Linux 4.1.5-x86_64-linode61 x86_64 Fedora release 22 (Twenty Two) ext4 auth_debug = yes auth_mechanisms = plain login digest-md5 cram-md5 auth_verbose = yes auth_verbose_passwords = yes default_internal_user = root imap_client_workarounds = delay-newmail tb-extra-mailbox-sep lda_mailbox_autocreate = yes mail_debug = yes mail_location = maildir:/home/vmail/%d/%n/Maildir maildir_very_dirty_syncs = yes mbox_write_locks = fcntl namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox Sent Messages { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = INBOX. separator = . type = private } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } postmaster_address = pmatos protocols = imap quota_full_tempfail = yes service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0666 user = postfix } unix_listener auth-master { mode = 0600 user = vmail } user = $default_internal_user } ssl = required ssl_cert = /etc/pki/dovecot/certs/dovecot.pem ssl_key = /etc/pki/dovecot/private/dovecot.pem userdb { args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes driver = static } protocol lda { auth_socket_path = /var/run/dovecot/auth-master deliver_log_format = msgid=%m: %$ log_path = /home/vmail/dovecot-deliver.log } protocol imap { mail_max_userip_connections = 100 } Regards, -- Paulo Matos
Re: question on autch cache parameters
Hello Thank you for your report. We really appreciate it, especially when you can pinpoint a commit. However, I am unable to reproduce this. Could you post your doveconf -n please? Im especially interested in your passdb and userdb configurations and auth-cache settings. br, Teemu Huovila On 08/06/2015 01:07 PM, matthias lay wrote: hi timo, I checked out the commit causing this. its this one: http://hg.dovecot.org/dovecot-2.2/diff/5e445c659f89/src/auth/auth-request.c#l1.32 if I move this block back as it was. everything is fine diff -r a46620d6e0ff -r 5e445c659f89 src/auth/auth-request.c --- a/src/auth/auth-request.c Tue May 05 13:35:52 2015 +0300 +++ b/src/auth/auth-request.c Tue May 05 14:16:31 2015 +0300 @@ -618,30 +627,28 @@ auth_request_want_skip_passdb(request, next_passdb)) next_passdb = next_passdb-next; + if (*result == PASSDB_RESULT_OK) { + /* this passdb lookup succeeded, preserve its extra fields */ + auth_fields_snapshot(request-extra_fields); + request-snapshot_have_userdb_prefetch_set = + request-userdb_prefetch_set; + if (request-userdb_reply != NULL) + auth_fields_snapshot(request-userdb_reply); + } else { + /* this passdb lookup failed, remove any extra fields it set */ + auth_fields_rollback(request-extra_fields); + if (request-userdb_reply != NULL) { + auth_fields_rollback(request-userdb_reply); + request-userdb_prefetch_set = + request-snapshot_have_userdb_prefetch_set; + } + } + if (passdb_continue next_passdb != NULL) { /* try next passdb. */ request-passdb = next_passdb; request-passdb_password = NULL; - if (*result == PASSDB_RESULT_OK) { - /* this passdb lookup succeeded, preserve its extra -fields */ - auth_fields_snapshot(request-extra_fields); - request-snapshot_have_userdb_prefetch_set = - request-userdb_prefetch_set; - if (request-userdb_reply != NULL) - auth_fields_snapshot(request-userdb_reply); - } else { - /* this passdb lookup failed, remove any extra fields -it set */ - auth_fields_rollback(request-extra_fields); - if (request-userdb_reply != NULL) { - auth_fields_rollback(request-userdb_reply); - request-userdb_prefetch_set = - request-snapshot_have_userdb_prefetch_set; - } - } - if (*result == PASSDB_RESULT_USER_UNKNOWN) { /* remember that we did at least one successful passdb lookup */ On 08/05/2015 05:33 PM, matthias lay wrote: just tested against dovecot 2.2.15 everythings works fine. so might be a bug introduced between 2.2.16 and 2.2.18 On 08/05/2015 04:30 PM, matthias lay wrote: Hi list, I have a question on auth caching in 2.2.18. I am using acl_groups for a master user, appended in a static userdb file # snip ### master@uma:{SHA}=::userdb_acl_groups=umareadmaster allow_nets=127.0.0.1 # snap ### and use this group in a global ACL file. I discovered this only works on first NOT-cached login environment in imap-postlogin script on first login: AUTH_TOKEN=e96b5a32ceb2cafc4460c210ad2e92e3d7ab388c MASTER_USER=master@uma SPUSER=private/pdf LOCAL_IP=127.0.0.1 USER=pdf AUTH_USER=master@uma PWD=/var/run/dovecot USERDB_KEYS=ACL_GROUPS HOME SPUSER MASTER_USER AUTH_TOKEN AUTH_USER SHLVL=1 HOME=/var/data/vmail/private/pdf ACL_GROUPS=umareadmaster IP=127.0.0.1 _=/usr/bin/env on the second cached login it looks like this AUTH_TOKEN=12703b11932f233520f6d4b33559c33aeb1cfc7f MASTER_USER=master@uma SPUSER=private/pdf LOCAL_IP=127.0.0.1 USER=pdf AUTH_USER=master@uma PWD=/var/run/dovecot USERDB_KEYS=HOME SPUSER MASTER_USER AUTH_TOKEN AUTH_USER SHLVL=1 HOME=/var/data/vmail/private/pdf IP=127.0.0.1 _=/usr/bin/env so the ACL_GROUPS is gone. is this intended to be like that. so groups not included in cache and I have to find another approach? anybody else encountered similar problems with some auth Variables and caching? Greetz Matze
Re: Mailbox can't be created
On 27/08/15 10:42, Muzaffer Tolga Ozses wrote: Please check permissions as this sounds like a permissions issue m I am confused then. /home/vmail/Maildir is 700 for vmail:vmail. If dovecot-lda runs as vmail then there's no problem, if it runs as root it shouldn't face problems either. How can I determine which user dovecot-lda runs under? Thanks, -- Paulo Matos
Re: IMAP hibernate feature committed
On 08/26/2015 01:33 PM, Thomas Leuxner wrote: * Timo Sirainen t...@iki.fi 2015.08.25 22:21: There's no good default setting here. It depends on your userdb settings and/or mail_uid setting. So for example if your imap processes are running as vmail user, you should set service imap-hibernate { unix_listener imap-hibernate { user = vmail } }. Then again if you are using system users (or otherwise multiple UIDs) it gets more difficult to implement this securely (mode=0666 works always, but security isn't too good). This same problem exists for various other parts of Dovecot, for example indexer-worker and dict services. I have it working (I guess) with these user settings (virtual users using 'vmail'): service imap-hibernate { unix_listener imap-hibernate { user = vmail } } I had to assign the imap-master socket the user the imap-hibernate process is using to avoid messages like this: Aug 25 23:16:02 nihlus dovecot: imap-hibernate(t...@leuxner.net): Error: net_connect_unix(/var/run/dovecot/imap-master) failed: Permission denied Aug 25 23:16:02 nihlus dovecot: imap-hibernate(t...@leuxner.net): Failed to connect to master socket in=126 out=944 hdr=0 body=0 del=0 exp=0 trash=0 service imap { unix_listener imap-master { user = dovecot } } With this I see messages like this in the logs: Aug 26 09:48:06 nihlus dovecot: imap-hibernate(t...@leuxner.net): Connection closed in=189 out=4252 hdr=0 body=0 del=0 exp=0 trash=0 Aug 26 12:20:29 nihlus dovecot: imap-hibernate(t...@leuxner.net): Connection closed in=109 out=4714 hdr=0 body=0 del=0 exp=0 trash=0 I'm a bit puzzled as to when hibernate actually kicks in because most of the time I see normal imap processes running without them being hibernated: Did you specify a value other than zero for 'imap_hibernate_timeout'? br, Teemu $ ps aux | grep dovecot/imap dovenull 6791 0.0 0.0 18196 4772 ?S06:39 0:00 dovecot/imap-login dovenull 7107 0.0 0.0 18196 4736 ?S08:00 0:00 dovecot/imap-login dovenull 7112 0.0 0.0 18332 4492 ?S08:00 0:00 dovecot/imap-login dovenull 7333 0.0 0.0 18332 4772 ?S08:45 0:00 dovecot/imap-login dovenull 7675 0.0 0.0 18196 4628 ?S10:13 0:00 dovecot/imap-login dovenull 7677 0.0 0.0 18332 4532 ?S10:14 0:00 dovecot/imap-login dovenull 7821 0.0 0.0 18196 4532 ?S10:44 0:00 dovecot/imap-login dovenull 8156 0.0 0.0 18196 4756 ?S12:01 0:00 dovecot/imap-login vmail 8157 0.0 0.0 45624 9608 ?S12:01 0:00 dovecot/imap dovenull 8158 0.0 0.0 18332 4628 ?S12:01 0:00 dovecot/imap-login vmail 8159 0.0 0.0 44772 9256 ?S12:01 0:00 dovecot/imap dovenull 8160 0.0 0.0 18196 4652 ?S12:01 0:00 dovecot/imap-login vmail 8161 0.0 0.0 46072 9760 ?S12:01 0:00 dovecot/imap dovenull 8162 0.0 0.0 18196 4548 ?S12:01 0:00 dovecot/imap-login dovenull 8279 0.0 0.0 18332 4736 ?S12:22 0:00 dovecot/imap-login vmail 8280 0.0 0.0 40712 5164 ?S12:22 0:00 dovecot/imap dovenull 8341 0.0 0.0 18196 4740 ?S12:25 0:00 dovecot/imap-login vmail 8344 0.0 0.0 46312 10568 ?S12:25 0:00 dovecot/imap
Mailbox can't be created
Hi, I have setup postfix master.cf to use dovecot-lda to deliver (using -m) all messages to PreInbox: dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -a ${recipient} -d ${user}@${nexthop} -m PreINBOX And enabled lda_mailbox_autocreate. The message I have now it: Aug 27 10:02:29 lda(): Info: msgid=dae42d0cf57bf4496a3dd53e162f8281@localhost.localdomain: save failed to open mailbox PreINBOX: Mailbox can't be created Aug 27 10:02:29 lda(): Info: msgid=dae42d0cf57bf4496a3dd53e162f8281@localhost.localdomain: saved mail to INBOX Why wouldn't dovecot itself be able to create mailboxes? I am using virtual domains and users on a mysql database through postfix and mailboxes saved in MailDir format. Configuration of dovecot is: # 2.2.18: /etc/dovecot/dovecot.conf # OS: Linux 4.1.5-x86_64-linode61 x86_64 Fedora release 22 (Twenty Two) ext4 auth_debug = yes auth_mechanisms = plain login digest-md5 cram-md5 auth_verbose = yes auth_verbose_passwords = yes default_internal_user = root imap_client_workarounds = delay-newmail tb-extra-mailbox-sep lda_mailbox_autocreate = yes mail_debug = yes mail_location = maildir:/home/vmail/%d/%n/Maildir maildir_very_dirty_syncs = yes mbox_write_locks = fcntl namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox Sent Messages { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = INBOX. separator = . type = private } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } postmaster_address = pmatos protocols = imap quota_full_tempfail = yes service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0666 user = postfix } unix_listener auth-master { mode = 0600 user = vmail } user = $default_internal_user } ssl = required ssl_cert = /etc/pki/dovecot/certs/dovecot.pem ssl_key = /etc/pki/dovecot/private/dovecot.pem userdb { args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes driver = static } protocol lda { auth_socket_path = /var/run/dovecot/auth-master deliver_log_format = msgid=%m: %$ log_path = /home/vmail/dovecot-deliver.log } protocol imap { mail_max_userip_connections = 100 } Regards, -- Paulo Matos
Re: Mailbox can't be created
ps aux | grep lda On 27/08/2015 2:58 PM, Paulo Matos pa...@matos-sorge.com wrote: On 27/08/15 10:42, Muzaffer Tolga Ozses wrote: Please check permissions as this sounds like a permissions issue m I am confused then. /home/vmail/Maildir is 700 for vmail:vmail. If dovecot-lda runs as vmail then there's no problem, if it runs as root it shouldn't face problems either. How can I determine which user dovecot-lda runs under? Thanks, -- Paulo Matos
Re: Mailbox can't be created
Having said that, /home/vmail should be owned by vmail, however dovecot-lda should have write access so 700 is a bad idea. On 27/08/2015 3:00 PM, Muzaffer Tolga Ozses to...@ozses.net wrote: ps aux | grep lda On 27/08/2015 2:58 PM, Paulo Matos pa...@matos-sorge.com wrote: On 27/08/15 10:42, Muzaffer Tolga Ozses wrote: Please check permissions as this sounds like a permissions issue m I am confused then. /home/vmail/Maildir is 700 for vmail:vmail. If dovecot-lda runs as vmail then there's no problem, if it runs as root it shouldn't face problems either. How can I determine which user dovecot-lda runs under? Thanks, -- Paulo Matos
Re: Mailbox can't be created
On 27/08/15 12:46, Paulo Matos wrote: On 27/08/15 10:42, Muzaffer Tolga Ozses wrote: Please check permissions as this sounds like a permissions issue m I am confused then. /home/vmail/Maildir is 700 for vmail:vmail. If dovecot-lda runs as vmail then there's no problem, if it runs as root it shouldn't face problems either. How can I determine which user dovecot-lda runs under? Doh, it says on the line I quoted earlier from master.cf: dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -a ${recipient} -d ${user}@${nexthop} -m PreINBOX It runs under vmail:vmail. There should be no problem creating a new mailbox. Is there a way to understand what's really going on with dovecot? Thanks,
Re: Mailbox can't be created
Make it 755 and be done with it. On 27/08/2015 3:05 PM, Paulo Matos pa...@matos-sorge.com wrote: On 27/08/15 12:46, Paulo Matos wrote: On 27/08/15 10:42, Muzaffer Tolga Ozses wrote: Please check permissions as this sounds like a permissions issue m I am confused then. /home/vmail/Maildir is 700 for vmail:vmail. If dovecot-lda runs as vmail then there's no problem, if it runs as root it shouldn't face problems either. How can I determine which user dovecot-lda runs under? Doh, it says on the line I quoted earlier from master.cf: dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -a ${recipient} -d ${user}@${nexthop} -m PreINBOX It runs under vmail:vmail. There should be no problem creating a new mailbox. Is there a way to understand what's really going on with dovecot? Thanks,
Re: mailbox deletion is not replicated correctly
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/14/2015 10:35 AM, Andre Helwig wrote: On 04/17/2015 12:07 PM, Dennis Kuhn wrote: On 16.04.2015 20:32, Timo Sirainen wrote: On 16 Apr 2015, at 19:22, Dennis Kuhn d.k...@heinlein-support.de wrote: i can't delete several folders at once. I have a folder structure like folder1/folder2/folder3 (we use slash as hierarchy separator). When i delete folder1 server1 executes the command correctly Apr 16 13:44:28 server1 dovecot: imap(d.k...@heinlein-support.de): Mailbox deleted: INBOX/Trash/folder1/folder2/folder3 Apr 16 13:44:28 server1 dovecot: imap(d.k...@heinlein-support.de): Mailbox deleted: INBOX/Trash/folder1/folder2 Apr 16 13:44:28 server1 dovecot: imap(d.k...@heinlein-support.de): Mailbox deleted: INBOX/Trash/folder1 but the replica server2 reverses the order: Apr 16 13:44:29 server2 dovecot: dsync-server(d.k...@heinlein-support.de): Mailbox deleted: INBOX/Trash/folder1 Apr 16 13:44:29 server2 dovecot: dsync-server(d.k...@heinlein-support.de): Mailbox deleted: INBOX/Trash/folder1/folder2 Apr 16 13:44:29 server2 dovecot: dsync-server(d.k...@heinlein-support.de): Mailbox deleted: INBOX/Trash/folder1/folder2/folder3 This creates the folder INBOX/Trash/folder1/folder2 on server2 again which replicates back to server1. With what Dovecot version? What mailbox format? The mailbox format is mdbox. Server1 is 2.2.15, server2 2.2.16. Hi Timo, is there any update on this issue? cheers Andre Just want to bring it to your attention again. - -- Heinlein Support GmbH Schwedter Str. 8/9b, 10119 Berlin http://www.heinlein-support.de Tel: 030 / 405051-0 Fax: 030 / 405051-19 Zwangsangaben lt. §35a GmbHG: HRB 93818 B / Amtsgericht Berlin-Charlottenburg, Geschäftsführer: Peer Heinlein -- Sitz: Berlin -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.22 (GNU/Linux) iQEcBAEBAgAGBQJV3v34AAoJEAoTNwRDnEhRx+0H/01YT39mvkgwgDGAUQzVtaKJ 0lZZJzkMwua6qOBRWGsiK8jH5PYvOWdRjbRxVE5y1H8n8/CLNCJ3nkpvuDu/vMf3 8A4i/DqHy+Dvof+3AagECGLnqdvCi9zcqTgE3Vu9dJyEUzK7A1y1sxLB8CN6GBo2 LBXsrHUWi+eBLDkQdR94LaA6Ssa8TMnSr6ZcpbRmx+bR54uzJ6jwUcmO6db2osqC ESl42Vov0Yps0tp0h7sz+qRmSnIDpAatJys/qjKvZmr+WawC4g5vGcT7Bv33WevC JHt10YOOcftIGZE2zZGo9UyCOHjmnWiluk3toIOdBr4FAVNZhrQj8pplol8m+jU= =ZiRI -END PGP SIGNATURE-
Re: Mailbox can't be created
On 27/08/15 13:00, Muzaffer Tolga Ozses wrote: ps aux | grep lda Strange... postfix 1315 0.0 0.1 121220 7472 ?S12:59 0:00 pipe -n dovecot -t unix flags=DRhu user=vmail vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -a ${recipient} -d ${user}@${nexthop} -m PreINBOX I notice that the arg to pipe is 'user=vmail vmail' instead of 'user=vmail:vmail'. This is strange. I certanly have a colon on the master.cf file. According to 'man pipe' the correct syntax is user=user:group so I can only assume this is where it's going wrong somehow. On 27/08/2015 2:58 PM, Paulo Matos pa...@matos-sorge.com wrote: On 27/08/15 10:42, Muzaffer Tolga Ozses wrote: Please check permissions as this sounds like a permissions issue m I am confused then. /home/vmail/Maildir is 700 for vmail:vmail. If dovecot-lda runs as vmail then there's no problem, if it runs as root it shouldn't face problems either. How can I determine which user dovecot-lda runs under? Thanks, -- Paulo Matos
Re: Mailbox can't be created
dovecot-lda is being executed as vmail so it shouldn't be a problem in theory. On 27/08/2015 13:03, Muzaffer Tolga Ozses wrote: Having said that, /home/vmail should be owned by vmail, however dovecot-lda should have write access so 700 is a bad idea. On 27/08/2015 3:00 PM, Muzaffer Tolga Ozses to...@ozses.net wrote: ps aux | grep lda On 27/08/2015 2:58 PM, Paulo Matos pa...@matos-sorge.com wrote: On 27/08/15 10:42, Muzaffer Tolga Ozses wrote: Please check permissions as this sounds like a permissions issue m I am confused then. /home/vmail/Maildir is 700 for vmail:vmail. If dovecot-lda runs as vmail then there's no problem, if it runs as root it shouldn't face problems either. How can I determine which user dovecot-lda runs under? Thanks, -- Paulo Matos -- Paulo Matos