Re: [Dovecot] migration dove 2.0 2.1 shared namespace acl broken / shared/%%n/ works / solved by remove listescape

2012-04-23 Thread Robert Schetterer
Am 23.04.2012 13:12, schrieb Timo Sirainen:
> On 19.4.2012, at 23.27, Robert Schetterer wrote:
> 
>>> prefix = shared/%%u/ simply dont works
>>>
>>> i have reverted back to exact namespace config
>>> of the 2.0.20 server, same result, so something broken in 2.1
>>>
>>>
>> Hi Timo
>> problem solved by removing listescape plugin
>> the acl paths did / instead of dot in domainname
>>
>> any chance to get listescape fixed ?
> 
> Ah, that makes it easy to fix: 
> http://hg.dovecot.org/dovecot-2.1/rev/63af3274fb6f
> 

Hi Timo, for small tests
problem seems to be fixed, thx youre great

-- 
Best Regards

MfG Robert Schetterer

Germany/Munich/Bavaria


Re: [Dovecot] dsync on large mailbox "fails"

2012-04-23 Thread Jeff Kletsky

On 4/23/12 12:56 PM, Jeff Kletsky wrote:
I've been trying to convert an existing set of mbox mail to maildir 
using dsync, but it seems to fail when it gets to the large boxes.


$ dsync -Dv mirror maildir:~/Maildir

Everything seems to work reasonably well until the first of the large 
boxes hits:


dsync(jeff): Warning: Maildir /home/jeff/Maildir/.cron.2010-07-10: 
Synchronization took 1210 seconds (102289 new msgs, 0 flag change 
attempts, 0 expunge attempts)
dsync(jeff): Warning: Transaction log file 
/home/jeff/Maildir/.cron.2010-07-10/dovecot.index.log was locked for 
1210 seconds


After this, the doveadm process goes from ~75% of the CPU core 
utilization to 100% and stays there, even overnight.




I believe that some of problem may be that there were a handful of boxes 
named with "." in them. These were not "flagged" in the conversion 
process in any way.


http://wiki2.dovecot.org/Migration/MailFormat indicates that you can't 
have a "." in the name of a Maildir box


(I dutifully stopped reading that page at "If you can successfully use 
dsync, you can skip the rest of this page.")


In my case, it may be a contributing factor that there were boxes that 
ended up "stacking" inside each other:

* cron
* cron.2010-07-10
* cron.2010-07-10.remaining

Still not blisteringly fast, but

dsync(jeff): Warning: Maildir /home/jeff/Maildir/.cron_2010-07-10: 
Synchronization took 686 seconds (102289 new msgs, 0 flag change 
attempts, 0 expunge attempts)
dsync(jeff): Warning: Transaction log file 
/home/jeff/Maildir/.cron_2010-07-10/dovecot.index.log was locked for 686 
seconds


is certainly better.

I'm still seeing 100% CPU utilization, with the tail of ls -Altr in 
~/Maildir showing


drwx--  5 jeff  jeff   512 Apr 23 18:19 .XDA
drwx--  5 jeff  jeff   512 Apr 23 18:19 .Spam
drwx--  5 jeff  jeff   512 Apr 23 18:42 .Health
drwx--  5 jeff  jeff   512 Apr 23 18:42 .cron_2010-07-10_remaining
drwx--  5 jeff  jeff   512 Apr 23 18:58 .cron_2010-07-10

It appears from looking in the .cron_2010-07-10 directory that indexing 
is the action underway


[jeff@mail ~/Maildir]$ ls -Altr .cron_2010-07-10
total 27
drwx--  2 jeff  jeff  512 Apr 23 18:15 new
-rw---  1 jeff  jeff0 Apr 23 18:15 maildirfolder
drwx--  2 jeff  jeff  5819392 Apr 23 18:42 tmp
drwx--  2 jeff  jeff  5237248 Apr 23 18:42 cur
-rw---  1 jeff  jeff  4122971 Apr 23 18:42 dovecot-uidlist
-rw---  1 jeff  jeff   36 Apr 23 18:42 dovecot-keywords
-rw---  1 jeff  jeff  1650764 Apr 23 18:42 dovecot.index.log.2
-rw---  1 jeff  jeff  1637008 Apr 23 18:42 dovecot.index
-rw---  1 jeff  jeff56124 Apr 23 19:04 dovecot.index.log
-rw---  1 jeff  jeff  9442304 Apr 23 19:04 dovecot.index.cache
-rw---  1 jeff  jeff   24 Apr 23 19:04 dovecot-uidlist.lock

(time passes)

It is now 20:35 and it has not advanced. I now no longer believe the 
problem is the mailbox naming, but the indexing.


  PID USERNAMETHR PRI NICE   SIZERES STATE   C   TIME   WCPU 
COMMAND
25934 jeff  1 1030   135M   102M CPU22 128:47 100.00% 
doveadm


[jeff@mail ~/Maildir]$ ls -Altr .cron_2010-07-10
total 28
drwx--  2 jeff  jeff  512 Apr 23 18:15 new
-rw---  1 jeff  jeff0 Apr 23 18:15 maildirfolder
drwx--  2 jeff  jeff  5819392 Apr 23 18:42 tmp
drwx--  2 jeff  jeff  5237248 Apr 23 18:42 cur
-rw---  1 jeff  jeff  4122971 Apr 23 18:42 dovecot-uidlist
-rw---  1 jeff  jeff   36 Apr 23 18:42 dovecot-keywords
-rw---  1 jeff  jeff  1650764 Apr 23 18:42 dovecot.index.log.2
-rw---  1 jeff  jeff  1637008 Apr 23 20:26 dovecot.index
-rw---  1 jeff  jeff   289120 Apr 23 20:36 dovecot.index.log
-rw---  1 jeff  jeff  9442304 Apr 23 20:36 dovecot.index.cache
-rw---  1 jeff  jeff   24 Apr 23 20:36 dovecot-uidlist.lock


Any suggestions as to how to proceed?

Jeff




Re: [Dovecot] v2.1.5 released

2012-04-23 Thread Asai
Let me also thank you, Timo, for your selfless excellence in developing 
Dovecot.


--asai


On 4/23/2012 6:49 AM, Timo Sirainen wrote:

http://dovecot.org/releases/2.1/dovecot-2.1.5.tar.gz
http://dovecot.org/releases/2.1/dovecot-2.1.5.tar.gz.sig

A few announcements first:

I'm now going to start being more strict about not answering Dovecot questions 
sent to me privately (especially support requests, but also bug reports, 
feature requests, etc). Often those questions could be answered by other people 
in the mailing list as well, so they just waste my time. Even if you're sure 
that I'm the only person who can possibly answer it, it may be something that 
others are interested of as well and replying privately denies them the 
possibility of reading about it. If you really do not want to send something 
publicly, you still have an option for private communication: just buy one of 
the Dovecot support packages.

This is also the first Dovecot release that has run through automated release 
testing. I've been planning on doing that for last 5 years at least, and 
finally it's done. The testing includes running a lot of tests to verify that 
the IMAP server gives proper responses, stress testing doesn't break it, memory 
isn't leaked and several other things. The tests are run for many different 
kinds of configurations.

Some bugs show up only for some specific combination of settings, but 
unfortunately because there's such a large number of them it's impossible to 
test every combination. So here's another advantage that Dovecot support 
customers have: they can have their specific configuration included in the 
automated tests. This release already fixes one bug I found only after testing 
a customer's config.

Oh, and looks like I got accepted as a speaker to LinuxTag 2012. The plan is to 
talk about some new things in Dovecot and dsync replication (looks like I have 
to hurry up with the dsync rewrite).

And finally, the most important changes since v2.1.4:

* IMAP: When neither the session nor the mailbox has modseq tracking
  enabled, return the mailbox as having NOMODSEQ in SELECT/EXAMINE
  reply. Old versions in this situation always simply returned
  HIGHESTMODSEQ as 1, which could have broken some clients.

+ dict file: Added optional fcntl/flock locking (default is dotlock)
+ fts-solr: doveadm fts rescan now resets indexes, which allows
  reindexing mails. (This isn't a full rescan implementation like
  fts-lucene has.)
+ doveadm expunge: Added -d parameter to delete mailbox if it's
  empty after expunging.
- IMAP: Several fixes related to mailbox listing in some configs
- director: A lot of fixes and performance improvements
- v2.1.4 didn't work without a mail home directory set
- mbox: Deleting a mailbox didn't delete its index files.
- pop3c: TOP command was sent incorrectly
- trash plugin didn't work properly
- LMTP: Don't add a duplicate Return-Path: header when proxying.
- listescape: Don't unescape namespace prefixes.



[Dovecot] trash plugin bug?

2012-04-23 Thread Cor Bosman
Hey all, has anyone ever tried turning on the trash plugin when the directory 
is already  over quota?  I see some messages being deleted, but it seems it 
just deletes enough to fit the new email, not enough to go below quota. Example:

. getquotaroot "Spam"
* QUOTAROOT "Spam" "User quota" "Spam Quota"
* QUOTA "User quota" (STORAGE 591036 5242880)
* QUOTA "Spam Quota" (STORAGE 21173 20480)

I now move a 5K message into this folder, and I see:

Apr 23 22:26:43 lmtp1 dovecot: imap(cor): expunge: box=Spam, uid=226337, 
msgid=<3yvkiie4ii6r0064ba7im55c2q4md01vx12...@shedevils.com>, size=12984
Apr 23 22:26:43 lmtp1 dovecot: imap(cor): expunge: box=Spam, uid=226338, 
msgid=, size=5623
Apr 23 22:26:43 lmtp1 dovecot: imap(cor): save: box=Spam, uid=227759, 
msgid=<20120423191509.f3b584a3...@signal.groundspeak.com>, size=2694

And now:

. getquotaroot "Spam"
* QUOTAROOT "Spam" "User quota" "Spam Quota"
* QUOTA "User quota" (STORAGE 591016 5242880)
* QUOTA "Spam Quota" (STORAGE 21158 20480)
. OK Getquotaroot completed.

This seems like a possible bug.  For one, it shouldnt be allowed to actually 
save a message into that folder, but it does. The email does end up in the Spam 
folder even though the folder is over quota. And of course it doesnt clear up 
enough space to have the new email fit, it just deleted enough to match the 5K. 

Without the trash plugin quota is being properly enforced. 

Everything works fine if you start out below the quota limit btw.

Regards,

Cor

ps: this is 2.1.4, but with the recent trash and quota patches applied.

[Dovecot] dsync on large mailbox "fails"

2012-04-23 Thread Jeff Kletsky
I've been trying to convert an existing set of mbox mail to maildir 
using dsync, but it seems to fail when it gets to the large boxes.


$ dsync -Dv mirror maildir:~/Maildir

Everything seems to work reasonably well until the first of the large 
boxes hits:


dsync(jeff): Warning: Maildir /home/jeff/Maildir/.cron.2010-07-10: 
Synchronization took 1210 seconds (102289 new msgs, 0 flag change 
attempts, 0 expunge attempts)
dsync(jeff): Warning: Transaction log file 
/home/jeff/Maildir/.cron.2010-07-10/dovecot.index.log was locked for 
1210 seconds


After this, the doveadm process goes from ~75% of the CPU core 
utilization to 100% and stays there, even overnight.


I've also tried

$ dsync -Dv backup maildir:~/Maildir

with similar results.

While I did see some threads on dsync speed, they seemed to be minutes 
for a few GB of data, not hours.


There is plenty of space on the drive, and, from what I understand, 
there is not a file-count limit on FreeBSD's ufs (at least not one that 
I'm anywhere near)


Any suggestions?

Thanks!

Jeff



[jeff@mail ~]$ du -h -d 0 ~/mail
3.9G/home/jeff/mail

[jeff@mail ~]$ ls -lh /var/mail/jeff
-rw---  1 jeff  jeff   554M Apr 23 11:27 /var/mail/jeff

[jeff@mail ~]$ df -h
Filesystem  SizeUsed   Avail Capacity  Mounted on
/dev/ada0s2g 38G 18G 16G53%/




(Note that the hostname and the location of the ssl certificate has been 
manually edited for this message in the following output)


From dmesg.boot:

Copyright (c) 1992-2012 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 9.0-STABLE #0: Sat Apr 21 17:13:07 PDT 2012
r...@my.host.name:/usr/obj/usr/src/sys/GENERIC i386
CPU: Intel(R) Atom(TM) CPU  330   @ 1.60GHz (1600.03-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x106c2  Family = 6  Model = 1c  
Stepping = 2
  
Features=0xbfe9fbff

  Features2=0x40e31d
  AMD Features=0x2010
  AMD Features2=0x1
  TSC: P-state invariant, performance statistics
real memory  = 2147483648 (2048 MB)
avail memory = 2077757440 (1981 MB)




[jeff@mail ~]$ doveconf -n
# 2.1.3: /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 9.0-STABLE i386
auth_mechanisms = plain login
disable_plaintext_auth = no
first_valid_gid = 1000
first_valid_uid = 1000
listen = *
mail_location = mbox:~/mail/:INBOX=/var/mail/%u
mail_privileged_group = mail
namespace {
  inbox = yes
  location =
  prefix =
  separator = /
}
passdb {
  args = session=yes dovecot
  driver = pam
}
protocols = imap
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-master {
mode = 0600
  }
  user = root
}
service imap-login {
  inet_listener imap {
port = 0
  }
  process_limit = 200
}
ssl = required
ssl_cert = 

Re: [Dovecot] quota not being calculated

2012-04-23 Thread Cor Bosman
> 
> http://hg.dovecot.org/dovecot-2.1/rev/4c8f79d1f9f1 should fix it with dict 
> quota.

Thank you, this fixed it with dict quota.

Cor



Re: [Dovecot] v2.1.5 released

2012-04-23 Thread Michescu Andrei
> Oh, and looks like I got accepted as a speaker to LinuxTag 2012. The plan
> is to talk about some new things in Dovecot and dsync replication (looks
> like I have to hurry up with the dsync rewrite).
>
Hey Timo,

Thank you very much for your hard work ;)

Please let us know if there is anything that we can help you clarify /
design for the dsync rewrite project.

Best regards,
Andrei




Re: [Dovecot] virtual plugin and shared namespace

2012-04-23 Thread l.chelchow...@eurocar.pl
<>

Re: [Dovecot] v2.1.5 released

2012-04-23 Thread Giles Coochey

On 23/04/2012 14:49, Timo Sirainen wrote:

http://dovecot.org/releases/2.1/dovecot-2.1.5.tar.gz
http://dovecot.org/releases/2.1/dovecot-2.1.5.tar.gz.sig

A few announcements first:

I'm now going to start being more strict about not answering Dovecot questions 
sent to me privately (especially support requests, but also bug reports, 
feature requests, etc). Often those questions could be answered by other people 
in the mailing list as well, so they just waste my time. Even if you're sure 
that I'm the only person who can possibly answer it, it may be something that 
others are interested of as well and replying privately denies them the 
possibility of reading about it. If you really do not want to send something 
publicly, you still have an option for private communication: just buy one of 
the Dovecot support packages.

I'd just like to say thanks for the amount of time you put in not just 
developing the software, but supporting your userbase.


I am sure everyone here is well aware of when Timo signs in each day as 
a flood of replies to queries on the dovecot mailing list starts to 
arrive to our mailboxes.


It is very much appreciated, there are many OSS mailing-lists out there, 
but not many as vibrant as dovecots!





smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Dovecot] v2.1.5 released

2012-04-23 Thread Spyros Tsiolis
>Oh, and looks like I got accepted as a speaker to LinuxTag 2012. The plan is 
>to talk about some new things in Dovecot and dsync replication 
(looks like I have to hurry up with the dsync rewrite).
>


I am quite amazed they haven't called you earlier.
From what it seems you are doing a great job and 

dovecot is a rock-solid piece of software.

Just my thoughts,

s.

 


"I merely function as a channel that filters 
music through the chaos of noise"
- Vangelis


[Dovecot] v2.1.5 released

2012-04-23 Thread Timo Sirainen
http://dovecot.org/releases/2.1/dovecot-2.1.5.tar.gz
http://dovecot.org/releases/2.1/dovecot-2.1.5.tar.gz.sig

A few announcements first:

I'm now going to start being more strict about not answering Dovecot questions 
sent to me privately (especially support requests, but also bug reports, 
feature requests, etc). Often those questions could be answered by other people 
in the mailing list as well, so they just waste my time. Even if you're sure 
that I'm the only person who can possibly answer it, it may be something that 
others are interested of as well and replying privately denies them the 
possibility of reading about it. If you really do not want to send something 
publicly, you still have an option for private communication: just buy one of 
the Dovecot support packages.

This is also the first Dovecot release that has run through automated release 
testing. I've been planning on doing that for last 5 years at least, and 
finally it's done. The testing includes running a lot of tests to verify that 
the IMAP server gives proper responses, stress testing doesn't break it, memory 
isn't leaked and several other things. The tests are run for many different 
kinds of configurations.

Some bugs show up only for some specific combination of settings, but 
unfortunately because there's such a large number of them it's impossible to 
test every combination. So here's another advantage that Dovecot support 
customers have: they can have their specific configuration included in the 
automated tests. This release already fixes one bug I found only after testing 
a customer's config.

Oh, and looks like I got accepted as a speaker to LinuxTag 2012. The plan is to 
talk about some new things in Dovecot and dsync replication (looks like I have 
to hurry up with the dsync rewrite).

And finally, the most important changes since v2.1.4:

* IMAP: When neither the session nor the mailbox has modseq tracking
  enabled, return the mailbox as having NOMODSEQ in SELECT/EXAMINE
  reply. Old versions in this situation always simply returned
  HIGHESTMODSEQ as 1, which could have broken some clients.

+ dict file: Added optional fcntl/flock locking (default is dotlock)
+ fts-solr: doveadm fts rescan now resets indexes, which allows
  reindexing mails. (This isn't a full rescan implementation like
  fts-lucene has.)
+ doveadm expunge: Added -d parameter to delete mailbox if it's
  empty after expunging.
- IMAP: Several fixes related to mailbox listing in some configs
- director: A lot of fixes and performance improvements
- v2.1.4 didn't work without a mail home directory set
- mbox: Deleting a mailbox didn't delete its index files.
- pop3c: TOP command was sent incorrectly
- trash plugin didn't work properly
- LMTP: Don't add a duplicate Return-Path: header when proxying.
- listescape: Don't unescape namespace prefixes.



Re: [Dovecot] error when using dovecot-lda as non root (vmail) user

2012-04-23 Thread Andreas Helmcke
Am 23.04.2012 14:02, schrieb Timo Sirainen:
> On 23.4.2012, at 14.40, Andreas Helmcke wrote:
> 
>> namespace Allgemeines {
> 
> Lowercase it: namespace allgemeines {
> 

Did the trick, also. Sending as user vmail without the service config entry, 
which you recommended in the other mail, is
working.


Re: [Dovecot] error when using dovecot-lda as non root (vmail) user

2012-04-23 Thread Andreas Helmcke
Am 23.04.2012 13:55, schrieb Timo Sirainen:
> 
> See if this changes the behavior:
> 
> service config {
>   unix_listener config {
> mode = 0666
>   }
> }
> 
> I'd guess that makes the vmail work also? Although it still doesn't explain 
> the difference between asking config from config process vs. getting it by 
> executing doveconf.

Yes, with this entry sending as user vmail is working.

Thanks.


Re: [Dovecot] questions about SPECIAL-USE and virtual

2012-04-23 Thread Timo Sirainen
On 23.4.2012, at 15.47, Charles Marcus wrote:

> On 2012-04-23 8:33 AM, Timo Sirainen  wrote:
>> The auto=subscribe can automatically subscribe the virtual mailbox,
>> but it can't automatically create it, because new virtual mailboxes
>> can't be created by IMAP clients.
> 
> Hmmm...
> 
> Thunderbird has the ability to create virtual mailboxes too, but obviously 
> they are created and handled locally, not on the server...
> 
> How much trouble would it be to add an API so that an IMAP client *could* 
> create and manage them on a dovecot server? And Maybe this would be a good 
> candidate for an RFC spec?

There have been a few drafts about virtual mailboxes, but they died at some 
point. I guess it could be implemented, but I'm less certain that there's 
actual need for it.



Re: [Dovecot] questions about SPECIAL-USE and virtual

2012-04-23 Thread Charles Marcus

On 2012-04-23 8:33 AM, Timo Sirainen  wrote:

The auto=subscribe can automatically subscribe the virtual mailbox,
but it can't automatically create it, because new virtual mailboxes
can't be created by IMAP clients.


Hmmm...

Thunderbird has the ability to create virtual mailboxes too, but 
obviously they are created and handled locally, not on the server...


How much trouble would it be to add an API so that an IMAP client 
*could* create and manage them on a dovecot server? And Maybe this would 
be a good candidate for an RFC spec?


--

Best regards,

Charles


Re: [Dovecot] questions about SPECIAL-USE and virtual

2012-04-23 Thread Timo Sirainen
On 23.4.2012, at 15.27, l.chelchow...@eurocar.pl wrote:

> I have some questions about Special-Use and virtual namespace:
> 
> I want to create a virtual namespace with mailboxes: Sent, Unread, Flagged, 
> All.
> 
> 1. Is it enough to put in the config file:
> mailbox virtual/Sent {
>auto = subscribe
>special_use = \Sent
> }

You have to put the mailbox {}es inside the namespace {} you want. Otherwise it 
just gives "unknown section" error.

> OR I have to make also dovecot-virtual files?

You have to do this also. The mailbox {} sections don't do anything magically 
different. They simply add the \Sent flag. The auto=subscribe can automatically 
subscribe the virtual mailbox, but it can't automatically create it, because 
new virtual mailboxes can't be created by IMAP clients.

> 2. In dovecot-virtual file can I put for mailbox virtual/Sent something like:
> *
>\Sent

No. I'm not sure what you'd want that to do. There is no \Sent message flag.

> 3. Is the http://wiki2.dovecot.org/Plugins/Virtual full documented, if not , 
> where can I find it?

The only other documentation is the code.

> 4. Is there a documentation for Special-Use?

http://tools.ietf.org/html/rfc6154

[Dovecot] questions about SPECIAL-USE and virtual

2012-04-23 Thread l.chelchow...@eurocar.pl

Hi,

I have some questions about Special-Use and virtual namespace:

I want to create a virtual namespace with mailboxes: Sent, Unread, 
Flagged, All.


1. Is it enough to put in the config file:
mailbox virtual/Sent {
auto = subscribe
special_use = \Sent
}
mailbox virtual/Unread {
auto = subscribe
special_use = \Unread   #Is it correct?
}
mailbox virtual/Flagged {
auto = subscribe
special_use = \Flagged
}
mailbox virtual/All {
auto = subscribe
special_use = \All
}

and it would displays mail from every namespace I have subscribed 
(Shared, Public)?


OR I have to make also dovecot-virtual files?

2. In dovecot-virtual file can I put for mailbox virtual/Sent something 
like:

*
\Sent

3. Is the http://wiki2.dovecot.org/Plugins/Virtual full documented, if 
not , where can I find it?


4. Is there a documentation for Special-Use?

--
Łukasz


Re: [Dovecot] 2.1.3 Corrupted squat uidlist

2012-04-23 Thread Timo Sirainen
On 23.4.2012, at 14.56, Henrik Larsson wrote:

>> So the doveadm search itself succeeds without errors, but if you
>> immediately do another doveadm search it fails? Or do you need to do
>> something else also in the middle? I couldn't reproduce this with a
>> few tests.
> 
> Is there any way to produce debug logs that will show what goes wrong. It is 
> consistent in such a way that I will have several errors within a 24 hour 
> period.
> 
> I will be willing to add code and rebuild dovecot to produce the logs you 
> need.

Well, Squat is currently rather low priority to me .. I even considered 
removing it entirely, since I don't think it's very usable. fts-lucene would 
work much better.



Re: [Dovecot] error when using dovecot-lda as non root (vmail) user

2012-04-23 Thread Timo Sirainen
Oh, right:

On 23.4.2012, at 14.40, Andreas Helmcke wrote:

> namespace Allgemeines {

Lowercase it: namespace allgemeines {

This is a bit annoying bug, but I'm not entirely sure how to fix it properly.



Re: [Dovecot] 2.1.3 Corrupted squat uidlist

2012-04-23 Thread Henrik Larsson

So the doveadm search itself succeeds without errors, but if you
immediately do another doveadm search it fails? Or do you need to do
something else also in the middle? I couldn't reproduce this with a
few tests.


Is there any way to produce debug logs that will show what goes wrong. 
It is consistent in such a way that I will have several errors within a 
24 hour period.


I will be willing to add code and rebuild dovecot to produce the logs 
you need.



Best regards
Henrik Larsson


Re: [Dovecot] error when using dovecot-lda as non root (vmail) user

2012-04-23 Thread Timo Sirainen
On 23.4.2012, at 14.40, Andreas Helmcke wrote:

> Am 23.04.2012 12:59, schrieb Timo Sirainen:
>> On 19.4.2012, at 19.09, Andreas Helmcke wrote:
>> 
>>> Apr 19 17:58:07 elablnmail02 dovecot: lda(ahelmcke): Debug: Namespace :
>>> type=private, prefix=, sep=, inbox=no, hidden=no, list=yes,
>>> subscriptions=yes location=maildir:/home/mail/user/ahelmcke
>> 
>> But what is this? You appear to have an empty namespace {} in your configs?
>> 
> nope.
> 
> You might check yourself; complete dovecot -n:

See if this changes the behavior:

service config {
  unix_listener config {
mode = 0666
  }
}

I'd guess that makes the vmail work also? Although it still doesn't explain the 
difference between asking config from config process vs. getting it by 
executing doveconf.

Re: [Dovecot] Bug in HIGHESTMODSEQ when MODSEQ tracking is not enabled for version 2.0.18.

2012-04-23 Thread Timo Sirainen
On 10.4.2012, at 23.50, Glenn Wurster wrote:

>> Yes, modseqs aren't tracked in a mailbox until client expresses an
>> interest for them. It would be a waste of disk space to save them
>> since 99% of users don't need them.
> 
> Makes sense, our mail client gets caught in the middle though, because it 
> uses HIGHESTMODSEQ to track mailbox updates without using MODSEQ options on 
> SELECT/FETCH to track message updates.

It would be actually possible for Dovecot to always keep track of 
highestmodseq, even if individual modseqs weren't tracked. I almost implemented 
it, but keeping it backwards compatible with old versions would have needed to 
make it more complex. Maybe v2.2 could do this.

>> 2) If a mailbox doesn't have modseqs enabled, return NOMODSEQ. This
>> isn't ideal, but seems like the only possibility.
> 
> The RFC also states that if we return NOMODSEQ we'd have to return a tagged 
> BAD response to "UID FETCH 1 MODSEQ", which appears to one of the commands 
> that enables MODSEQ for Dovecot ("SELECT INBOX (CONDSTORE)" also enables 
> it...).  What about returning a BAD response and at the same time start 
> tracking MODSEQ so that future SELECT commands would return HIGHESTMODSEQ?  
> Do we know what email clients are using CONDSTORE options and how they'd 
> react to a mailbox suddenly having MODSEQ capabilities after we just told 
> them it didn't?

That's kind of an annoying part of the RFC that it says the commands MUST fail 
with BAD.. I don't think there was really any good reason to add that text. 
Also Dovecot hasn't failed those commands earlier also with mailbox formats 
that don't support modseqs at all. So at least for now I simply made it return 
NOMODSEQ when modseqs aren't enabled, and the rest of the behavior is the same.

Re: [Dovecot] French characters from 2.0.x to 2.1.3

2012-04-23 Thread Frank Bonnet

On 04/23/2012 01:18 PM, Timo Sirainen wrote:

On 13.4.2012, at 18.01, Frank Bonnet wrote:


Maybe it's a coincidence but it "seems"
since I upgrade from 2.0.18 to 2.1.3
that some French characters ( a with accents by example )
are not well displayed anymore  using thunderbird and are
replaced by a "?" character

Dovecot doesn't send decoded characters to IMAP clients. Of course there might 
be something else going on, but I can't really guess what it could be.



OK thanks , maybe an update of thunderbird ?



Re: [Dovecot] error when using dovecot-lda as non root (vmail) user

2012-04-23 Thread Andreas Helmcke
Am 23.04.2012 12:59, schrieb Timo Sirainen:
> On 19.4.2012, at 19.09, Andreas Helmcke wrote:
> 
>> Apr 19 17:58:07 elablnmail02 dovecot: lda(ahelmcke): Debug: Namespace :
>> type=private, prefix=, sep=, inbox=no, hidden=no, list=yes,
>> subscriptions=yes location=maildir:/home/mail/user/ahelmcke
> 
> But what is this? You appear to have an empty namespace {} in your configs?
> 
nope.

You might check yourself; complete dovecot -n:

# 2.1.1: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-220.7.1.el6.x86_64 x86_64 CentOS release 6.2 (Final) ext4
auth_master_user_separator = *
auth_verbose = yes
first_valid_uid = 400
mail_debug = yes
mail_gid = vmail
mail_home = /home/mail/user/%u
mail_location = maildir:/home/mail/user/%u
mail_uid = vmail
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
mbox_write_locks = fcntl
namespace Allgemeines {
  location = 
maildir:/home/mail/Allgemeines:INDEX=/home/mail/user/%u/SEEN.Allgemeines
  prefix = Allgemeines/
  separator = /
  subscriptions = no
  type = public
}
namespace dummy {
  alias_for = INBOX/
  hidden = yes
  list = no
  location = maildir:/home/mail/user/%u/public/
  prefix =
  separator = /
  type = private
}
namespace inbox {
  inbox = yes
  location =
  prefix = INBOX/
  separator = /
  type = private
}
passdb {
  args = /etc/dovecot/passwd.masterusers
  driver = passwd-file
  master = yes
  pass = yes
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf
  driver = ldap
}
plugin {
  quota = maildir:User quota
  quota_rule = *:storage=3G
}
protocols = imap lmtp
service auth {
  unix_listener /var/spool/postfix/private/auth {
mode = 0666
  }
  unix_listener auth-userdb {
mode = 0600
user = vmail
  }
}
service imap-login {
  inet_listener imap {
address = *
  }
  inet_listener imaps {
address = *
  }
}
ssl = required
ssl_cert = 

Re: [Dovecot] French characters from 2.0.x to 2.1.3

2012-04-23 Thread Timo Sirainen
On 13.4.2012, at 18.01, Frank Bonnet wrote:

> Maybe it's a coincidence but it "seems"
> since I upgrade from 2.0.18 to 2.1.3
> that some French characters ( a with accents by example )
> are not well displayed anymore  using thunderbird and are
> replaced by a "?" character

Dovecot doesn't send decoded characters to IMAP clients. Of course there might 
be something else going on, but I can't really guess what it could be.



Re: [Dovecot] imapc / namespace question

2012-04-23 Thread Timo Sirainen
On 13.4.2012, at 23.41, René Neumann wrote:

> I've got two questions regarding imapc and namespaces:
> 
> 1) Is there a way of stating, that I only want part of the hierarchy on
> the end of an imapc connection to be available here? My "problem":

hg has now imapc_list_prefix.

> 2) "Private" namespaces only make sense, if location contains something
> user-specific like "%u" or "~". Is this correct?
> If yes: Is there some other way to make something like an imapc
> connection only appear for one user, if there is nothing in the location
> or imapc_user to denote the user it belongs to and hence I cannot use
> "private"?
> The only way I see currently is to use "shared" and set up ACLs to
> forbid all users except one to access the namespace (which gets slightly
> ugly as I have to use global ACLs, as -- I think -- there is no way to
> store ACLs for an imapc storage).

Well, it's not necessarily a problem to use a private namespace for anything 
you want. If you set it hidden=yes (probably should do anyway) then IMAP 
clients won't even know that you've set it as private. Internally the main 
difference between private and public namespaces is the default ACLs.

Re: [Dovecot] migration dove 2.0 2.1 shared namespace acl broken / shared/%%n/ works / solved by remove listescape

2012-04-23 Thread Timo Sirainen
On 19.4.2012, at 23.27, Robert Schetterer wrote:

>> prefix = shared/%%u/ simply dont works
>> 
>> i have reverted back to exact namespace config
>> of the 2.0.20 server, same result, so something broken in 2.1
>> 
>> 
> Hi Timo
> problem solved by removing listescape plugin
> the acl paths did / instead of dot in domainname
> 
> any chance to get listescape fixed ?

Ah, that makes it easy to fix: 
http://hg.dovecot.org/dovecot-2.1/rev/63af3274fb6f



Re: [Dovecot] error when using dovecot-lda as non root (vmail) user

2012-04-23 Thread Timo Sirainen
On 19.4.2012, at 19.09, Andreas Helmcke wrote:

> Apr 19 17:58:07 elablnmail02 dovecot: lda(ahelmcke): Debug: Namespace
> dummy: type=private, prefix=, sep=/, inbox=no, hidden=yes, list=no,
> subscriptions=yes location=maildir:/home/mail/user/ahelmcke/public/

Here's the dummy namespace with prefix="".

> Apr 19 17:58:07 elablnmail02 dovecot: lda(ahelmcke): Debug: Namespace :
> type=private, prefix=, sep=, inbox=no, hidden=no, list=yes,
> subscriptions=yes location=maildir:/home/mail/user/ahelmcke

But what is this? You appear to have an empty namespace {} in your configs?

> Apr 19 17:58:07 elablnmail02 dovecot: lda(ahelmcke): Error: user
> ahelmcke: Initialization failed: namespace configuration error: Duplicate
> namespace prefix: ""

That's why it fails with this.


Re: [Dovecot] 2.1.3 Corrupted squat uidlist

2012-04-23 Thread Timo Sirainen
So the doveadm search itself succeeds without errors, but if you immediately do 
another doveadm search it fails? Or do you need to do something else also in 
the middle? I couldn't reproduce this with a few tests.

On 20.4.2012, at 10.40, Henrik Larsson wrote:

> This problem is still showing up every day in the logs.
> 
> I tried to delete the dovecot.index.search and dovecot.index.search.uids 
> files for all users, but the errors are still there after a re-build of the 
> search index with "/usr/local/bin/doveadm search -A TEXT xyzabczzz".
> 
> If you need any further details, please let me know.
> 
> 
> Best regards
> Henrik Larsson
> 
> 
> On 15-04-2012 10:42, Henrik Larsson wrote:
>> On 27-03-2012 08:57, Luca Palazzo wrote:
>>> Hi Timo and All,
>>> after upgrading to 2.1.2 i'm getting a lot of these messages:
>>> Error: Corrupted squat uidlist file XX wrong indexid
>> After an upgrade to 2.1.3 i see this as well. Any thoughts?
>> 
>> Apr 15 03:43:43 imap(): Error: Corrupted squat uidlist file
>> /home/mail////Maildir/dovecot.index.search.uids: wrong indexid
>> Apr 15 06:30:27 imap(): Error: Corrupted squat uidlist file
>> /home/mail////Maildir/dovecot.index.search.uids: wrong indexid
>> Apr 15 07:43:55 pop3(): Error: Corrupted squat uidlist file
>> /home/mail////Maildir/dovecot.index.search.uids: wrong indexid
>> Apr 15 09:00:01 imap(): Error: Corrupted squat uidlist file
>> /home/mail////Maildir/dovecot.index.search.uids: wrong indexid
>> 
>> # doveconf -n
>> # 2.1.3: /usr/local/etc/dovecot/dovecot.conf
>> # OS: FreeBSD 8.2-STABLE amd64
>> auth_mechanisms = plain login digest-md5 cram-md5
>> first_valid_uid = 125
>> listen = *
>> log_path = /var/log/dovecot
>> mail_plugins = fts fts_squat zlib
>> mail_privileged_group = postfix
>> mail_temp_dir = /var/db/dovecot
>> 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 {
>>  inbox = yes
>>  location =
>>  prefix =
>>  separator = .
>>  type = private
>> }
>> namespace {
>>  hidden = yes
>>  inbox = no
>>  list = no
>>  location =
>>  prefix = INBOX.
>>  separator = .
>>  type = private
>> }
>> passdb {
>>  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
>>  driver = sql
>> }
>> plugin {
>>  fts = squat
>>  fts_squat = partial=4 full=10
>>  sieve = ~/.dovecot.sieve
>>  sieve_dir = ~/sieve
>> }
>> protocols = imap pop3 lmtp sieve
>> service auth-worker {
>>  user = $default_internal_user
>> }
>> service auth {
>>  unix_listener /home/mail/postfix/private/dovecot-auth {
>>group = postfix
>>mode = 0660
>>user = postfix
>>  }
>> }
>> service lmtp {
>>  executable = lmtp -L
>>  unix_listener /home/mail/postfix/private/dovecot-lmtp {
>>group = postfix
>>mode = 0660
>>user = postfix
>>  }
>> }
>> ssl_cert = > ssl_key = > userdb {
>>  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
>>  driver = sql
>> }
>> protocol lmtp {
>>  log_path = /var/log/dovecot-deliver
>>  mail_plugins = fts fts_squat zlib sieve
>> }
>> protocol lda {
>>  mail_plugins = fts fts_squat zlib sieve
>> }
>> protocol imap {
>>  mail_plugins = fts fts_squat zlib imap_zlib
>> }
>> 
>> 
>> Best regards
>> Henrik Larsson
> 



Re: [Dovecot] Error in logs indicating broken files

2012-04-23 Thread Timo Sirainen
On 21.4.2012, at 6.32, Joseph Tam wrote:

>> Error: Corrupted index cache 
>> file/home/xx/mail/.imap/sent-mail/dovecot.index.cache: Broken virtual 
>> size for mail UID 67: 1 Time(s)
>> Error: FETCH [] for mailbox ~/mail/sent-mail UID 67 got too little data: 
>> 6203 vs 7478: 1 Time(s)
> 
> This is just one dovecot IMAP client process moaning after another user
> client process pulled the rug out from under it by modifying the mailbox.
> I get a few dozen log entries of this sort per week with ~200 IMAP users
> without shared access.

Well, it is a bug and it shouldn't happen. But since it happens only with mbox, 
I haven't bothered to look into it.



Re: [Dovecot] default mail quota when using per user quota (news1204: message 6 of 20)

2012-04-23 Thread Timo Sirainen
On 21.4.2012, at 13.53, Nikolaos Milas wrote:

> On 21/4/2012 12:54 πμ, Timo Sirainen wrote:
> 
>> Hm. Or maybe I broke it in v2.1 when I changed this code. I'll also check 
>> later.

Just tried, it works as expected.

> I'm afraid that's possible. The same configuration in 2.0.13 produces 
> (doveadm quota get -u tester):
> 
> Quota name Type Value Limit %
> User quota STORAGE 237803 4194304 5
> User quota MESSAGE 531 - 0
> 
> and in 2.1.1:
> 
> Quota name Type Value Limit %
> User quota STORAGE 0 - 0
> User quota MESSAGE 0 - 0
> 
> (In the latter test server value should be 0 - because there are no messages 
> there - but limit should be as above.
> Things do not change after: doveadm quota recalc -u tester)

What do you get in logs with auth_debug=yes?

Re: [Dovecot] quota not being calculated

2012-04-23 Thread Timo Sirainen
On 21.4.2012, at 13.42, Cor Bosman wrote:

> On Apr 21, 2012, at 12:32 PM, Timo Sirainen wrote:
> 
>> On 21.4.2012, at 11.01, Cor Bosman wrote:
>> 
>>> prefix = Spam/
>> .
>>> quota2 = dict:Spam Quota::ns=spam:file:%h/spam-quota
>> .
>>> Apr 21 10:00:11 lmtp1 dovecot: imap(cor): Error: quota: Unknown namespace: 
>>> spam
>> 
>> Oh. It would make more sense to have ns=spam, but unfortunately I hadn't 
>> thought of namespace names before v2.1. You need to use ns=Spam/
> 
> Exact same issue with dict quota. It starts out at 0 (even though there are 
> 116 messages in the Spam folder. Then when 1 email gets saved to the Spam 
> folder, the counter is increased by the size of that 1 email.

http://hg.dovecot.org/dovecot-2.1/rev/4c8f79d1f9f1 should fix it with dict 
quota.



Re: [Dovecot] 2.1.4 Corrupted squat uidlist

2012-04-23 Thread Henrik Larsson

Just to let you know, 2.1.4 didn't solve this either.

If you need any futher info to get this solved, please let me know.

Best regards
Henrik Larsson



This problem is still showing up every day in the logs.

I tried to delete the dovecot.index.search and
dovecot.index.search.uids files for all users, but the errors are
still there after a re-build of the search index with
"/usr/local/bin/doveadm search -A TEXT xyzabczzz".

If you need any further details, please let me know.


Best regards
Henrik Larsson


On 15-04-2012 10:42, Henrik Larsson wrote:

On 27-03-2012 08:57, Luca Palazzo wrote:

Hi Timo and All,
after upgrading to 2.1.2 i'm getting a lot of these messages:
Error: Corrupted squat uidlist file XX wrong indexid

After an upgrade to 2.1.3 i see this as well. Any thoughts?

Apr 15 03:43:43 imap(): Error: Corrupted squat uidlist file
/home/mail////Maildir/dovecot.index.search.uids: wrong 
indexid

Apr 15 06:30:27 imap(): Error: Corrupted squat uidlist file
/home/mail////Maildir/dovecot.index.search.uids: wrong 
indexid

Apr 15 07:43:55 pop3(): Error: Corrupted squat uidlist file
/home/mail////Maildir/dovecot.index.search.uids: wrong 
indexid

Apr 15 09:00:01 imap(): Error: Corrupted squat uidlist file
/home/mail////Maildir/dovecot.index.search.uids: wrong 
indexid


# doveconf -n
# 2.1.3: /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 8.2-STABLE amd64
auth_mechanisms = plain login digest-md5 cram-md5
first_valid_uid = 125
listen = *
log_path = /var/log/dovecot
mail_plugins = fts fts_squat zlib
mail_privileged_group = postfix
mail_temp_dir = /var/db/dovecot
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 {
  inbox = yes
  location =
  prefix =
  separator = .
  type = private
}
namespace {
  hidden = yes
  inbox = no
  list = no
  location =
  prefix = INBOX.
  separator = .
  type = private
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  fts = squat
  fts_squat = partial=4 full=10
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = imap pop3 lmtp sieve
service auth-worker {
  user = $default_internal_user
}
service auth {
  unix_listener /home/mail/postfix/private/dovecot-auth {
group = postfix
mode = 0660
user = postfix
  }
}
service lmtp {
  executable = lmtp -L
  unix_listener /home/mail/postfix/private/dovecot-lmtp {
group = postfix
mode = 0660
user = postfix
  }
}
ssl_cert =