Re: [Dovecot] search and UTF-8 normalization forms (NFD)

2013-05-21 Thread Lutz Preßler
On Mi, 15 Mai 2013, Timo Sirainen wrote:

 On 11.5.2013, at 18.13, Florian Zeitz florob at babelmonkeys.de wrote:
  So... I had a look at this. Turns out that the current implementation of
  Unicode decomposition (Step 2(b) in i;unicode-casemap) in Dovecot is
  broken. It only handles decomposition properties that include a tag.
  I've attached a hg export that fixes this.
 
 Thanks, added to v2.1 and v2.2 hg.
 
Thanks, but there seems to be still a problem left. Sender search
yields all Krüger mails without fts_lucene. But with fts_lucene
enabled - and files in lucene-indexes/ existing - it's not.
(If I delete the lucene-index files and search for sender,
result is correct - but only until they are recreated.)

Lutz 


Re: [Dovecot] search and UTF-8 normalization forms (NFD)

2013-05-10 Thread Lutz Preßler
Hello Timo,
On Thu, 02 May 2013, Timo Sirainen wrote:

 IMAP requires using i;unicode-casemap by default, as specified by RFC 5051. 
 Then again, others could be supported as well, and it's not really a 
 requirement that the search can't handle more flexible searches.. Anyway, 
 that's what Dovecot currently has implemented, and I guess it doesn't do what 
 you want it to do. But there is a partial solution for this:
 
 http://dovecot.org/patches/2.1/icu-1.2.tar.gz
 
 It probably does what you want, but it only works with fts-lucene.
I'm trying to test it with the 2.2.1 installation, but have a problem
doing so: after seemingly smooth compilation and installation, I get

May 10 14:15:18 host dovecot: imap: Error: Module is for different ABI version 
2.2.1 (we have 2.2.ABIv0(2.2.1)): /usr/lib/dovecot/modules/lib20_icu_plugin.so
May 10 14:15:18 host dovecot: imap: Fatal: Couldn't load required plugins

Any idea?

Greetings,
  Lutz


[Dovecot] SMTP front-end Re: Released Pigeonhole v0.4.0 for Dovecot v2.2.1.

2013-05-10 Thread Lutz Preßler
Stephan,
On Fri, 10 May 2013, Stephan Bosch wrote:

 On 5/10/2013 12:12 PM, Christian Rohmann wrote:
  Hey Stephan,
 
  On 05/09/2013 11:23 PM, Stephan Bosch wrote:
  It basically acts as a front-end to your normal MTA. First of all, it
  provides a convenient way to add SMTP AUTH support to any MTA. But the
  main goal for this project is to implement an SMTP submission server
  with full support for the LEMONADE profile
  (https://tools.ietf.org/html/rfc4550). It acts as a proxy server, so it
  doesn't queue anything; once the client sees a success reply for the
  message submission, it is already accepted in the actual MTA queue.
 
  I have one remark and one question:
 
  Remark: Don't forget XCLIENT / XFORWARD support to help the real MTA 
  understand who it's really talking to.
 
 XCLIENT is already implemented. But, afaik, this is only supported by 
 Postfix.
Exim has the -bs command line option. From spec:

-bs

This option causes Exim to accept one or more messages by reading SMTP
commands on the standard input, and producing SMTP replies on the standard
output. SMTP policy controls, as defined in ACLs (see chapter 42) are
applied. Some user agents use this interface as a way of passing
locally-generated messages to the MTA.

In this usage, if the caller of Exim is trusted, or untrusted_set_sender is
set, the senders of messages are taken from the SMTP MAIL commands.
Otherwise the content of these commands is ignored and the sender is set up
as the calling user. Unqualified addresses are automatically qualified
using qualify_domain and qualify_recipient, as appropriate, unless the -bnq
option is used.

The -bs option is also used to run Exim from inetd, as an alternative to
using a listening daemon. Exim can distinguish the two cases by checking
whether the standard input is a TCP/IP socket. When Exim is called from
inetd, the source of the mail is assumed to be remote, and the comments
above concerning senders and qualification do not apply. In this situation,
Exim behaves in exactly the same way as it does when receiving a message
via the listening daemon.

Could you implement this interface to a backend server, too?

Thanks for your work, regards,
  Lutz



[Dovecot] search and UTF-8 normalization forms (NFD)

2013-04-25 Thread Lutz Preßler
Hello,

on a system with dovecot 2.2 I've got a mailbox containing multiple mails
from a person called Krüger, but From: header encoded differently.
Some are encoded in UTF-8 normalization form decomposed (as used by Mac OSX),
that is u and umlaut accent as sperate combined codepoints
instead of one ü:

  From: =?utf-8?Q?replaced_Kru=CC=88ger?= krueger@some.domain

Searching within roundcube webmail for krüger as sender
missis this mails.

Roundcube sends (dovecot rawlog):
A0003 UID THREAD REFS UTF-8 ALL HEADER FROM {7+}krüger

Is this supposed to work? Haven't done any more debugging
(other search variants) or read RFCs. As a user I would expect
Unicode equivalence rules be applied (see 
http://en.wikipedia.org/wiki/Unicode_equivalence)

Regards,
  Lutz


[Dovecot] 2.2.0rc6: crash with mailbox_list_index=yes (and virtual?)

2013-04-09 Thread Lutz Preßler
Hello (Timo),

depending on the client (with OfflineIMAP, but not a mobile one) my dovecot
test configuration (config on request) crashes if mailbox_list_index=yes:

Apr  9 09:26:31 host dovecot: imap-login: Login: user=user, method=CRAM-MD5, 
rip=2001:::::::, 
lip=2001:::::::, mpid=19028, TLS, 
session=/+vqeOjZ1wAgAQY4BgPRMwIMKf/+amcv
Apr  9 09:26:31 host dovecot: imap(19028, user) 
/+vqeOjZ1wAgAQY4BgPRMwIMKf/+amcv: Panic: file mail-index-view.c: line 169 
(view_lookup_full):
assertion failed: (seq  0  seq = mail_index_view_get_messages_count(view))
Apr  9 09:26:31 host dovecot: imap(19028, lpmailext) 
/+vqeOjZ1wAgAQY4BgPRMwIMKf/+amcv: Error: Raw backtrace: 
/usr/lib/dovecot/libdovecot.so.0(+0x61
75a) [0x7fca0248c75a] - /usr/lib/dovecot/libdovecot.so.0(+0x617a6) 
[0x7fca0248c7a6] - /usr/lib/dovecot/libdovecot.so.0(i_error+0) 
[0x7fca0244d3cf] -
 /usr/lib/dovecot/libdovecot-storage.so.0(+0xc9b5e) [0x7fca027adb5e] - 
/usr/lib/dovecot/libdovecot-storage.so.0(+0xca238) [0x7fca027ae238] - 
/usr/lib/dovecot/libdovecot-storage.so.0(mail_index_lookup_ext+0x17) 
[0x7fca027ad2b7] - 
/usr/lib/dovecot/libdovecot-storage.so.0(mailbox_list_index_status+0x11f) 
[0x7fca0277559f] - 
/usr/lib/dovecot/libdovecot-storage.so.0(mailbox_list_index_status_set_info_flags+0x8d)
 [0x7fca0277606d] - 
/usr/lib/dovecot/libdovecot-storage.so.0(mailbox_list_index_iter_next+0x18d) 
[0x7fca0277383d] - /usr/lib/dovecot/libdovecot-storage.so.0(+0x93177) 
[0x7fca02777177] - 
/usr/lib/dovecot/libdovecot-storage.so.0(mailbox_list_iter_next+0x255) 
[0x7fca02777465] - /usr/lib/dovecot/libdovecot-storage.so.0(+0x94881) 
[0x7fca02778881] - /usr/lib/dovecot/libdovecot-storage.so.0(+0x93177) 
[0x7fca02777177] - 
/usr/lib/dovecot/libdovecot-storage.so.0(mailbox_list_iter_next+0x3c0)[0x7fca027775d0]
 - /usr/lib/dovecot/modules/lib20_virtual_plugin.so(virtual_config_read+0x97d) 
[0x7fca0065344d] - /usr/lib/dovecot/modules/lib20_virtual_plugin.so(+0x93c5) 
[0x7fca006553c5] - /usr/lib/dovecot/modules/lib20_zlib_plugin.so(+0x2a8c) 
[0x7fca00447a8c] - /usr/lib/dovecot/libdovecot-storage.so.0(+0x7dd94) 
[0x7fca02761d94] - /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_open+0xf) 
[0x7fca02761f4f] - 
/usr/lib/dovecot/libdovecot-storage.so.0(index_mailbox_get_metadata+0x5da) 
[0x7fca0278a41a] - /usr/lib/dovecot/modules/lib20_virtual_plugin.so(+0x8d48) 
[0x7fca00654d48] - /usr/lib/dovecot/libdovecot-storage.so.0(+0x91f05) 
[0x7fca02775f05] - 
/usr/lib/dovecot/libdovecot-storage.so.0(mailbox_get_metadata+0x6e) 
[0x7fca02761b6e] - 
/usr/lib/dovecot/libdovecot-storage.so.0(mailbox_list_index_sync_name+0x2e6) 
[0x7fca02776b66]
Apr  9 09:26:31 host dovecot: imap(19028, user) 
/+vqeOjZ1wAgAQY4BgPRMwIMKf/+amcv: Fatal: master: service(imap): child 19028 
killed with signal 6 (core dumped)

gdb bt full attached. Haven't tested yet if disabling virtual namespaces makes
a difference. Neither logged triggering IMAP commands.

Regards,
  Lutz
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as x86_64-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/lib/dovecot/imap...Reading symbols from 
/usr/lib/debug/usr/lib/dovecot/imap...done.
(no debugging symbols found)...done.
Reading symbols from /usr/lib/dovecot/libdovecot-storage.so.0...Reading symbols 
from /usr/lib/debug/usr/lib/dovecot/libdovecot-storage.so.0.0.0...done.
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/dovecot/libdovecot-storage.so.0
Reading symbols from /usr/lib/dovecot/libdovecot.so.0...Reading symbols from 
/usr/lib/debug/usr/lib/dovecot/libdovecot.so.0.0.0...done.
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/dovecot/libdovecot.so.0
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols 
found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /usr/lib/dovecot/modules/lib01_acl_plugin.so...Reading 
symbols from /usr/lib/debug/usr/lib/dovecot/modules/lib01_acl_plugin.so...done.
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/dovecot/modules/lib01_acl_plugin.so
Reading symbols from 
/usr/lib/dovecot/modules/lib02_imap_acl_plugin.so...Reading 

Re: [Dovecot] doveadm mailbox list/stats etc. and shared mailboxes/ACLs

2013-04-04 Thread Lutz Preßler
Hello Timo,
On Thu, 04 Apr 2013, Timo Sirainen wrote:

 On 2.4.2013, at 15.37, Lutz Preßler lutz.press...@sernet.de wrote:
 
  Only user1.test and user1.test.test2 have ACLs that allow testuser to access
  them.
  
  host:~# doveadm mailbox status -u testuser all INBOX.shared.user1.privat
  INBOX.shared.user1.privat messages=37 recent=0 uidnext=70 
  uidvalidity=1060291494 unseen=7 highestmodseq=1 vsize=1618757 
  guid=9a71cb399c249d4ce10ec93908ca
  
  Access with search and fetch (and probably any other doveadm command) is
  possible, too.
  Is this how it's supposed to work? Commands in testuser IMAP session
  respects ACLs.
 
 My guess: You have acl plugin enabled in protocol imap {}, but not globally?
No. It's enabled in global mail_plugins:
mail_plugins =  virtual acl zlib notify mail_log quota listescape stats fts 
fts_lucene mailbox_alias
imap_acl only in protocol imap, of course.

Lutz


[Dovecot] doveadm mailbox list/stats etc. and shared mailboxes/ACLs

2013-04-02 Thread Lutz Preßler
Hello,

2.2.0rc3:

host:~# doveadm mailbox list -u testuser
INBOX
INBOX.test
INBOX.bla
INBOX.bla.blubb
INBOX.shared
INBOX.virtual
INBOX.shared.user1
INBOX.shared.user1.privat
INBOX.shared.user1.test
INBOX.shared.user1.test.test2
INBOX.shared.user1.Trash
INBOX.shared.user1.in2009
[... all mailboxes of user1]

Only user1.test and user1.test.test2 have ACLs that allow testuser to access
them.

host:~# doveadm mailbox status -u testuser all INBOX.shared.user1.privat
INBOX.shared.user1.privat messages=37 recent=0 uidnext=70 
uidvalidity=1060291494 unseen=7 highestmodseq=1 vsize=1618757 
guid=9a71cb399c249d4ce10ec93908ca

Access with search and fetch (and probably any other doveadm command) is
possible, too.
Is this how it's supposed to work? Commands in testuser IMAP session
respects ACLs.

Lutz


[Dovecot] replicator process

2013-04-02 Thread Lutz Preßler
Hello Timo,

2.2rc3: replication unconfigured (no replica in doveconf -n output),
# doveadm replicator status
starts the dovecot/replicator process, which keeps running, leading
to sync: User has no mail_replica in userdb errors for each user every
5 minutes.
Same after doveadm replicator replicate some-even-nonexisting-user.

Lutz


[Dovecot] stats: duration of sessions, commands

2013-03-31 Thread Lutz Preßler
Hello Timo,

I would like to have reset_timestamp (or another field) in stats
dump output of levels session and command. Both session duration
and individual command execution times would be interesting
data to have.

Greetings,
   Lutz


[Dovecot] changing flags automatically

2013-03-28 Thread Lutz Preßler
Hello,

(2.2:) there is no doveadm subcommand to change flags of messages, is it?

The following should work reliably?

# mark messages with subject $SUBJECT in mailbox $MAILBOX of user $USERID as 
read
( i=2
  echo 1 SELECT $MAILBOX
  doveadm search -u $USERID mailbox $MAILBOX subject $SUBJECT \
  | while read g u
  do  
echo $i UID STORE $u flags (\Seen)
i=$((i+1));
  done
  echo 0 LOGOUT
) | /usr/lib/dovecot/imap -u $USERID

Greetings,
  Lutz


[Dovecot] 2.2.rc2: doveadm who - Bad file descriptor

2013-02-27 Thread Lutz Preßler
Hello,

2.2.rc2 is reproducibly fine, but (all from xi.rename-it.nl)
dovecot_2.2.0~rc2-0~auto+11 (15988:2020ed15efb9) and
dovecot_2.2.0~rc2-0~auto+7 (15980:d84c7c11d7b7) have
doveadm who not working:

# doveadm who
doveadm(root): Fatal: fcntl(-1, F_GETFL) failed: Bad file descriptor

strace doveadm who  ends with:
socket(PF_FILE, SOCK_STREAM, 0) = 8
fcntl(8, F_GETFL)   = 0x2 (flags O_RDWR)
fcntl(8, F_SETFL, O_RDWR|O_NONBLOCK)= 0
connect(8, {sa_family=AF_FILE, path=/var/run/dovecot/anvil}, 110) = 0
fcntl(-1, F_GETFL)  = -1 EBADF (Bad file descriptor)
write(2, doveadm(root): Fatal: fcntl(-1, ..., 69doveadm(root): Fatal: 
fcntl(-1, F_GETFL) failed: Bad file descriptor
) = 69
exit_group(75)  = ?

same with 2.2.rc2 includes:
socket(PF_FILE, SOCK_STREAM, 0) = 8
fcntl(8, F_GETFL)   = 0x2 (flags O_RDWR)
fcntl(8, F_SETFL, O_RDWR|O_NONBLOCK)= 0
connect(8, {sa_family=AF_FILE, path=/var/run/dovecot/anvil}, 110) = 0
fcntl(8, F_GETFL)   = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(8, F_SETFL, O_RDWR)   = 0
fstat(8, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
write(8, VERSION\tanvil\t1\t0\nCONNECT-DUMP\n, 31) = 31


Lutz

-- 
Lutz Preßler  lutz.press...@sernet.dehttp://www.SerNet.DE/
SerNet Service Network GmbH, Bahnhofsallee 1b, D-37081 Göttingen
Tel.: +49-551-37-2,  FAX: +49-551-37-9
AG Göttingen, HRB 2816,  GF: Dr. Johannes Loxen


Re: [Dovecot] 2.2.rc2: doveadm who - Bad file descriptor

2013-02-27 Thread Lutz Preßler
On Mi, 27 Feb 2013, Lutz Preßler wrote:

 Hello,
 
 2.2.rc2 is reproducibly fine, but (all from xi.rename-it.nl)
 dovecot_2.2.0~rc2-0~auto+11 (15988:2020ed15efb9) and
 dovecot_2.2.0~rc2-0~auto+7 (15980:d84c7c11d7b7) have
 doveadm who not working:
 
 # doveadm who
 doveadm(root): Fatal: fcntl(-1, F_GETFL) failed: Bad file descriptor
 
http://hg.dovecot.org/dovecot-2.2/rev/91631438abce 1.79 return -1;
looks suspicious.

Lutz


[Dovecot] 2.2.rc2: problem with acl_shared_dict

2013-02-26 Thread Lutz Preßler
Hello,

2.2.rc2, configuration as before:

acl_shared_dict=file:...
The contents of this file is used for e.g. LISTing shared mailboxes.
But even with file and directory beeing world writable, it's not written
into on SETACL commands.
Instead, at least sometimes (it seems to make a difference if GETACL is
used before in the session) the imap process crashes on SETACL or DELETEACL.

Feb 26 00:31:52 host dovecot: imap(13373, user) K64y8ZTWOgB/AAAB: Fatal: 
master: service(imap): child 13373 killed with signal 11 (core dumps disabled) 
Anything to do for further debugging? Working correctly with 2.1.15.

Greetings,
  Lutz



[Dovecot] 2.2beta2: LSUB broken

2013-02-25 Thread Lutz Preßler
Hello,

I have some problems with (listing) subscriptions on my test system
running 2.2beta2 (compared with 2.1.15, configuration and Maildir content
unchanged):

With 2.1.15:
0 lsub  *
* LSUB () . INBOX.Trash
* LSUB () . INBOX.in2009
* LSUB () . INBOX.test
* LSUB () . INBOX.test.test2
* LSUB () . INBOX.in2010
* LSUB () . INBOX.in
* LSUB () . INBOX.virtual.small
* LSUB () . INBOX.virtual.sent
* LSUB () . INBOX.virtual.allin
* LSUB () . INBOX.virtual.week
* LSUB () . INBOX.virtual.gmail
0 OK Lsub completed.

With 2.2beta2 (output of doveconf -n attached):
0 lsub  *
0 OK Lsub completed.

... empty list. Same with list (subscribed).

After disableing the virtual namespace in the config, it gets:
0 lsub  *
* LSUB () . Trash
* LSUB () . in2009
* LSUB () . test
* LSUB () . test.test2
* LSUB () . in2010
* LSUB () . in
* LSUB () . INBOX.Trash
* LSUB () . INBOX.in2009
* LSUB () . INBOX.test
* LSUB () . INBOX.test.test2
* LSUB () . INBOX.in2010
* LSUB () . INBOX.in
0 OK Lsub completed.

Note mailboxes listed with and without INBOX. prefix.

Thanks,
  Lutz
# 2.2.beta2 (357b1f1285ea): /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-vserver-amd64 x86_64 Debian 6.0.7 
auth_username_format = %n
auth_verbose = yes
hostname = some.host.name 
mail_access_groups = mails
mail_location = maildir:~/Maildir
mail_log_prefix = %s(%p, %u) %{session}: 
mail_plugins =  virtual acl zlib notify mail_log quota listescape stats fts 
fts_lucene
mail_temp_dir = /var/tmp
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 ihave
namespace others {
  list = children
  location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
  prefix = INBOX.shared.%%u.
  separator = .
  subscriptions = no
  type = shared
}
namespace personal {
  inbox = yes
  location = maildir:~/Maildir
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Entwürfe {
special_use = \Drafts
  }
  mailbox Gesendet {
special_use = \Sent
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Papierkorb {
special_use = \Trash
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox Sent Messages {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  mailbox sent {
special_use = \Sent
  }
  mailbox spam {
special_use = \Junk
  }
  prefix = INBOX.
  subscriptions = yes
  type = private
}
namespace virtual {
  location = virtual:~/Maildir/virtual:LAYOUT=maildir++
  mailbox allin {
special_use = \All
  }
  prefix = INBOX.virtual.
  type = private
}
passdb {
  args = scheme=CRYPT username_format=%u /etc/dovecot/users
  driver = passwd-file
}
plugin {
  acl = vfile:/etc/dovecot/global-acls:cache_secs=300
  acl_shared_dict = file:/etc/dovecot/meta/shared-mailboxes
  fts = lucene
  fts_decoder = decode2text
  fts_lucene = default_language=german whitespace_chars=@. normalize
  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename 
flag_change save mailbox_create
  mail_log_fields = uid box msgid size flags vsize from
  quota = maildir:User quota
  quota_rule = *:storage=2G
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  stats_refresh = 10s
  stats_track_cmds = yes
}
protocols =  imap lmtp sieve
service auth {
  unix_listener auth-userdb {
group = mails
mode = 0660
  }
}
service config {
  unix_listener config {
mode = 0666
  }
}
service decode2text {
  executable = script /etc/dovecot/decode2text.sh
  unix_listener decode2text {
mode = 0666
  }
  user = dovecot
}
service imap {
  executable = imap postlogin
}
service lmtp {
  inet_listener lmtp {
address = 127.0.0.1
port = 24
  }
}
service managesieve-login {
  inet_listener sieve {
address = 127.0.0.1
port = 4190
  }
}
service postlogin {
  executable = script-login -d rawlog -b -t
}
service stats {
  fifo_listener stats-mail {
group = mails
mode = 0660
  }
}
ssl_cert = /etc/ssl/certs/dovecot.pem
ssl_key = /etc/ssl/private/dovecot.pem
userdb {
  args = username_format=%u /etc/dovecot/users
  driver = passwd-file
}
protocol lmtp {
  mail_plugins =  virtual acl zlib notify mail_log quota listescape stats fts 
fts_lucene sieve
}
protocol lda {
  mail_plugins =  virtual acl zlib notify mail_log quota listescape stats fts 
fts_lucene sieve
}
protocol imap {
  imap_client_workarounds = tb-extra-mailbox-sep tb-lsub-flags
  imap_idle_notify_interval = 30 mins
  mail_plugins =  virtual acl zlib notify mail_log quota listescape stats fts 
fts_lucene imap_acl imap_quota imap_zlib imap_stats
}


Re: [Dovecot] 2.2beta2: LSUB broken

2013-02-25 Thread Lutz Preßler
On Mo, 25 Feb 2013, Timo Sirainen wrote:

 On Mon, 2013-02-25 at 18:33 +0100, Lutz Preßler wrote:
 
  I have some problems with (listing) subscriptions on my test system
  running 2.2beta2 (compared with 2.1.15, configuration and Maildir content
  unchanged):
 
 Fixed: http://hg.dovecot.org/dovecot-2.2/rev/e47910ee4459
Not sure.. after manually applying this patch, I get

0 lsub  *
imap(6812, user) : Panic: file mailbox-list-subscriptions.c: line 81 
(mailbox_list_subscription_fill_one): assertion failed: (strncmp(ns_name, 
ns-prefix, ns-prefix_len-1) == 0  ns_name[ns-prefix_len-1] == '\0')
imap(6812, user) : Error: Raw backtrace: 
/usr/lib/dovecot/libdovecot.so.0(+0x606fa) [0x7f10767396fa] - 
/usr/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x32) [0x7f10767397e2] 
- /usr/lib/dovecot/libdovecot.so.0(i_error+0) [0x7f10766fae2f] - 
/usr/lib/dovecot/libdovecot-storage.so.0(mailbox_list_subscriptions_refresh+0x476)
 [0x7f1076a26636] - 
/usr/lib/dovecot/libdovecot-storage.so.0(mailbox_list_iter_init_multiple+0x232) 
[0x7f1076a234d2] - /usr/lib/dovecot/libdovecot-storage.so.0(+0x93d99) 
[0x7f1076a23d99] - /usr/lib/dovecot/libdovecot-storage.so.0(+0x926f7) 
[0x7f1076a226f7] - 
/usr/lib/dovecot/libdovecot-storage.so.0(mailbox_list_iter_next+0x3c0) 
[0x7f1076a22b50] - /usr/lib/dovecot/imap() [0x40eb51] - 
/usr/lib/dovecot/imap(cmd_list_full+0x4f6) [0x40f3d6] - 
/usr/lib/dovecot/imap(command_exec+0x3d) [0x41604d] - /usr/lib/dovecot/imap() 
[0x41521e] - /usr/lib/dovecot/imap() [0x4152fd] - 
/usr/lib/dovecot/imap(client_handle_input+0x11d) [0x41550d] - 
/usr/lib/dovecot/imap(client_input+0x6f) [0x41588f] - 
/usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x36) [0x7f1076748386] - 
/usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0xaf) [0x7f10767493df] - 
/usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x28) [0x7f1076748328] - 
/usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13) [0x7f10766ffa93] - 
/usr/lib/dovecot/imap(main+0x2a7) [0x41eaf7] - 
/lib/libc.so.6(__libc_start_main+0xfd) [0x7f1076395c8d] - 
/usr/lib/dovecot/imap() [0x40b579]
Abgebrochen


Lutz



[Dovecot] 2.2.rc2: quota crash

2013-02-25 Thread Lutz Preßler
Hello,

2.2.rc2 with configuration as sent with my last mail (2.2beta2: LSUB broke).
The following sequence crashes with INBOX containing unseen message:

* PREAUTH [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE 
SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT 
MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS 
LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN 
CONTEXT=SEARCH LIST-STATUS SPECIAL-USE BINARY MOVE SEARCH=FUZZY 
COMPRESS=DEFLATE QUOTA ACL RIGHTS=texk] Logged in as user 
A0002 STATUS INBOX (MESSAGES UNSEEN) 
* STATUS INBOX (MESSAGES 5651 UNSEEN 5)
A0002 OK Status completed.
A0003 SELECT INBOX
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft $Forwarded)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft $Forwarded \*)] 
Flags permitted.
* 5651 EXISTS
* 0 RECENT
* OK [UNSEEN 5647] First unseen.
* OK [UIDVALIDITY 1060286197] UIDs valid
* OK [UIDNEXT 42051] Predicted next UID
* OK [HIGHESTMODSEQ 6878] Highest
A0003 OK [READ-WRITE] Select completed.
A0004 UID SEARCH 5651
* SEARCH 42050
A0004 OK Search completed (0.000 secs).
A0005 GETQUOTAROOT INBOX
imap(4140, lpressl) : Panic: file mail-namespace.c: line 654 
(mail_namespace_find): assertion failed: (ns != NULL)
imap(4140, lpressl) : Error: Raw backtrace: 
/usr/lib/dovecot/libdovecot.so.0(+0x6079a) [0x7f617b7f679a] - 
/usr/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x32) [0x7f617b7f6882] 
- /usr/lib/dovecot/libdovecot.so.0(i_error+0) [0x7f617b7b7eaf] - 
/usr/lib/dovecot/libdovecot-storage.so.0(+0x760e2) [0x7f617bac30e2] - 
/usr/lib/dovecot/libdovecot-storage.so.0(mail_namespace_find_unalias+0x19) 
[0x7f617bac3109] - /usr/lib/dovecot/modules/lib10_quota_plugin.so(+0x5238) 
[0x7f617a7ec238] - 
/usr/lib/dovecot/modules/lib10_quota_plugin.so(quota_get_resource+0xb7) 
[0x7f617a7ec3b7] - 
/usr/lib/dovecot/modules/lib10_quota_plugin.so(quota_root_iter_next+0xf1) 
[0x7f617a7ece11] - 
/usr/lib/dovecot/modules/lib11_imap_quota_plugin.so(+0x1bd5) [0x7f617a5e5bd5] 
- /usr/lib/dovecot/imap(command_exec+0x3d) [0x41603d] - 
/usr/lib/dovecot/imap() [0x415190] - /usr/lib/dovecot/imap() [0x41527d] - 
/usr/lib/dovecot/imap(client_handle_input+0x11d) [0x4154fd] - 
/usr/lib/dovecot/imap(client_input+0x6f) [0x41587f] - 
/usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x36) [0x7f617b805426] - 
/usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0xaf) [0x7f617b80647f] - 
/usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x28) [0x7f617b8053c8] - 
/usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13) [0x7f617b7bcb03] - 
/usr/lib/dovecot/imap(main+0x2a7) [0x41eb07] - 
/lib/libc.so.6(__libc_start_main+0xfd) [0x7f617b452c8d] - 
/usr/lib/dovecot/imap() [0x40b549]
Abgebrochen

GETQUOTAROOT directly after SELECT INBOX (without UID SEARCH) does not.
No crash without imap_quota plugin either, of course...

Regards,
  Lutz




Re: [Dovecot] problem with virtual plugin/index files?

2012-08-24 Thread Lutz Preßler
On Thu, 23 Aug 2012, Timo Sirainen wrote:

 On 18.8.2012, at 0.12, Lutz Preßler wrote:
 
  inthread refs younger 604800
  
  This works as expected for the first time. But later on, also older 
  messages/
  threads are included until I delete the virtual/.week/dovecot.index*.
  
[...]
  Situation with latest 2.1 is unchanged. But maybe it's easier to fix/
  enhance now? Any estimate how much effort it would be?
 
 Just about the same amount of work I think. I haven't really looked at 
 virtual plugin for a while, so I can't easily say how much work it would be. 
 But my guess is that it wouldn't be easy.
 
Thanks. To force MEMORY indexes only (with location option in namespace or
forcibly - with warnings - by having empty index files for one mailbox
chattr +i'ed (extended attributes immutable flag on Linux filesystems))
disables full text search indexing also. What about regular deletion of main
index files. Is this a problem with FTS? doveadm fts rescan necessary,
too?

Btw, with 2.1 search results with or without fts indexes (solr,squat)
differ in substring behaviour (http://wiki2.dovecot.org/Plugins/FTS/Squat).
Namespaces with INDEX=MEMORY allow for a slow search view. But then
no attachment content is searched...

Lutz


Re: [Dovecot] problem with virtual plugin/index files?

2012-08-17 Thread Lutz Preßler
Hello Timo,

virtual file with inthread/younger (other dynamic searches?) in it
and indexes leading to too many (or too few?) search results.

On Do, 02 Dez 2010, Timo Sirainen wrote:

 On Thu, 2010-12-02 at 11:08 +0100, Lutz Preßler wrote:
 
   inthread refs younger 604800
  
  This works as expected for the first time. But later on, also older 
  messages/
  threads are included until I delete the virtual/.week/dovecot.index*.
 
 I know there are problems related to this with INTHREAD, but they aren't
 very easy to solve and for now I've more important things to do.. If it
 seemed to work before, it was due to luck or due to some bug causing an
 unnecessary index rebuild. You could set :INDEX=MEMORY to work around
 this, but I don't know how much worse the performance would become. Or
 you could just manually delete the virtual indexes once a week.
Situation with latest 2.1 is unchanged. But maybe it's easier to fix/
enhance now? Any estimate how much effort it would be?

Thanks again for your work,
  Lutz



[Dovecot] fts (lucene): indexing of virtual mailboxes?

2011-09-23 Thread Lutz Preßler
Hello,

(recent 2.1alpha2 variant - my test setup known to Timo).
No time to diagnose in depth at the moment, but I just noticed
that SEARCHing in virtual mailboxes seems not to create lucene
index content of its own but use those of referenced mailboxes?
The problem is that no new indexing takes place.
Example: with
  INBOX
  INBOX.in%
all
in dovecot-virtual, for a given query I only get matches from
those mailboxes searched in previously.

Regards,
  Lutz


[Dovecot] fts-lucene vs SEARCH header Re: 2.1: problems compiling fts-lucene - CLucene git version necessary?

2011-09-22 Thread Lutz Preßler
On Tue, 20 Sep 2011, Lutz Preßler wrote:

 On Mo, 19 Sep 2011, Timo Sirainen wrote:
 
  On Sun, 2011-09-18 at 13:27 +0200, Lutz Preßler wrote:
   Hello,
   On So, 11 Sep 2011, Timo Sirainen wrote:
   dovecot: imap(...): Error: fts_lucene: default_language set, but Dovecot 
   built without stemmer support
  
  Fixed: http://hg.dovecot.org/dovecot-2.1/rev/02c84406c661
 Without stemmer support it works nicely now though.
Next problem :-) side effect: my test setup (some commits ago) with  fts = 
lucene
in plugin section (ftps_lucene plugin without stemmer support):
SEARCH header is not working (empty result sets, no logging). Tested in
different circumstances (and also happening with virtual folders).
Simply disable fts option (while module is still loaded) or use fts=sqat
to have header search working correctly again.

Lutz


[Dovecot] (2.1 recent:) fts_decoder

2011-09-22 Thread Lutz Preßler
Hello again,

test setup as in previous messages.
With fts = lucene, I enabled the adapted decode2text.sh (at least I tried...)
as suggested in the comment section.
On dovecot-start /var/run/dovecot/decode2text socket is created with sufficiant
permissions (rw for anybody), but decode2text.sh is not started (it's rx for
anybody). When creating lucene indexes, I cannot see it executed either
(and no attachment-only content is findable afterwards).
No errors with mail_debug - if I change fts_decoder to a nonexistant value,
that's logged.

Lutz


[Dovecot] zlib_save per namespace/mailbox?

2011-09-22 Thread Lutz Preßler
Hi,

the zlib_save question reminds me of a wish:
I think it's not possible to set zlib_save parameter per namespace (or even
mailbox). Per namespace would be something for the wish list to get rid of
the cron job method to compress archival mailboxes.
And maybe an option to add a Z flag to compressed maildir message files
as recommended in the wiki regarding compress crob job.

Lutz


Re: [Dovecot] 2.1: problems compiling fts-lucene - CLucene git version necessary?

2011-09-20 Thread Lutz Preßler
On Mo, 19 Sep 2011, Timo Sirainen wrote:

 On Sun, 2011-09-18 at 13:27 +0200, Lutz Preßler wrote:
  Hello,
  On So, 11 Sep 2011, Timo Sirainen wrote:
   On 11.9.2011, at 22.22, Lutz Preßler wrote:
I have problems recompiling the Debian squeeze auto build packages
with --with-lecene. Is the git (2.3) version of CLucene necessary?
   Yes.
  Ok, I now tried to test with clucene-core-2.3.3.4. Quite unsucessfully...
  I built libclucene-core-static.a and libclucene-shared-static.a after
  changing the cmake option (BUILD_STATIC_LIBRARIES). But despite enabling
  BUILD_CONTRIBS, BUILD_CONTRIBS_LIB no snowball/libstemmer has been build.
 
 You need to install libstemmer separately. I think I used
 http://snowball.tartarus.org/dist/libstemmer_c.tgz
Still having build problems --with-stemmer... libstemmer built and referenced
seperately, libtextcat as Debian package, it's:
lucene-wrapper.cc: In function 'lucene_index* lucene_index_init(const char*, 
mailbox_list*, const fts_lucene_settings*)':
lucene-wrapper.cc:108: error: no matching function for call to 
'lucene::analysis::snowball::SnowballAnalyzer::SnowballAnalyzer(const char*)'
../../../../clucene-core-2.3.3.4/src/contribs-lib/CLucene/snowball/SnowballAnalyzer.h:32:
 note: candidates are: 
lucene::analysis::snowball::SnowballAnalyzer::SnowballAnalyzer(const TCHAR*, 
const TCHAR**)
../../../../clucene-core-2.3.3.4/src/contribs-lib/CLucene/snowball/SnowballAnalyzer.h:28:
 note: 
lucene::analysis::snowball::SnowballAnalyzer::SnowballAnalyzer(const TCHAR*)
../../../../clucene-core-2.3.3.4/src/contribs-lib/CLucene/snowball/SnowballAnalyzer.h:22:
 note: 
lucene::analysis::snowball::SnowballAnalyzer::SnowballAnalyzer(const 
lucene::analysis::snowball::SnowballAnalyzer)

index-set.default_language is char, but TCHAR is wchar_t but not char?

 
  dovecot: imap(...): Error: fts_lucene: default_language set, but Dovecot 
  built without stemmer support
 
 Fixed: http://hg.dovecot.org/dovecot-2.1/rev/02c84406c661
Without stemmer support it works nicely now though.
One further question: Is fts indexing after delivery still on your TODO list?

Lutz 


Re: [Dovecot] 2.1: problems compiling fts-lucene - CLucene git version necessary?

2011-09-18 Thread Lutz Preßler
Hello,
On So, 11 Sep 2011, Timo Sirainen wrote:
 On 11.9.2011, at 22.22, Lutz Preßler wrote:
  I have problems recompiling the Debian squeeze auto build packages
  with --with-lecene. Is the git (2.3) version of CLucene necessary?
 Yes.
Ok, I now tried to test with clucene-core-2.3.3.4. Quite unsucessfully...
I built libclucene-core-static.a and libclucene-shared-static.a after
changing the cmake option (BUILD_STATIC_LIBRARIES). But despite enabling
BUILD_CONTRIBS, BUILD_CONTRIBS_LIB no snowball/libstemmer has been build.
(I am quite unfamiliar with the cmake process. Timo, maybe you can document
how you build clucene - if you do it youself.)
Anyway, I then changed the Debian auto package source to configure
--with-lucene (but not --with-stemmer), and added/changed include paths
and the static library to get lib21_fts_lucene_plugin.so (and
doveadm/lib20_doveadm_fts_lucene_plugin.so). 
Adding fts and fts_lucene to mail_plugins and fts = lucene in plugin
section this loads fine.
But: trying to use it with SEARCH yields
dovecot: imap(...): Error: fts_lucene: default_language set, but Dovecot built 
without stemmer support
(and 3 times Error: fts: Failed to initialize backend 'lucene': Invalid 
fts_lucene setting)
In fts_lucene_plugin_init_settings (src/plugins/fts-lucene/fts-lucene-plugin.c)
default_language is initally set to 'english', and I don't find a way
to get it unset.
Adding to plugin section
  fts_lucene = default_language=
or 
  fts_lucene = default_language=
does not work. Bug?
I changed the source (set variable to NULL before interpreting the settings)
to fix this.

Now it's crashing though when trying a SEARCH. In
crc32_str_more (crc=0, str=0x0) at crc32.c:87
87  for (; *p != '\0'; p++)
(dovecot src/lib/crc32.c, not clucene). 
I'll send the full back trace seperately.


Lutz


Re: [Dovecot] sharing of non-INBOX namespaces? Re: imapc and imap_acl

2011-09-16 Thread Lutz Preßler
Timo,

On Fri, 16 Sep 2011, Timo Sirainen wrote:

 On Thu, 2011-09-15 at 13:41 +0200, Lutz Preßler wrote:
 
   If you want to access also ~/Maildir2, you'd need to create a
   second shared namespace for it.
  Maybe I mess something up the second time today - but I cannot get
  it to work:
 
 Yeah, it didn't work. Fixed now in hg.
multiple shared namespaces do work now, but:
I retried to have in otherssecond
  prefix = INBOX.shared.%%u.second.
  location = maildir:%%h/Maildir2:INDEX=~/Maildir/shared/%%u/second
This is found to be a configuration error:
Sep 16 20:49:32 host dovecot: imap(5025, testuser): Error: user lpmail: 
Initialization failed: namespace configuration error: Dupl
icate namespace prefix: INBOX.shared.
Sep 16 20:49:32 host dovecot: imap(5025, testuser): Error: Invalid user 
settings. Refer to server log for more information.

I think the test is too strict, as in general prefix = bla.%%u.blubb. does
work for a shared namespace. Or is there some other problem with this
attempt to manually map source to destination structure?

Btw, I found a SIGSEGV when SELECTing INBOX.shared. I'll send it seperately.

Have a nice weekend,
  Lutz


Re: [Dovecot] imapc and imap_acl

2011-09-16 Thread Lutz Preßler
On Tue, 13 Sep 2011, Lutz Preßler wrote:

 On Di, 13 Sep 2011, Timo Sirainen wrote:
  You mean you'd want local ACLs that apply to imapc mailboxes?
 Yes, exactly. Great for integrating legacy IMAP servers without e.g.
 ACL support.
... but as long as imapc parameters are global that's of no real use, I just
realized...
  I think that should work. For example if you set:
  
  mail_location = imapc:~/imapc
  Then for mailbox foo/bar the ACL file should be in 
  ~/imapc/.foo.bar/dovecot-acl
 It almost works:
 Sep 13 18:37:58 hhh dovecot: imap(4482, uuu): Error: 
 file_dotlock_open(/home/uuu/Maildir/gmail/.[Gmail].Alle Nachrichten
 /dovecot-acl) failed: No such file or directory
 After manually creating the .[Gmail].Alle Nachrichten directory, SETACL
 succeeds.
... so this does not really matter yet.

Lutz


[Dovecot] sharing of non-INBOX namespaces? Re: imapc and imap_acl

2011-09-15 Thread Lutz Preßler
Hi,

On Tue, 13 Sep 2011, Lutz Preßler wrote:
 On Di, 13 Sep 2011, Timo Sirainen wrote:
  You mean you'd want local ACLs that apply to imapc mailboxes?
 Yes, exactly. Great for integrating legacy IMAP servers without e.g.
 ACL support.
  I think that should work. For example if you set:
  
  mail_location = imapc:~/imapc
 Oh, had not realized that a path argument is possible for imapc:. There are
 even index file then...
  
  Then for mailbox foo/bar the ACL file should be in 
  ~/imapc/.foo.bar/dovecot-acl
 It almost works:
 Sep 13 18:37:58 hhh dovecot: imap(4482, uuu): Error: 
 file_dotlock_open(/home/uuu/Maildir/gmail/.[Gmail].Alle Nachrichten
 /dovecot-acl) failed: No such file or directory
 After manually creating the .[Gmail].Alle Nachrichten directory, SETACL
 succeeds.
Ok, I thought I tested accessing the mailbox afterwards, too - but I probably
had not.
I have a more general problem now: shared mailboxes from any non-INBOX
namespace are not available to other users. That's not only with virtual or
imapc namespaces, but also tested with two Maildir ones:

namespace personal {
  inbox = yes
  location = maildir:~/Maildir
  prefix = INBOX.
  type = private
}

namespace second {
  inbox = no
  location = maildir:~/Maildir2
  prefix = INBOX.second.
  type = private
}

namespace others {
  type = shared
  separator = .
  prefix = INBOX.shared.%%u.
  location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
  #location = maildir:/home/%%n/Maildir:INDEX=~/Maildir/shared/%%u
  subscriptions = no
  list = children
}

[...]


I can as user1 SETACL INBOX.second.box

~user1/Maildir2/dovecot-acl-list contains 1316082286 box
~user1/Maildir2/.box/dovecot-acl contains user=testuser lrs
(as does ~user1/Maildir/.in2007/dovecot-acl)
The shared mailboxes dict contains 
  shared/shared-boxes/user/testuser/user1
  1

But - as testuser -
0 list  *
* LIST (\HasChildren) . INBOX
* LIST (\HasNoChildren) . INBOX.test
* LIST (\HasNoChildren) . INBOX.second
* LIST (\Noselect \HasChildren) . INBOX.shared.user1
* LIST (\HasNoChildren) . INBOX.virtual
* LIST (\HasNoChildren) . INBOX.shared.user1.in2007
0 OK List completed.

INBOX.shared.user1.second.box is missing. Also

0 select INBOX.shared.user1.second.box
* OK [CLOSED] Previous mailbox closed.
0 NO Mailbox doesn't exist: second.box

Log shows then:
Sep 15 12:39:48 host dovecot: imap(8796, testuser): Debug: acl vfile: file 
/etc/dovecot/global-acls/INBOX.shared.user1.second.box not found
Sep 15 12:39:48 host dovecot: imap(8796, testuser): Debug: acl vfile: file 
/home/user1/Maildir/.second.box/dovecot-acl not found

... not searching for the acl file correctly.


Thought I tested this with earlier (2.0) versions. Changed group set up
inbetween, but this does not seem relevant.

Regards,
 Lutz


Re: [Dovecot] sharing of non-INBOX namespaces? Re: imapc and imap_acl

2011-09-15 Thread Lutz Preßler
On Do, 15 Sep 2011, Timo Sirainen wrote:

 On Thu, 2011-09-15 at 12:46 +0200, Lutz Preßler wrote:
  I have a more general problem now: shared mailboxes from any non-INBOX
  namespace are not available to other users. That's not only with virtual or
  imapc namespaces, but also tested with two Maildir ones:
 
  namespace others {
type = shared
separator = .
prefix = INBOX.shared.%%u.
location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
 
 Right, because here you have configured a shared namespace for
 ~/Maildir.
Uh, oh... of course. Stupid to expect it to work as your proposal for
future extension already... but that would be the most flexible way,
please implement :-).

 If you want to access also ~/Maildir2, you'd need to create a
 second shared namespace for it.
Maybe I mess something up the second time today - but I cannot get
it to work:

namespace others {
  type = shared
  separator = .
  prefix = INBOX.shared.%%u.
  location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
  subscriptions = no
  list = children
}

namespace otherssecond {
  type = shared
  separator = .
  prefix = INBOX.shared2.%%u.
  location = maildir:%%h/Maildir2:INDEX=~/Maildir/shared2/%%u
  subscriptions = no
  list = children
}


As testuser:
0 select INBOX.shared2.user1.box
0 NO Mailbox doesn't exist: shared2.user1.box

with log:
Sep 15 13:28:51 host dovecot: imap(17320, testuser): Debug: acl vfile: file 
/etc/dovecot/global-acls/INBOX.shared2.user1.box not found
Sep 15 13:28:51 host dovecot: imap(17320, testuser): Debug: acl vfile: file 
/home/testuser/Maildir/.shared2.user1.box/dovecot-acl not found

like the otherssecond namespace beeing ignored (yes, I've restarted dovecot).

First I tried in otherssecond
  prefix = INBOX.shared.%%u.second.
  location = maildir:%%h/Maildir2:INDEX=~/Maildir/shared/%%u/second
- don't know if this is even supposed to work, but both variants do not.

Lutz


[Dovecot] unexpected LSUB / LIST (SUBSCRIBED) output Re: Panic: file mailbox-list-subscriptions.c: line 66 (mailbox_list_subscription_fill_one): assertion failed: (ns!= NULL (ns-flags NAMESPACE_

2011-09-15 Thread Lutz Preßler
On Thu, 15 Sep 2011, Timo Sirainen wrote:

 On Wed, 2011-09-14 at 12:10 +0200, Lutz Preßler wrote:
  imap(2717, testuser): Panic: file mailbox-list-subscriptions.c: line
  66 (mailbox_list_subscription_fill_one): assertion failed: (ns!= NULL
   (ns-flags  NAMESPACE_FLAG_AUTOCREATED) != 0)
  
 Fixed: http://hg.dovecot.org/dovecot-2.1/rev/309a707c22c0
No assertion anymore.

0 login testuser password
[...]
0 list  *
* LIST (\HasChildren) . INBOX
* LIST (\HasNoChildren) . INBOX.test
* LIST (\Noselect \HasChildren) . INBOX.shared.user1
* LIST (\HasNoChildren) . INBOX.virtual
* LIST (\HasNoChildren) . INBOX.shared.user1.in2007
0 OK List completed.
0 lsub  *
* LSUB (\Noselect) . INBOX.shared.user1
0 OK Lsub completed.
0 list (subscribed)  *
* LIST (\NonExistent) . INBOX.shared.user1
0 OK List completed.

  ~testuser/Maildir/subscription is empty here

0 subscribe INBOX.shared.user1.in2007
0 OK Subscribe completed.
0 lsub  *
* LSUB (\Noselect) . INBOX.shared.user1
* LSUB () . INBOX.shared.user1.in2007
0 OK Lsub completed.
0 list (subscribed)  *
* LIST (\NonExistent) . INBOX.shared.user1
* LIST (\Subscribed) . INBOX.shared.user1.in2007
0 OK List completed.

 ~testuser/Maildir/subscription now contains shared.user1.in2007

Is this INBOX.shared.user1 LSUB/LIST output correct?

Lutz


[Dovecot] imapc vs auth-userdb security

2011-09-14 Thread Lutz Preßler
Hello,

with imapc settings coming from userdb (individual configuration necessary)
there exists a security problem if access to auth-userdb socket is given
to normal (shell) users:

testuser@host:~$ doveadm user user1
userdb: lpmail
  uid   : 1000
  gid   : 
  home  : /home/user1
  namespace : gmail
  namespace/gmail/list: yes
  namespace/gmail/subscriptions: no
  namespace/gmail/separator: .
  namespace/gmail/prefix: INBOX.gmail.
  namespace/gmail/location: imapc:~/Maildir/gmail
  imapc_host: imap.gmail.com
  imapc_user: someu...@gmail.com
  imapc_password: cleartextpassword!
  imapc_ssl : imaps
  imapc_ssl_ca_dir: /etc/ssl/certs
  imapc_port: 993


Lutz



Re: [Dovecot] imapc vs auth-userdb security

2011-09-14 Thread Lutz Preßler
On Mi, 14 Sep 2011, Timo Sirainen wrote:

 On 14.9.2011, at 14.40, Lutz Preßler wrote:
 
  with imapc settings coming from userdb (individual configuration necessary)
  there exists a security problem if access to auth-userdb socket is given
  to normal (shell) users:
 
 So don't give it to them? :) Actually this should be pretty much solved with 
 v2.1 defaults. If the auth-userdb socket is 0666 root:root (default now), it 
 requires that the calling process either has root user/group privileges or 
 its uid matches the one returned by userdb, otherwise it won't return any 
 fields.
I had to change that because of shared mailboxes and usage of %%h.
Maybe one could return only home if uid does not match?

Lutz


[Dovecot] imapc and imap_acl

2011-09-13 Thread Lutz Preßler
Hello (Timo),

yes, I know... maybe it's a bit far fetched, but I do have a use case.
Would it be (reasonably easily) possible to implement IMAP ACL
support for imported imapc namespaces/mailboxes?
There is no local directory (like with the virtual plugin) yet...

Greetings,
  Lutz


-- 
Lutz Preßler  lutz.press...@sernet.dehttp://www.SerNet.DE/
SerNet Service Network GmbH, Bahnhofsallee 1b, D-37081 Göttingen
Tel.: +49-551-37-2,  FAX: +49-551-37-9
AG Göttingen, HRB 2816,  GF: Dr. Johannes Loxen


Re: [Dovecot] imapc and imap_acl

2011-09-13 Thread Lutz Preßler
On Di, 13 Sep 2011, Timo Sirainen wrote:

 On 13.9.2011, at 19.12, Lutz Preßler wrote:
 
  yes, I know... maybe it's a bit far fetched, but I do have a use case.
  Would it be (reasonably easily) possible to implement IMAP ACL
  support for imported imapc namespaces/mailboxes?
  There is no local directory (like with the virtual plugin) yet...
 
 You mean you'd want local ACLs that apply to imapc mailboxes?
Yes, exactly. Great for integrating legacy IMAP servers without e.g.
ACL support.
 I think that should work. For example if you set:
 
 mail_location = imapc:~/imapc
Oh, had not realized that a path argument is possible for imapc:. There are
even index file then...
 
 Then for mailbox foo/bar the ACL file should be in 
 ~/imapc/.foo.bar/dovecot-acl
It almost works:
Sep 13 18:37:58 hhh dovecot: imap(4482, uuu): Error: 
file_dotlock_open(/home/uuu/Maildir/gmail/.[Gmail].Alle Nachrichten
/dovecot-acl) failed: No such file or directory
After manually creating the .[Gmail].Alle Nachrichten directory, SETACL
succeeds.
 
 Proxying remote IMAP ACLs isn't possible and I'm not sure how that could be 
 nicely implemented.
Would surely have it's use, too (but not here at the moment).

Thanks,
  Lutz



[Dovecot] multiple imapc namespaces Re: imapc and imap_acl

2011-09-13 Thread Lutz Preßler
On Tue, 13 Sep 2011, Lutz Preßler wrote:
 On Di, 13 Sep 2011, Timo Sirainen wrote:
  mail_location = imapc:~/imapc
 Oh, had not realized that a path argument is possible for imapc:. There are
 even index file then...
What about taking imapc parameters/credentials optionally from
a file in this directory (like dovecot-virtual)?

Lutz


[Dovecot] multiple imapc namespaces Re: 2.1: imapc LIST problem / usage question

2011-09-12 Thread Lutz Preßler
On Mo, 12 Sep 2011, Timo Sirainen wrote:

 On Fri, 2011-09-09 at 12:21 +0200, Lutz Preßler wrote:
 
Second question: Is there a way to include multiple imapc instances/
namespaces with e.g. different destinations servers? I don't see how
because imapc_* parameters seem to be global (now), but it would be a 
very
useful feature.
   
   I don't really understand. You're already returning per-user imapc
   namespace from userdb. What's missing?
  One local dovecot user, multiple remote IMAP servers included in different
  namespaces.
 
 I think you should be able to return e.g. namespace=ns1 ns2 and then
 return namespaces for namespace/ns1/* and namespace/ns2/*.
Now _I_ don't really understand ;-). This is necessary, yes, but how
do I set different remote parameters (imapc_host, imapc_user, ...)
for each one?

Lutz


Re: [Dovecot] 2.1: imapc SUBSCRIBE problem

2011-09-12 Thread Lutz Preßler
On Mon, 12 Sep 2011, Timo Sirainen wrote:

 On Sun, 2011-09-11 at 21:50 +0200, Lutz Preßler wrote:
  On Fri, 09 Sep 2011, Lutz Preßler wrote:
   LIST is now working correctly in my setup, but SUBSCRIBE ist not.
   With subscriptions=no, as written (but same behaviour with 
   subscriptions=yes),
   SUBSCRIBE INBOX.gmail.INBOX (or others) yields
   0 NO [SERVERBUG] Internal error occurred. Refer to server log for more 
   information. [2011-09-09 16:39:40]
   logging (with mail_debug=yes) only
   Sep  9 16:39:40 host dovecot: imap(1143, user): Error: stat((null)) 
   failed: Bad address
  After putting (with subscriptions=no) an entry manually into the root
  subscriptions file, everything including UNSUBSCRIBE works fine.
 
 Yeah, but then remote subscriptions don't work. I think the imapc
 subscription problems and namespace prefix problems are now fixed in hg.
Not really. No error on SUBSCRIBE anymore, but it does not work
permanently:

0 lsub  *
* LSUB () . INBOX.test.test2
[... further entries ...]
0 OK Lsub completed.
0 subscribe INBOX.gmail.[Gmail].Spam
0 OK Subscribe completed.
   --- now subscriptions file includes
gmail.[Gmail]/Spam
0 lsub  *
* LSUB () . INBOX.test.test2
[... further entries, but NOT INBOX.gmail.[Gmail].Spam ...]
0 OK Lsub completed.
   --- now the gmail.[Gmail]/Spam line is gone
from subscriptions file again!

The same happens with INBOX.gmail.INBOX, so it's not the [] characters.
I have to test with debugging turned on later.

Lutz


Re: [Dovecot] 2.1: imapc SUBSCRIBE problem

2011-09-12 Thread Lutz Preßler
On Mo, 12 Sep 2011, Timo Sirainen wrote:
 On 12.9.2011, at 21.15, Lutz Preßler wrote:
  Not really. No error on SUBSCRIBE anymore, but it does not work
  permanently:
  
  0 lsub  *
  * LSUB () . INBOX.test.test2
  [... further entries ...]
  0 OK Lsub completed.
  0 subscribe INBOX.gmail.[Gmail].Spam
  0 OK Subscribe completed.
--- now subscriptions file includes
 gmail.[Gmail]/Spam
The problem seems to be the different separators (I missed the /
earlier). First level mailboxes on gmail do work (I mixed it up...
INBOX.gmail.INBOX is fine, as is INBOX.gmail.test).
 
 There shouldn't be any changes to subscriptions file! The subscriptions are 
 stored on remote IMAP server.
Why? With subscriptions=no I would expect the local subscriptions file beeing
used (and this is useful!)
 What exactly have you set to your namespaces now?
The imapc namespace has subscriptions=no.
I also tested subscriptions=yes now. That works as expected. (Some glitch
with INBOX.gmail.[Gmail] not beeing UNSUBSCRIBEbable when \Noselect,
but that's probably a Gmail IMAP problem).

Lutz


[Dovecot] 2.1: problems compiling fts-lucene - CLucene git version necessary?

2011-09-11 Thread Lutz Preßler
Hello!

I have problems recompiling the Debian squeeze auto build packages
with --with-lecene. Is the git (2.3) version of CLucene necessary?
Debian includes 0.9.21b, which does not work.

Lutz


[Dovecot] 2.1: imapc SUBSCRIBE problem

2011-09-11 Thread Lutz Preßler
On Fri, 09 Sep 2011, Lutz Preßler wrote:
 LIST is now working correctly in my setup, but SUBSCRIBE ist not.
 With subscriptions=no, as written (but same behaviour with subscriptions=yes),
 SUBSCRIBE INBOX.gmail.INBOX (or others) yields
 0 NO [SERVERBUG] Internal error occurred. Refer to server log for more 
 information. [2011-09-09 16:39:40]
 logging (with mail_debug=yes) only
 Sep  9 16:39:40 host dovecot: imap(1143, user): Error: stat((null)) failed: 
 Bad address
After putting (with subscriptions=no) an entry manually into the root
subscriptions file, everything including UNSUBSCRIBE works fine.

Lutz


[Dovecot] 2.1: imapc LIST problem / usage question

2011-09-09 Thread Lutz Preßler
- Forwarded message from SerNet Support Lutz Preßler supp...@sernet.de 
-

From: SerNet Support Lutz Preßler supp...@sernet.de
Subject: 2.1: imapc LIST problem / usage question
To: dovecot@dovecot.org
Date: Fri, 9 Sep 2011 12:00:46 +0200
Organization: SerNet Service Network GmbH

Hello,

2.1.alpha1 (latest Debian auto build on amd64)

As a test, namespace for gmail integration set up by userdb
with
userdb_namespace=gmail userdb_namespace/gmail/list=yes 
userdb_namespace/gmail/subscriptions=no userdb_namespace/gmail/separator=. 
userdb_namespace/gmail/prefix=INBOX.gmail. 
userdb_namespace/gmail/location=imapc: userdb_imapc_host=imap.gmail.com 
userdb_imapc_user=ixx...@gmail.com userdb_imapc_password=x 
userdb_imapc_ssl=imaps userdb_imapc_ssl_ca_dir=/etc/ssl/certs 
userdb_imapc_port=993

(but having the namespace set up in config file makes no difference).

This works in principle. I can e.g.

0 select INBOX.gmail.[Gmail].Alle Nachrichten
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags 
permitted.
* 31 EXISTS
* 0 RECENT
* OK [UNSEEN 1] First unseen.
* OK [UIDVALIDITY 1] UIDs valid
* OK [UIDNEXT 19689] Predicted next UID
* OK [NOMODSEQ] No permanent modsequences
0 OK [READ-WRITE] Select completed.

and even use the gmail mailboxes within dovecot-virtual files!

But: LIST seems broken:

0 list  *   

* LIST (\HasChildren) . INBOX   

* LIST (\HasNoChildren) . INBOX.privat  

* LIST (\HasChildren) . INBOX.test  

* LIST (\HasNoChildren) . INBOX.test.test2  

* LIST (\HasNoChildren) . INBOX.Trash
* LIST (\HasNoChildren) . INBOX.in2009
[...]
* LIST (\Noselect \HasChildren) . INBOX.gmail
* LIST (\HasNoChildren) . Arbeit
* LIST (\HasNoChildren) . Belege
* LIST (\HasNoChildren) . Privat
* LIST (\HasNoChildren) . Reisen
* LIST (\Noselect \HasNoChildren) . [Gmail]
* LIST (\HasNoChildren) . [Gmail]/Alle Nachrichten
* LIST (\HasNoChildren) . [Gmail]/Entw-APw-rfe
* LIST (\HasNoChildren) . [Gmail]/Gesendet
* LIST (\HasNoChildren) . [Gmail]/Markiert
* LIST (\HasNoChildren) . [Gmail]/Papierkorb
* LIST (\HasNoChildren) . [Gmail]/Spam
* LIST (\HasNoChildren) . [Gmail]/Wichtig
* LIST (\HasChildren) . INBOX.virtual
* LIST (\HasNoChildren) . INBOX.virtual.week
* LIST (\HasNoChildren) . INBOX.virtual.sent
* LIST (\HasNoChildren) . INBOX.virtual.allin
0 OK List completed.

For the Gmail mailboxe the INBOX.gmail prefix is missing and / is used
as separator.

Second question: Is there a way to include multiple imapc instances/
namespaces with e.g. different destinations servers? I don't see how
because imapc_* parameters seem to be global (now), but it would be a very
useful feature.

Greetings,
  Lutz  



Re: [Dovecot] 2.1: imapc LIST problem / usage question

2011-09-09 Thread Lutz Preßler
On Fr, 09 Sep 2011, Timo Sirainen wrote:

 On Fri, 2011-09-09 at 12:01 +0200, Lutz Preßler wrote:
[...]
  For the Gmail mailboxe the INBOX.gmail prefix is missing and / is used
  as separator.
 
 Fixed in hg.
Thanks.
 
  Second question: Is there a way to include multiple imapc instances/
  namespaces with e.g. different destinations servers? I don't see how
  because imapc_* parameters seem to be global (now), but it would be a very
  useful feature.
 
 I don't really understand. You're already returning per-user imapc
 namespace from userdb. What's missing?
One local dovecot user, multiple remote IMAP servers included in different
namespaces.

Lutz


Re: [Dovecot] 2.1: imapc LIST problem / usage question

2011-09-09 Thread Lutz Preßler
On Fr, 09 Sep 2011, Lutz Preßler wrote:

 On Fr, 09 Sep 2011, Timo Sirainen wrote:
 
  On Fri, 2011-09-09 at 12:01 +0200, Lutz Preßler wrote:
 [...]
   For the Gmail mailboxe the INBOX.gmail prefix is missing and / is used
   as separator.
  
  Fixed in hg.
 Thanks.
LIST is now working correctly in my setup, but SUBSCRIBE ist not.
With subscriptions=no, as written (but same behaviour with subscriptions=yes),
SUBSCRIBE INBOX.gmail.INBOX (or others) yields
0 NO [SERVERBUG] Internal error occurred. Refer to server log for more 
information. [2011-09-09 16:39:40]
logging (with mail_debug=yes) only
Sep  9 16:39:40 host dovecot: imap(1143, user): Error: stat((null)) failed: Bad 
address


Lutz



[Dovecot] 2.1.alpha1: SIGSEGV on EXPUNGE

2011-09-05 Thread Lutz Preßler
Hi,

I upgraded my test installation from Debian lenny with latest
2.0.14 auto builds to squeeze with v2.1.alpha1 (amd64) auto builds.
(From /var/log/mail.log:
  Sep  5 12:34:45 pressler dovecot: master: Dovecot v2.1.alpha1 starting up 
(core dumps disabled)
No hg hash tag in log output anymore?)

Now the imap processes segfault on every EXPUNGE command:

Excerpt from telnet session:
0 store 1585:1585 flags \Deleted
* 1585 FETCH (FLAGS (\Deleted))
0 OK Store completed.
0 expunge

Log output:
Sep  5 15:40:59 pressler dovecot: imap(2580, lpmail): delete: box=INBOX, 
uid=34722, msgid=e1r0zjw-00frf7...@intern.sernet.de, size=1980, vsize=2031, 
from=Lutz Pressler lutz.press...@sernet.de, flags=(\Deleted)
Sep  5 15:41:22 pressler dovecot: imap(2580, lpmail): expunge: box=INBOX, 
uid=34722, msgid=e1r0zjw-00frf7...@intern.sernet.de, size=1980, vsize=2031, 
from=Lutz Pressler lutz.press...@sernet.de, flags=(\Deleted)
Sep  5 15:41:22 pressler dovecot: master: Error: service(imap): child 2580 
killed with signal 11 (core dumps disabled)

Also happens with mail_log plugin disabled.

Any idea? Configuration on request (or tests with core dumps enabled).

Regards,
  Lutz

-- 
Lutz Preßler  lutz.press...@sernet.dehttp://www.SerNet.DE/
SerNet Service Network GmbH, Bahnhofsallee 1b, D-37081 Göttingen
Tel.: +49-551-37-2,  FAX: +49-551-37-9
AG Göttingen, HRB 2816,  GF: Dr. Johannes Loxen


Re: [Dovecot] LDA and auth-userdb socket permissions

2011-08-23 Thread Lutz Preßler
On Di, 23 Aug 2011, a.smith at ukgrid.net wrote:
 Quoting Timo Sirainen tss at iki.fi:
 
 
  It doesn't have to be the primary group. This is more of an Exim side
  problem that it doesn't assign the supplementary groups (if it did, it
  would have worked with dovecot-lda). I don't think the way you
You probably can use the Exim transport (or router) option initgroups.

Lutz


[Dovecot] example-config mail_log plugin options

2011-04-29 Thread Lutz Preßler
Hello,

dovecot-2.0.12/doc/example-config/conf.d/10-logging.conf
contains

# mail_log plugin provides more event logging for mail processes.
plugin {
  # Events to log. Also available: flag_change append
  #mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
  # Group events within a transaction to one line.
  #mail_log_group_events = no
  # Available fields: uid, box, msgid, from, subject, size, vsize, flags
  # size and vsize are available only for expunge and copy events.
  #mail_log_fields = uid box msgid size
}


mail_log_group_events seems to be gone (when and why?). And it's now
save instead of append, with mailbox_create also available.

Greetings,
  Lutz Pressler

-- 
Lutz Preßler  lutz.press...@sernet.dehttp://www.SerNet.DE/
SerNet Service Network GmbH, Bahnhofsallee 1b, D-37081 Göttingen
Tel.: +49-551-37-2,  FAX: +49-551-37-9
AG Göttingen, HRB 2816,  GF: Dr. Johannes Loxen


Re: [Dovecot] problem with virtual plugin/index files?

2010-12-02 Thread Lutz Preßler
Hello,

Timo: on Oct 29th I wrote


with latest 2.0.6 (601065674f74), the following virtual mailbox
is not behaving correctly. I'm quite sure that the problem has not
existed in some earlier 2.0.x (maybe only INBOX as mailbox then
though):

~user/Maildir/virtual/.week/dovecot-virtual contains

INBOX
INBOX.*
-INBOX.Trash
 inthread refs younger 604800

This works as expected for the first time. But later on, also older messages/
threads are included until I delete the virtual/.week/dovecot.index*.


Just want to state that this problem still persists with latest
version. Any idea?

Thanks and greetings,
  Lutz

-- 
Lutz Preßler  lutz.press...@sernet.dehttp://www.SerNet.DE/
SerNet Service Network GmbH, Bahnhofsallee 1b, D-37081 Göttingen
Tel.: +49-551-37-2,  FAX: +49-551-37-9
AG Göttingen, HRB 2816,  GF: Dr. Johannes Loxen


[Dovecot] problem with virtual plugin/index files?

2010-10-29 Thread Lutz Preßler
Hello,

with latest 2.0.6 (601065674f74), the following virtual mailbox
is not behaving correctly. I'm quite sure that the problem has not
existed in some earlier 2.0.x (maybe only INBOX as mailbox then
though):

~user/Maildir/virtual/.week/dovecot-virtual contains

INBOX
INBOX.*
-INBOX.Trash
 inthread refs younger 604800

This works as expected for the first time. But later on, also older messages/
threads are included until I delete the virtual/.week/dovecot.index*.


Greetings, 
  Lutz

-- 
Lutz Preßler  lutz.press...@sernet.dehttp://www.SerNet.DE/
SerNet Service Network GmbH, Bahnhofsallee 1b, D-37081 Göttingen
Tel.: +49-551-37-2,  FAX: +49-551-37-9
AG Göttingen, HRB 2816,  GF: Dr. Johannes Loxen


[Dovecot] changed separator/sharing of subfolders (Re: problem with subscriptions=no and changed separator ?)

2010-10-18 Thread Lutz Preßler
Hello,

another problem with changed separator (2.0.5-0~auto+23 (b8803a1e2dc2)).
I tried sharing virtual folders (see next mail), and noticed that sharing of
subfolders does not seem to work if the receiving user has a changed
separator (different separator/prefix settings through userdb_namespace
attributes).

As user:
0 getacl INBOX.test
* ACL INBOX.test testuser lrs user lrwstipekxacd
0 getacl INBOX.test.test2
* ACL INBOX.test.test2 testuser lrs user lrwstipekxacd

(but also tested with more rights for testuser)

As testuser with unchanged separator:

0 list  *  [includes:]
* LIST (\Noselect \HasChildren) . INBOX.shared.user
* LIST (\HasChildren) . INBOX.shared.user.test
* LIST (\HasNoChildren) . INBOX.shared.user.test.test2

and
0 select INBOX.shared.lpmail.test.test2
works.

As testuser with separator=^:

0 list  *  [includes:]
* LIST (\Noselect \HasChildren) ^ INBOX^shared^lpmail
* LIST (\HasNoChildren) ^ INBOX^shared^lpmail^test

INBOX^shared^lpmail^test^test2 is missing.

0 select INBOX^shared^lpmail^test2
0 NO Mailbox doesn't exist: INBOX^shared^lpmail^test2

(also tested without having everything under INBOX).

No error messages in log.

Regards,
  Lutz

-- 
Lutz Preßler  lutz.press...@sernet.dehttp://www.SerNet.DE/
SerNet Service Network GmbH, Bahnhofsallee 1b, D-37081 Göttingen
Tel.: +49-551-37-2,  FAX: +49-551-37-9
AG Göttingen, HRB 2816,  GF: Dr. Johannes Loxen


[Dovecot] sharing of virtual folders?

2010-10-18 Thread Lutz Preßler
Hello,

Debian 2.0.5-0~auto+23 (b8803a1e2dc2):

Is sharing of virtual folders supposed to work?

namespace virtual {
  location = virtual:~/Maildir/virtual:LAYOUT=maildir++
  prefix = INBOX.virtual.
  type = private
}

with (as user)
0 getacl INBOX.virtual.week
* ACL INBOX.virtual.week testuser lrs user lrwstipekxacd

virtual.week is neither LISTed or SELECTable under shared of testuser.
Also tried with full rights and right to INBOX.virtual for testuser.

No errors logged.

Greetings,
  Lutz

-- 
Lutz Preßler  lutz.press...@sernet.dehttp://www.SerNet.DE/
SerNet Service Network GmbH, Bahnhofsallee 1b, D-37081 Göttingen
Tel.: +49-551-37-2,  FAX: +49-551-37-9
AG Göttingen, HRB 2816,  GF: Dr. Johannes Loxen


Re: [Dovecot] changed separator/sharing of subfolders (Re: problem with subscriptions=no and changed separator ?)

2010-10-18 Thread Lutz Preßler
On Mon, 18 Oct 2010, Timo Sirainen wrote:
 On Mon, 2010-10-18 at 11:06 +0200, Lutz Preßler wrote:
 
  another problem with changed separator (2.0.5-0~auto+23 (b8803a1e2dc2)).
  I tried sharing virtual folders (see next mail), and noticed that sharing of
  subfolders does not seem to work if the receiving user has a changed
Subfolder is important. Mailbox directly within the namespace does work. 
  separator (different separator/prefix settings through userdb_namespace
  attributes).
(I only partly substituted lpmail with user in my mail, sorry for that.
I'll use the unchanged lpmail username now.)
 
 The separators are always stored using the physical separator and only
 converted to namespace's virtual separator when needed. So your question
 comes down to shared mailboxes don't work if I change namespace
 separator to different from the physical separator. But people have
 been doing that for a long time..
Are you sure? (for deeper levels)
 
 If you set mail_debug=yes, what does it log with separator=. and with
 separator=^? 
The main difference is
Debug: acl: Mailbox not in dovecot-acl-list: INBOX^shared^lpmail^test^test2

~lpmail/Maildir/dovecot-acl-list contains
1287438561 test
1287390299 test.test2
1285453373 in2009

But even if I delete ~lpmail/Maildir/dovecot-acl-list, with separator set to ^,
test.test2 is not included in the recreated file (and still not listed).

(Not using global-acls at the moment. But debug output also contains
Debug: acl vfile: file /etc/dovecot/global-acls/INBOX^shared^lpmail^test not 
found
Shouldn't that be file /etc/dovecot/global-acls/INBOX.shared.lpmail.test as per 
wiki2.dovecot.org/ACL ? And strace shows that it rellay tries to open the path
with ^s.)
 
Also does it happen to work if you set separator=/?
No, same problem.

Thanks,
  Lutz


-- 
Lutz Preßler  lutz.press...@sernet.dehttp://www.SerNet.DE/
SerNet Service Network GmbH, Bahnhofsallee 1b, D-37081 Göttingen
Tel.: +49-551-37-2,  FAX: +49-551-37-9
AG Göttingen, HRB 2816,  GF: Dr. Johannes Loxen


Re: [Dovecot] sharing of virtual folders?

2010-10-18 Thread Lutz Preßler
On Mon, 18 Oct 2010, Timo Sirainen wrote:

 On Mon, 2010-10-18 at 11:21 +0200, Lutz Preßler wrote:
 
  Is sharing of virtual folders supposed to work?
 
 Not really.. So you were thinking about giving some access to the
 virtual folder, but not to the actual backend folders?
Yes, I can imagine use for that. But even if the backend folders
are accessible, it would be conveniant not to manage dovecot-virtual
files for the importing users (and it's more natural to have
some view of shared folder(s) in the shared namespace).

Anyway, quite low priority, I suppose.

Lutz

-- 
Lutz Preßler  lutz.press...@sernet.dehttp://www.SerNet.DE/
SerNet Service Network GmbH, Bahnhofsallee 1b, D-37081 Göttingen
Tel.: +49-551-37-2,  FAX: +49-551-37-9
AG Göttingen, HRB 2816,  GF: Dr. Johannes Loxen


Re: [Dovecot] lazy_expunge and moving messages

2010-10-14 Thread Lutz Preßler
On Thu, 14 Oct 2010, Timo Sirainen wrote:
 On Fri, 2010-10-08 at 13:29 +0200, Lutz Preßler wrote:
  Maybe it's possible to extend the plugin to optionally hook into the COPY
  operation, remember it somewhere with the message (simply as special/
  configurable IMAP flag?), and then really expunge messages with this
  flag set. What do you think?
 
 Tricky. Deleting messages is done by many clients by moving to Trash. In
 such situation it's better to have the original messages in the original
 mailbox, otherwise everything would end up in Trash.
I think that the lazy_expunge plugin is especially usefull for users not
using Trash folders (of course, it helps against accidental deletions with
Trash folders purged automatically on exit...). move detection should
be optional, of course. 

Lutz


[Dovecot] lazy_expunge and moving messages

2010-10-08 Thread Lutz Preßler
Hello,

testing the lazy_expunge plugin (with 2.0.5), I realized the
following effect, which users may not expect/understand:

As moving messages from one folder to another has to be done by
clients with the IMAP command sequence COPY STORE EXPUNGE, every moved
message is also put into the shadow folder of the source folder.

Maybe it's possible to extend the plugin to optionally hook into the COPY
operation, remember it somewhere with the message (simply as special/
configurable IMAP flag?), and then really expunge messages with this
flag set. What do you think? I haven't looked into the plugin interface yet.
Of course, if a user manually copies a message and deletes the source
message later (maybe having the copy deleted inbetween...), the consequence
may not be expected either...

Greetings,
   Lutz

-- 
Lutz Preßler  lutz.press...@sernet.dehttp://www.SerNet.DE/
SerNet Service Network GmbH, Bahnhofsallee 1b, D-37081 Göttingen
Tel.: +49-551-37-2,  FAX: +49-551-37-9
AG Göttingen, HRB 2816,  GF: Dr. Johannes Loxen


[Dovecot] Panic: file index-search-result.c .. assertion failed: (next_uid == mail-uid)

2010-10-07 Thread Lutz Preßler
Hello,

with 2.0.5-0~auto+9 (6ea01abfaea9), haven't seen it earlier (but
of course index files have changed):

Oct  7 09:40:09 host dovecot: imap(user): Panic: file index-search-result.c: 
line 87 (search_result_update_search): assertion failed: (next_uid == mail-uid)
Oct  7 09:40:09 host dovecot: imap(user): Error: Raw backtrace: 
/usr/lib/dovecot/libdovecot.so.0 [0x7f964c5b7842] - /usr/lib/
dovecot/libdovecot.so.0 [0x7f964c5b78aa] - 
/usr/lib/dovecot/libdovecot.so.0(i_error+0) [0x7f964c5b7c53] - 
/usr/lib/dovecot/libdove
cot-storage.so.0(index_search_result_update_flags+0x2d8) [0x7f964c83e4d8] - 
/usr/lib/dovecot/modules/lib20_virtual_plugin.so [0x7f9
64a9c4b92] - 
/usr/lib/dovecot/modules/lib20_virtual_plugin.so(virtual_storage_sync_init+0x871)
 [0x7f964a9c5561] - /usr/lib/dovecot
/libdovecot-storage.so.0(mailbox_sync_init+0x31) [0x7f964c8262d1] - 
/usr/lib/dovecot/libdovecot-storage.so.0(mailbox_sync+0x27) [0x
7f964c826a87] - dovecot/imap(cmd_select_full+0x264) [0x40d964] - dovecot/imap 
[0x41047c] - dovecot/imap [0x41052d] - dovecot/ima
p(client_handle_input+0x45) [0x4106a5] - dovecot/imap(client_input+0x62) 
[0x4110d2] - /usr/lib/dovecot/libdovecot.so.0(io_loop_han
dler_run+0xcb) [0x7f964c5c293b] - 
/usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x18) [0x7f964c5c1a58] - 
/usr/lib/dovecot/libdoveco
t.so.0(master_service_run+0x13) [0x7f964c5b0f93] - dovecot/imap(main+0x281) 
[0x419391] - /lib/libc.so.6(__libc_start_main+0xe6) [0x7f964be3b1a6] - 
dovecot/imap [0x408c79]

when SELECTing virtual folder sent (.sent/dovecot-virtual is
INBOX
  header return-path l...@pressler.de 
), IMAP session is terminated.

After moving .sent/dovecot.index[.log], everything works fine again.
I can send you the broken(?) index files, if appropriate.

Lutz

-- 
Lutz Preßler  lutz.press...@sernet.dehttp://www.SerNet.DE/
SerNet Service Network GmbH, Bahnhofsallee 1b, D-37081 Göttingen
Tel.: +49-551-37-2,  FAX: +49-551-37-9
AG Göttingen, HRB 2816,  GF: Dr. Johannes Loxen


[Dovecot] problem with subscriptions=no and changed separator ?

2010-10-06 Thread Lutz Preßler
Hello,

Dovecot 2.0.5+ (Debian automatic package 2.0.5-0~auto+5).
If I use the following namespace definitions

namespace personal {
  inbox = yes
  location = maildir:~/Maildir
  separator = ^
  prefix =
  type = private
}
namespace others {
  type = shared
  separator = ^
  prefix = shared^%%u^
  location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
  subscriptions = no
  list = children
}
namespace virtual {
  location = virtual:~/Maildir/virtual:LAYOUT=maildir++
  separator = ^
  prefix = virtual^
  type = private
}
(virtual should not matter, but I have not tested without.)

I have problems with subscriptions for the shared mailboxes:
SUBSCRIBE ^shared^user^box leads to entry
  shared^user^box
in ~/Maildir/subscriptions file. All subscriptions for folders in
personal namespace use the layout separator (.) thought.
LSUB  *  does not show the just subscribed folder,
but it does after I manually change the entry to read
  shared.user.box

Bug?

Thanks for your work,
  Lutz

-- 
Lutz Preßler  lutz.press...@sernet.dehttp://www.SerNet.DE/
SerNet Service Network GmbH, Bahnhofsallee 1b, D-37081 Göttingen
Tel.: +49-551-37-2,  FAX: +49-551-37-9
AG Göttingen, HRB 2816,  GF: Dr. Johannes Loxen


Re: [Dovecot] [checkpassword] I can't get a password from fd3

2009-01-12 Thread Lutz Preßler
Hello Durk,

Am Montag, 12. Januar 2009 schrieb Durk Strooisma:
 I'm trying to implement checkpassword authentication with a simple bash
 script. In some way I can't get the password from file descriptor 3.
 
 The start of script looks like this:
 
 #!/bin/bash
 
 read -d '\0' -r -u 3
You are missing the correct syntax to interpret backslash escapes here:

read -d $'\0' -r -u 3

will work. 

Lutz



[Dovecot] problem with POP3 mail location when using namespaces

2007-03-28 Thread Lutz Preßler
Hello,

I have a problem (at least with 1.0rc28 and 1.0rc27) when using
the following namespace definitions:

namespace private {
  separator = /
  inbox = yes
  location = mbox:~/Mail:INBOX=/var/spool/mail/%u
}

namespace public {
  separator = /
  prefix = 0-LISTS/
  location = mbox:/var/mail/lists:INDEX=~/.sharedMail/lists/index
}

namespace private {
  separator = /
  prefix = 0-MAILDIR-FOLDERS/
  location = maildir:~/Maildir
}

IMAP access is working as expected, but when connecting with POP3(s),
the (mostly empty in our case) ~/Maildir is used as mail location
when it has been created (including index files) by IMAP access.
If ~/Maildir does not exist/has been deleted again, POP3 uses
/var/spool/mail/%u.
This is independent of the private namespace section order and
also an explicit inbox = no in 0-MAILDIR-FOLDERS namespace.

Any idea if this is an configuration issue I don't understand yet
or a bug?

Thanks,
  Lutz

-- 
Lutz Preßler  [EMAIL PROTECTED]http://www.SerNet.DE/
SerNet Service Network GmbH, Bahnhofsallee 1b, D-37081 Göttingen
Tel.: +49-551-37-2,  FAX: +49-551-37-9
AG Göttingen, HRB 2816,  GF: Dr. Johannes Loxen