Re: Cannot delete IMAP Mail-Folder in Trash

2018-02-07 Thread Gabriel Kaufmann
Finally I was able to resolve the issue. I had to do close Thunderbird. 
Delete the misbehaving folders on imap-server Maildir/Trash. Start 
Thunderbird, did "Repair" on Trash folder after that and the files were 
gone!


There's only one waisted "ghost" folder shown for renew subscription 
(grayed out) that does not exist on imap-server. But it's not shown in 
my Trash-Folder anymore! So that's a good success.


I hope deleting folders in future won't make the problem reappear.


Best regards

Gabriel Kaufmann



Re: Cannot delete IMAP Mail-Folder in Trash

2018-02-07 Thread Gabriel Kaufmann



I have the same Problem with thunderbird on Linux.

It looks like thunderbirds imap-implementation is a little bit broken. 
Even if thunderbird tried once to get a mailbox, it persists in the 
profile.


I have FS-Layout in dovecot. Thunderbird somtimes try to get a 
submailbox with INBOX/firstlevel^secondlevel^thirdlevel


Then it doesn't find this mailbox on the server (for sure, it's 
INBOX/firstlevel/secondlevel/thirdlevel) tb tries to get next


INBOX/firstlevel^^secondlevel^^thirdlevel

and then INBOX/firstlevelsecondlevelthirdlevel and so on. And 
on each first login, tb tries to get all of them again and again...



Go to $TB-profilefolder/ImapMail/ and delete all of the *.msf files 
and search for the wrong mailboxes, described above... you will finde 
them.


And they are probably also in some config-files in the profile. 
user.prefs i think, and panacea.dat i could find them.


Delete all of the entries (be careful). Close and restart firefox. 
Good look, the phantom-folders are gone.



jakob


I tried that. In addition to that I did Trash -> Context-Menu -> 
Settings and "Repair". I also deleted Trash.sdb and Trash.msf in 
ImapMail-Dir of given Mailbox (after closing Thunderbird of course and 
restart afterwards). I think the repair-button does more or less the 
same than deleting msf-files.


Trash was rebuilding... but the Folders are still there. I was able to 
get rid of some other "Junk folders" (that not even where shown in my 
Thunderbird-Trash inside Trash.sdb folder). But the folders causing 
current issue are still present after sync! And on server-side (vmail 
Mailbox on imap-server) these folders are also there!


I'm still not able to delete them in Thunderbird. Still getting error 
Folder contains children, delete them first". Obviously this isn't 
possible as those sub-folders are not shown in Thunderbird! On 
server-side of imap (vmail Mailbox) there are in fact sub-folders in 
those folders.



Best regards

Gabriel Kaufmann



Re: 2.3.1/0.5.1?

2018-02-07 Thread Aki Tuomi
Yes. We are hoping to release it before end of Q1.
---Aki TuomiDovecot oy
 Original message From: Larry Rosenman  
Date: 07/02/2018  22:08  (GMT+02:00) To: Dovecot Mailing List 
 Subject: 2.3.1/0.5.1? 
Timo & Company,     There have been a ton of fixes since 2.3.0.  Is there a 
2.3.1 of Dovecot and 0.5.1 of pigeonhole on the near horizon?
Thanks!(Your FreeBSD Port Maintainer for Pigeonhole)

-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 214-642-9640 (c)     E-Mail: larry...@gmail.com
US Mail: 5708 Sabbia Dr, Round Rock, TX 78665-2106



2.3.1/0.5.1?

2018-02-07 Thread Larry Rosenman
Timo & Company,
 There have been a ton of fixes since 2.3.0.  Is there a 2.3.1 of
Dovecot and 0.5.1 of pigeonhole on the near horizon?

Thanks!
(Your FreeBSD Port Maintainer for Pigeonhole)

-- 
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 (c) E-Mail: larry...@gmail.com
US Mail: 5708 Sabbia Dr, Round Rock, TX 78665-2106


Re: Cannot delete IMAP Mail-Folder in Trash

2018-02-07 Thread Jakobus Schürz

I have the same Problem with thunderbird on Linux.

It looks like thunderbirds imap-implementation is a little bit broken. 
Even if thunderbird tried once to get a mailbox, it persists in the profile.


I have FS-Layout in dovecot. Thunderbird somtimes try to get a 
submailbox with INBOX/firstlevel^secondlevel^thirdlevel


Then it doesn't find this mailbox on the server (for sure, it's 
INBOX/firstlevel/secondlevel/thirdlevel) tb tries to get next


INBOX/firstlevel^^secondlevel^^thirdlevel

and then INBOX/firstlevelsecondlevelthirdlevel and so on. And on 
each first login, tb tries to get all of them again and again...



Go to $TB-profilefolder/ImapMail/ and delete all of the *.msf files and 
search for the wrong mailboxes, described above... you will finde them.


And they are probably also in some config-files in the profile. 
user.prefs i think, and panacea.dat i could find them.


Delete all of the entries (be careful). Close and restart firefox. Good 
look, the phantom-folders are gone.



jakob


Am 06.02.2018 um 07:15 schrieb Rupert Gallagher:
We have the same problem, with a twist. When Thunderbird deletes a 
folder, it is still shown by the GUI. Dovecot deleted the folder 
correctly, and the sunscriptions file is also correct. Some other 
times, on shared folders, Thunderbird refuses to delete; in this case, 
apple mail on iphone can delete successfully. This suggests that the 
problem is in Thunderbird's code.


R


On Mon, Feb 5, 2018 at 21:55, Remko Lodder > wrote:
On 5 Feb 2018, at 17:32, Aki Tuomi > wrote:
On February 5, 2018 at 6:16 PM Gabriel Kaufmann 
> wrote:



Doesn't anyone have an idea?

It looks like Dovecot and/or Thunderbird simply "ignore" 
sub-folders of

IMAP-Folder in Trash/ as they are also not shown in Trash-Folder.
Sub-Folder for INBOX and other IMAP-Folders work perfect (using
layout=fs Mailbox).

Why doesn't this work for Trash?

Best regards

Gabriel Kaufmann



Can you try running this as root and provide output?

doveadm -Dv -o mail_debug=yes mailbox delete -u username 
Trash/Somefolder


Aki



I had the same with Mac Mail.app. I decided to rm -rf the sdbox file 
on the master and replica and I won.

It was persistant though and I think it had to do with the following:

I let my mail deliver in yearboxes, which have many many subfolders, 
some are just "placeholders". They appear different in the view.
Regular mailboxes are "dark" in colors, placeholder boxes are "white" 
in colors (see attachment), where winkels is the "placeholder" folder 
and "action" is the regular mailbox in which mail gets delivered.


I could not get rid of those "winkels" kind of folders". Only by 
force removing them from the filesystem hierarchie.


Hope this helps a bit :)

Cheers
Remko







dovecot-2.22.33.2, segfault on empty emails

2018-02-07 Thread Marcin Mirosław
Hello!
I'm using maildir format with zlib_save=bz2. Here is the way how I generate 
empty mails and this leads to segfault:
create empty message:
# echo -n "" | /usr/libexec/dovecot/dovecot-lda -d mar...@mejor.pl

this creates empy email in maildir (size 14B):
# ls -l 1518011524.M96165P15900.jowisz\,S\=0\,W\=0\:2\,
-rwxrw+ 1 mail mail 14 Feb  7 14:52 
'1518011524.M96165P15900.jowisz,S=0,W=0:2,'

# file 1518011524.M96165P15900.jowisz\,S\=0\,W\=0\:2\,
1518011524.M96165P15900.jowisz,S=0,W=0:2,: bzip2 compressed data, block size = 
200k

next I'm accesing to Inbox, deleting mail using Thunderbird. Since message is 
moved to Trash I'm getting segfaults,
backtrace:

Reading symbols from /usr/libexec/dovecot/imap...Reading symbols from 
/usr/lib64/debug//usr/libexec/dovecot/imap.debug...done.
done.
[New LWP 16520]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `dovecot/imap'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51  }
(gdb) #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x7f744769e12a in __GI_abort () at abort.c:89
#2  0x7f7447adab79 in default_fatal_finish (type=LOG_TYPE_PANIC, 
status=status@entry=0) at failures.c:201
#3  0x7f7447adacd3 in i_internal_fatal_handler (ctx=0x7ffc16d911e0, 
format=, args=) at failures.c:670
#4  0x7f7447a5108c in i_panic (format=format@entry=0x7f7447e9ed40 "file %s: 
line %d (%s): assertion failed: (%s)") at failures.c:275
#5  0x7f7447e85108 in mail_index_transaction_get_uid 
(t=t@entry=0x55a2a17c3c30, seq=) at 
mail-index-transaction-finish.c:185
#6  0x7f7447e8517a in mail_index_convert_to_uids (t=t@entry=0x55a2a17c3c30, 
array=array@entry=0x55a2a17e2c90) at mail-index-transaction-finish.c:205
#7  0x7f7447e858df in mail_index_transaction_convert_to_uids 
(t=0x55a2a17c3c30) at mail-index-transaction-finish.c:313
#8  mail_index_transaction_finish (t=t@entry=0x55a2a17c3c30) at 
mail-index-transaction-finish.c:345
#9  0x7f7447e8b783 in mail_index_transaction_commit_real 
(commit_size_r=0x7ffc16d91490, t=0x55a2a17c3c30) at mail-index-transaction.c:197
#10 mail_index_transaction_commit_v (t=, 
result_r=0x7ffc16d91480) at mail-index-transaction.c:239
#11 0x7f7447e8be4e in mail_index_transaction_commit_full 
(_t=_t@entry=0x7ffc16d914d0, result_r=result_r@entry=0x7ffc16d91480) at 
mail-index-transaction.c:298
#12 0x7f7447e8bf0b in mail_index_transaction_commit 
(t=t@entry=0x7ffc16d914d0) at mail-index-transaction.c:272
#13 0x7f7447e71bef in mail_cache_set_seq_corrupted_reason 
(cache_view=cache_view@entry=0x55a2a17cf140, seq=362, reason=) 
at mail-cache.c:71
#14 0x7f7447dd0d34 in mail_set_mail_cache_corrupted (mail=0x55a2a17d7118, 
fmt=0x7f7447eb1bab "Broken %s in mailbox %s: %s") at mail-storage.c:2828
#15 0x7f7447dfb88a in maildir_mail_set_cache_corrupted_reason 
(_mail=0x55a2a17d7118, field=MAIL_FETCH_PHYSICAL_SIZE,
reason=0x55a2a1706678 
"read(/dane/domeny/mejor.pl/mail/marcin/.maildir/.Trash/tmp/1518011650.M572516P16520.jowisz)
 failed: Cached message size smaller than expected (0 < 14, box=Trash, UID=0)") 
at maildir-mail.c:770
#16 0x7f7447e6ac52 in i_stream_mail_set_size_corrupted 
(mstream=mstream@entry=0x55a2a18014f0, size=size@entry=14) at istream-mail.c:95
#17 0x7f7447e6ae5b in i_stream_mail_read (stream=0x55a2a18014f0) at 
istream-mail.c:121
#18 0x7f7447ae9c84 in i_stream_read (stream=stream@entry=0x55a2a1801560) at 
istream.c:174
#19 0x7f7447aeaa3d in i_stream_read_data (stream=0x55a2a1801560, 
data_r=data_r@entry=0x7ffc16d917a8, size_r=size_r@entry=0x7ffc16d917b0, 
threshold=threshold@entry=1) at istream.c:569
#20 0x7f7447abc27f in message_parse_header_next (ctx=0x55a2a17c04c0, 
hdr_r=hdr_r@entry=0x7ffc16d91810) at message-header-parser.c:84
#21 0x7f7447abcc9f in message_parse_header (input=, 
hdr_size=hdr_size@entry=0x55a2a17d7398,
flags=flags@entry=(MESSAGE_HEADER_PARSER_FLAG_SKIP_INITIAL_LWSP | 
MESSAGE_HEADER_PARSER_FLAG_DROP_CR), callback=callback@entry=0x7f7447e50210 
,
context=context@entry=0x55a2a17d7118) at message-header-parser.c:391
#22 0x7f7447e504f4 in index_mail_parse_headers 
(mail=mail@entry=0x55a2a17d7118, headers=0x55a2a1800f08,
reason=reason@entry=0x55a2a1706618 "header Message-ID (Mail not cached, 
highest cached seq=361 uid=289064: reset_id=1312894688)") at 
index-mail-headers.c:460
#23 0x7f7447e50b10 in index_mail_get_raw_headers 
(mail=mail@entry=0x55a2a17d7118, field=field@entry=0x7f744476ba33 "Message-ID", 
value_r=value_r@entry=0x7ffc16d91960)
at index-mail-headers.c:659
#25 0x7f7447dbc1ac in mail_get_first_header 
(mail=mail@entry=0x55a2a17d7118, field=field@entry=0x7f744476ba33 "Message-ID", 
value_r=value_r@entry=0x7ffc16d919e0) at mail.c:191
#26 0x7f744476aaf9 in mail_log_append_mail_header 
(str=str@entry=0x55a2a17064f8, 

Re: BUG: panic when using fs:posix as dict for acl_shared_dict

2018-02-07 Thread Marco Giunta

On 2018-02-07 13:23, Aki Tuomi wrote:

  Maybe you can
use sqlite3 instead as workaround?


Ok, I've done what you suggested; I had some permissions problems on 
sqlite file/directory, but now it seems to work.


Thanks for your advice,
  Marco

--
Marco Giunta - ITCS SysAdmin
Via Bonomea, 265
34136 - Trieste, Italy
Tel: +39-040-3787-503
Fax: +39-040-3787-244


Re: BUG: panic when using fs:posix as dict for acl_shared_dict

2018-02-07 Thread Marco Giunta

On 2018-02-07 13:23, Aki Tuomi wrote:

Maybe you can
use sqlite3 instead as workaround?


Ok, I try it and let you know.

Thanks,
  Marco

--
Marco Giunta - ITCS SysAdmin
Via Bonomea, 265
34136 - Trieste, Italy
Tel: +39-040-3787-503
Fax: +39-040-3787-244


Re: BUG: panic when using fs:posix as dict for acl_shared_dict

2018-02-07 Thread Aki Tuomi
Hi!

Thank you for reporting this issue. We'll look into it. Maybe you can
use sqlite3 instead as workaround?

Aki


On 07.02.2018 14:22, Marco Giunta wrote:
> Hi,
> I'm using Dovecot 2.2.33.2 on a RHEL 7, new installation. When I use
> fs:posix as dict for acl_shared_dict, like in Dovecot wiki
> (https://wiki.dovecot.org/SharedMailboxes/ClusterSetup),
> doveadm-server crash with error:
>
> # doveadm acl set -u USERNAME FOLDER user=DEST_USERNAME lookup read
> write-seen
>
> doveadm(USERNAME): Panic: file dict-fs.c: line 127
> (fs_dict_iterate_init): assertion failed: ((flags &
> DICT_ITERATE_FLAG_RECURSE) == 0)
> doveadm(USERNAME): Error: Raw backtrace:
> /usr/lib64/dovecot/libdovecot.so.0(+0x9f3de) [0x7f0e4a4b23de] ->
> /usr/lib64/dovecot/libdovecot.so.0(default_fatal_handler+0x2a)
> [0x7f0e4a4b244a] -> /usr/lib64/dovecot/libdovecot.so.0(i_fatal+0)
> [0x7f0e4a44377c] -> /usr/lib64/dovecot/libdovecot.so.0(+0x31688)
> [0x7f0e4a444688] ->
> /usr/lib64/dovecot/libdovecot.so.0(dict_iterate_init_multiple+0x4d)
> [0x7f0e4a47cadd] ->
> /usr/lib64/dovecot/libdovecot.so.0(dict_iterate_init+0x29)
> [0x7f0e4a47cb89] ->
> /usr/lib64/dovecot/lib01_acl_plugin.so(acl_lookup_dict_rebuild+0x3e1)
> [0x7f0e49a40371] ->
> /usr/lib64/dovecot/lib01_acl_plugin.so(acl_backend_vfile_acllist_rebuild+0x488)
> [0x7f0e49a3dd18] ->
> /usr/lib64/dovecot/lib01_acl_plugin.so(acl_backend_vfile_object_update+0x3c7)
> [0x7f0e49a3e867] ->
> /usr/lib64/dovecot/lib01_acl_plugin.so(acl_mailbox_update_acl+0x68)
> [0x7f0e49a41e28] ->
> /usr/lib64/dovecot/doveadm/lib10_doveadm_acl_plugin.so(+0x2c11)
> [0x7f0e48da1c11] ->
> /usr/lib64/dovecot/doveadm/lib10_doveadm_acl_plugin.so(+0x3060)
> [0x7f0e48da2060] -> doveadm(+0x2b41c) [0x556f1280b41c] ->
> doveadm(+0x2c01a) [0x556f1280c01a] ->
> doveadm(doveadm_cmd_ver2_to_mail_cmd_wrapper+0x23b) [0x556f1280ce7b]
> -> doveadm(doveadm_cmd_run_ver2+0x50c) [0x556f1281c73c] ->
> doveadm(doveadm_cmd_try_run_ver2+0x37) [0x556f1281c7d7] ->
> doveadm(main+0x1e4) [0x556f127fb944] ->
> /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f0e4a071c05] ->
> doveadm(+0x1bd35) [0x556f127fbd35]
> Aborted
>
> Attached coredump and configuration.
>
> I'm not a programmer, but seems that assert is raised by
> 'fs_dict_iterate_init' function inside 'src/lib-dict-extra/dict-fs.c':
>
> static struct dict_iterate_context *
> fs_dict_iterate_init(struct dict *_dict, const char *const *paths,
>  enum dict_iterate_flags flags)
> {
> ...
>     /* these flags are not supported for now */
> i_assert((flags & DICT_ITERATE_FLAG_RECURSE) == 0);
> ...
>
>
> because it is called by 'acl_lookup_dict_iterate_read' function in
> file 'src/plugins/acl/acl-lookup-dict.c'
>
> static void acl_lookup_dict_iterate_read(struct acl_lookup_dict_iter
> *iter)
> {
> ...
> dict_iter = dict_iterate_init(iter->dict->dict, prefix,
>   DICT_ITERATE_FLAG_RECURSE);
> ...
>
> with DICT_ITERATE_FLAG_RECURSE set.
>
>
> Same problem also with Dovecot 2.3.0.
>
> Thanks,
>   Marco
>
>



BUG: panic when using fs:posix as dict for acl_shared_dict

2018-02-07 Thread Marco Giunta

Hi,
I'm using Dovecot 2.2.33.2 on a RHEL 7, new installation. When I use 
fs:posix as dict for acl_shared_dict, like in Dovecot wiki 
(https://wiki.dovecot.org/SharedMailboxes/ClusterSetup), doveadm-server 
crash with error:


# doveadm acl set -u USERNAME FOLDER user=DEST_USERNAME lookup read 
write-seen


doveadm(USERNAME): Panic: file dict-fs.c: line 127 
(fs_dict_iterate_init): assertion failed: ((flags & 
DICT_ITERATE_FLAG_RECURSE) == 0)
doveadm(USERNAME): Error: Raw backtrace: 
/usr/lib64/dovecot/libdovecot.so.0(+0x9f3de) [0x7f0e4a4b23de] -> 
/usr/lib64/dovecot/libdovecot.so.0(default_fatal_handler+0x2a) 
[0x7f0e4a4b244a] -> /usr/lib64/dovecot/libdovecot.so.0(i_fatal+0) 
[0x7f0e4a44377c] -> /usr/lib64/dovecot/libdovecot.so.0(+0x31688) 
[0x7f0e4a444688] -> 
/usr/lib64/dovecot/libdovecot.so.0(dict_iterate_init_multiple+0x4d) 
[0x7f0e4a47cadd] -> 
/usr/lib64/dovecot/libdovecot.so.0(dict_iterate_init+0x29) 
[0x7f0e4a47cb89] -> 
/usr/lib64/dovecot/lib01_acl_plugin.so(acl_lookup_dict_rebuild+0x3e1) 
[0x7f0e49a40371] -> 
/usr/lib64/dovecot/lib01_acl_plugin.so(acl_backend_vfile_acllist_rebuild+0x488) 
[0x7f0e49a3dd18] -> 
/usr/lib64/dovecot/lib01_acl_plugin.so(acl_backend_vfile_object_update+0x3c7) 
[0x7f0e49a3e867] -> 
/usr/lib64/dovecot/lib01_acl_plugin.so(acl_mailbox_update_acl+0x68) 
[0x7f0e49a41e28] -> 
/usr/lib64/dovecot/doveadm/lib10_doveadm_acl_plugin.so(+0x2c11) 
[0x7f0e48da1c11] -> 
/usr/lib64/dovecot/doveadm/lib10_doveadm_acl_plugin.so(+0x3060) 
[0x7f0e48da2060] -> doveadm(+0x2b41c) [0x556f1280b41c] -> 
doveadm(+0x2c01a) [0x556f1280c01a] -> 
doveadm(doveadm_cmd_ver2_to_mail_cmd_wrapper+0x23b) [0x556f1280ce7b] -> 
doveadm(doveadm_cmd_run_ver2+0x50c) [0x556f1281c73c] -> 
doveadm(doveadm_cmd_try_run_ver2+0x37) [0x556f1281c7d7] -> 
doveadm(main+0x1e4) [0x556f127fb944] -> 
/lib64/libc.so.6(__libc_start_main+0xf5) [0x7f0e4a071c05] -> 
doveadm(+0x1bd35) [0x556f127fbd35]

Aborted

Attached coredump and configuration.

I'm not a programmer, but seems that assert is raised by 
'fs_dict_iterate_init' function inside 'src/lib-dict-extra/dict-fs.c':


static struct dict_iterate_context *
fs_dict_iterate_init(struct dict *_dict, const char *const *paths,
 enum dict_iterate_flags flags)
{
...
/* these flags are not supported for now */
i_assert((flags & DICT_ITERATE_FLAG_RECURSE) == 0);
...


because it is called by 'acl_lookup_dict_iterate_read' function in file 
'src/plugins/acl/acl-lookup-dict.c'


static void acl_lookup_dict_iterate_read(struct acl_lookup_dict_iter *iter)
{
...
dict_iter = dict_iterate_init(iter->dict->dict, prefix,
  DICT_ITERATE_FLAG_RECURSE);
...

with DICT_ITERATE_FLAG_RECURSE set.


Same problem also with Dovecot 2.3.0.

Thanks,
  Marco


--
Marco Giunta - ITCS SysAdmin
Via Bonomea, 265
34136 - Trieste, Italy
Tel: +39-040-3787-503
Fax: +39-040-3787-244
# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: Linux 3.10.0-693.17.1.el7.x86_64 x86_64 CentOS Linux release 7.4.1708 
(Core)  
auth_debug = yes
auth_master_user_separator = *
auth_mechanisms = plain login
auth_username_format = %Ln
auth_verbose = yes
auth_verbose_passwords = sha1:6
doveadm_password =  # hidden, use -P to show it
doveadm_port = 26001
first_valid_uid = 200
hostname = hostname.example.com
imap_client_workarounds = delay-newmail
imapc_features = rfc822.size fetch-headers
imapc_host = hostname.example.com
imapc_master_user = dovesuper
imapc_password =  # hidden, use -P to show it
imapc_user = %u
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
lda_original_recipient_header = Delivered-To
listen = *
lmtp_hdr_delivery_address = original
lmtp_rcpt_check_quota = yes
login_trusted_networks = 10.0.0.0/30 10.0.0.0/30 10.0.0.0/23
mail_fsync = always
mail_gid = vmail
mail_home = /srv/mail/%1n/%n
mail_location = 
mdbox:~/dbox:ALT=/srv/archives/%1n/%n/dbox:INDEX=/srv/indexes/%1n/%n:VOLATILEDIR=/var/tmp/dovecot-volatile/%1n/%n
mail_plugins = acl mailbox_alias quota fts fts_solr
mail_prefetch_count = 20
mail_server_admin = mailto:postmas...@example.com
mail_shared_explicit_inbox = yes
mail_uid = vmail
mailbox_list_index = yes
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy 
include variables body enotify environment mailbox date index ihave duplicate 
mime foreverypart extracttext vacation-seconds spamtest spamtestplus editheader 
imapflags notify
mbox_write_locks = fcntl
mdbox_rotate_interval = 1 days
mdbox_rotate_size = 64 M
mmap_disable = yes
namespace inbox {
  inbox = yes
  location = 
  mailbox Archives {
auto = subscribe
special_use = \Archive
  }
  mailbox Drafts {
auto = subscribe
special_use = \Drafts
  }
  mailbox Junk {
auto = subscribe
special_use = \Junk
  }
  mailbox Sent {
auto = subscribe
special_use = \Sent
  }
  

stats-writer failed: Permission denied

2018-02-07 Thread Jakobus Schürz

Hi there!

Since i compile my own dovecot (not using dovecot from debian), i get 
this error on each startup dovecot with systemd


Feb 07 11:16:35 aldebaran dovecot[7455]: imap: Error: 
net_connect_unix(/usr/local/var/run/dovecot/stats-writer) failed: 
Permission denied
Feb 07 11:16:35 aldebaran dovecot[7455]: imap: Error: 
net_connect_unix(/usr/local/var/run/dovecot/stats-writer) failed: 
Permission denied



I can change the owner and/or permissions of the file, than it works 
till the next reboot.


How can i set this correctly in my configs?

Some googling didn't give me results for this error.


jakob



Re: Bug in dovecot 2.3 virtual plugin

2018-02-07 Thread Jakobus Schürz

Hi there!

I compiled dovecot from git on 5.2.2018.

The id of the last commit is:

$ git log --format="%H" -n 1
83b1300b96e753206f9226e3738a7ad9f5428a75

From https://github.com/dovecot/core.git


There is a new error,  when i try to open a virtual folder for my archiv 
(almost 30.000 mails) in thunderbird, also in k9-mail on android.


Feb 07 11:09:55 aldebaran dovecot[7455]: 
imap(jakob)<7472>: Panic: Leaked view for index 
/var/lib/dovecot/db/indexes/archiv/jakob/Archiv/2016/Mailinglisten/stvkr-a/dovecot.index: 
Opened in index-storage.c:336
Feb 07 11:09:55 aldebaran dovecot[7455]: 
imap(jakob)<7472>: Error: Raw backtrace: 
/usr/local/lib/dovecot/libdovecot.so.0(+0xc9431) [0x7f6edc3dd431] -> 
/usr/local/lib/dovecot/libdovecot.so.0(+0xc94fa) [0x7f6edc3dd4fa] -> 
/usr/local/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7f6edc34fbe8] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(+0xf44f2) 
[0x7f6edc77b4f2] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(index_storage_mailbox_close+0x72) 
[0x7f6edc752d32] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(mailbox_close+0x1a) 
[0x7f6edc6d227a] -> 
/usr/local/lib/dovecot/lib20_virtual_plugin.so(+0xa700) [0x7f6ed78e8700] 
-> 
/usr/local/lib/dovecot/lib20_virtual_plugin.so(virtual_backend_box_open+0x2b) 
[0x7f6ed78e889b] -> 
/usr/local/lib/dovecot/lib20_virtual_plugin.so(virtual_storage_sync_init+0x12a9) 
[0x7f6ed78eba79] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(mailbox_sync_init+0x51) 
[0x7f6edc6d4781] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(mailbox_sync+0x37) 
[0x7f6edc6d4837] -> dovecot/imap [jakob 92.60.9.18 
select](cmd_select_full+0x17e) [0x55bde8d2a08e] -> dovecot/imap [jakob 
92.60.9.18 select](command_exec+0x64) [0x55bde8d318d4] -> dovecot/imap 
[jakob 92.60.9.18 select](+0x1bd82) [0x55bde8d2fd82] -> dovecot/imap 
[jakob 92.60.9.18 select](+0x1be1c) [0x55bde8d2fe1c] -> dovecot/imap 
[jakob 92.60.9.18 select](client_handle_input+0x1b5) [0x55bde8d30225] -> 
dovecot/imap [jakob 92.60.9.18 select](client_input+0xa4) 
[0x55bde8d30844] -> 
/usr/local/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x69) 
[0x7f6edc3f51c9] -> 
/usr/local/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0x12e) 
[0x7f6edc3f6a3e] -> 
/usr/local/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x4c) 
[0x7f6edc3f52cc] -> 
/usr/local/lib/dovecot/libdovecot.so.0(io_loop_run+0x38) 
[0x7f6edc3f54d8] -> 
/usr/local/lib/dovecot/libdovecot.so.0(master_service_run+0x13) 
[0x7f6edc3725d3] -> dovecot/imap [jakob 92.60.9.18 select](main+0x339) 
[0x55bde8d22599] -> 
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) [0x7f6edbf7ef2a] 
-> dovecot/imap [jakob 92.60.9.18 select](_start+0x2a) [0x55bde8d2277a]
Feb 07 11:09:55 aldebaran dovecot[7455]: 
imap(jakob)<7472>: Fatal: master: service(imap): child 
7472 killed with signal 6 (core not dumped)
Feb 07 11:09:55 aldebaran dovecot[7455]: imap-login: Login: 
user=, method=CRAM-MD5, rip=1.2.3.4, lip=192.168.0.14, mpid=7474, 
TLS, session=
Feb 07 11:09:56 aldebaran dovecot[7455]: 
imap(jakob)<7474>: Panic: Leaked view for index 
/var/lib/dovecot/db/indexes/archiv/jakob/Archiv/2016/Mailinglisten/stvkr-a/dovecot.index: 
Opened in index-storage.c:336
Feb 07 11:09:56 aldebaran dovecot[7455]: 
imap(jakob)<7474>: Error: Raw backtrace: 
/usr/local/lib/dovecot/libdovecot.so.0(+0xc9431) [0x7fc44d019431] -> 
/usr/local/lib/dovecot/libdovecot.so.0(+0xc94fa) [0x7fc44d0194fa] -> 
/usr/local/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7fc44cf8bbe8] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(+0xf44f2) 
[0x7fc44d3b74f2] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(index_storage_mailbox_close+0x72) 
[0x7fc44d38ed32] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(mailbox_close+0x1a) 
[0x7fc44d30e27a] -> 
/usr/local/lib/dovecot/lib20_virtual_plugin.so(+0xa700) [0x7fc448524700] 
-> 
/usr/local/lib/dovecot/lib20_virtual_plugin.so(virtual_backend_box_open+0x2b) 
[0x7fc44852489b] -> 
/usr/local/lib/dovecot/lib20_virtual_plugin.so(virtual_storage_sync_init+0x12a9) 
[0x7fc448527a79] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(mailbox_sync_init+0x51) 
[0x7fc44d310781] -> 
/usr/local/lib/dovecot/libdovecot-storage.so.0(mailbox_sync+0x37) 
[0x7fc44d310837] -> dovecot/imap [jakob 92.60.9.18 
select](cmd_select_full+0x17e) [0x55770c32408e] -> dovecot/imap [jakob 
92.60.9.18 select](command_exec+0x64) [0x55770c32b8d4] -> dovecot/imap 
[jakob 92.60.9.18 select](+0x1bd82) [0x55770c329d82] -> dovecot/imap 
[jakob 92.60.9.18 select](+0x1be1c) [0x55770c329e1c] -> dovecot/imap 
[jakob 92.60.9.18 select](client_handle_input+0x1b5) [0x55770c32a225] -> 
dovecot/imap [jakob 92.60.9.18 select](client_input+0xa4) 
[0x55770c32a844] -> 
/usr/local/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x69) 
[0x7fc44d0311c9] -> 
/usr/local/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0x12e) 
[0x7fc44d032a3e] -> 
/usr/local/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x4c) 
[0x7fc44d0312cc] -> 

Re: Cannot delete IMAP Mail-Folder in Trash

2018-02-07 Thread Gabriel Kaufmann

Hello,

the folders exist physically in vmail-storage on filesystem for the 
given Mailbox\MailDir\Trash. I already tried to refresh subscription 
using IMAP on Thunderbird. Is there any other way using CLI and dovecot 
to (re-)check subscriptions or do some kind of rescan?


Trying to delete the physically (in file-system on server) existing 
folders using IMAP always complains that the folder is not empty. In 
fact some of these folders also had sub-folders in IMAP before being 
deleted into Trash. In Filesystem these sub-folders also exist 
physically! But in trash they are not shown anymore - only their 
parent-folder without those children.


I'm using "layout=fs" option (physical folder/sub-folder and not MBOX 
like "folder.sub-folder.sub-sub-folder". It feels like Trash is ignoring 
this layout. I didn't figure out there is any option that is required to 
configure trash (separately from Mailbox-Namespace in dovecot) to 
recognise this.


Best regards

Gabriel Kaufmann