Re: Outlook creating IMAP folders even though forbidden by ACLs

2021-05-12 Thread @lbutlr
On 10 May 2021, at 19:31, Matt Grant  wrote:
> We are using Outlook 2013, 2016 and 2019,

You definitely should not be using Outlook 2013. It has serious issues, and 
does not support modern TLS v1.2/1.3

I am unsure if Outlook 2016 does, but I know 2013 does not. Also, mainstream 
support for Outlook 2013 ended 3 years ago.

-- 
Two, Four, Six, Eight! Time to Transubstantiate!



Outlook creating IMAP folders even though forbidden by ACLs

2021-05-10 Thread Matt Grant
Hi!

Is it well known that Outlook cannot process RFC 2086 or RFC 4134 ACLs?

We are using Outlook 2013, 2016 and 2019, and with 2013 can
definitely create shared folders with content that are not saved to the
server, even though Outlook 'pretends' quite erroneously that they are  -
black hole for critical email  that we must keep according to engineering
contracts for design documentation purposes.

Thank you!

Matt Grant


Re: .imap folders

2020-12-28 Thread Elise

Op 28-12-20 om 12:56 schreef Aki Tuomi:


in your mail location, where you have specified `mbox:~/...`

We do not recommend using mbox mail format for read-write, as the
support for that is limited.


Noted, that did the trick, thanks.

/Elise



Re: .imap folders

2020-12-28 Thread Aki Tuomi
On 28/12/2020 13.10, Elise wrote:
> Op 27-12-20 om 16:16 schreef Aki Tuomi:
> 
>> The .imap directories contain indexes for dovecot. If you want to put
>> them elsewhere, try adding :INDEX=/somewhere/else/%u to your mail
>> location.
> 
> Thanks for this. Where should I put this line or is that part of the
> command line?
> 
> /Elise
> 

in your mail location, where you have specified `mbox:~/...`

We do not recommend using mbox mail format for read-write, as the
support for that is limited.

Aki


0x193B6363B3444206.asc
Description: application/pgp-keys


Re: .imap folders

2020-12-27 Thread Aki Tuomi


> On 27/12/2020 17:10 Elise  wrote:
> 
> 
> My user account is located at /usr/home/elise and has a subfolder ./mail
>  In that folder I have some subfolders/subdirectories. What happens now is 
> that dovecot creates all kind of .imap folders in these subfolders.
>  They are all exact mirrors of the base folder(s) the .imap is part of.
>  
>  Can you tell me how I can prevent that dovecot creates these .imap folders 
> other than in my home user folder /usr/home/elise and the
>  /usr/home/elise/mail folder?
>  
>  /Elise
>  
>

The .imap directories contain indexes for dovecot. If you want to put them 
elsewhere, try adding :INDEX=/somewhere/else/%u to your mail location. 

Aki


.imap folders

2020-12-27 Thread Elise

My user account is located at /usr/home/elise and has a subfolder ./mail
In that folder I have some subfolders/subdirectories. What happens now 
is that dovecot creates all kind of .imap folders in these subfolders.

They are all exact mirrors of the base folder(s) the .imap is part of.

Can you tell me how I can prevent that dovecot creates these .imap 
folders other than in my home user folder /usr/home/elise and the

/usr/home/elise/mail folder?

/Elise



Re: IMAP folders showing no messages in Office 365 Outlook

2019-08-08 Thread Andrew Bernard via dovecot
Hi Gert,

Well thanks to your advice and knowing that there is no specific config to
be done for Outlook, I checked the config in Dovecot more carefully. It
turns out I was using %u in the mail location instead of %n, which is what
is properly needed in my particular overall setup with Postfix and the way
I have arranged the vmail folders.

So sorry for the noise, but perhaps this thread will help somebody in the
future.

Andrew


On Thu, 8 Aug 2019 at 21:35, Gert van Dijk via dovecot 
wrote:

>
>
> Smells like a simple folder subscription issue from the client.
>
>


Re: IMAP folders showing no messages in Office 365 Outlook

2019-08-08 Thread Andrew Bernard via dovecot

Hello Gert,

Thanks for this, but I mentioned all works fine in Thunderbird. It's 
Office 365 Outlook where the messages do not show. And I tried the same 
technique that you show, the equivalent in Outlook, and still no 
messages appear.


Andrew


On 8/8/19 9:34 pm, Gert van Dijk via dovecot wrote:

Smells like a simple folder subscription issue from the client.

Try this in Thunderbird:


Re: IMAP folders showing no messages in Office 365 Outlook

2019-08-08 Thread Gert van Dijk via dovecot
On Thu, Aug 8, 2019 at 12:58 PM Andrew Bernard via dovecot
 wrote:
>
> I'm new to Dovecot. Using Dovecot IMAP with Postfix, everything works
> fine using Thunderbird. But with the same setup, no messages show in
> IMAP folders for user accounts created in Outlook, accessing exactly the
> same server as the accounts in Thunderbird.
>
> Dovecot version 2.3.7.1.
>
> Is there any configuration required that is special to support Office
> 365 Outlook clients? How to debug this?

Smells like a simple folder subscription issue from the client.

Try this in Thunderbird:
1. Right-click the account in the folder list.
2. Click "Subscribe..."
3. Hit "Refresh". You will probably see the folders you were looking for.
4. Tick the folders you want to see in Thunderbird.
5. Hit "OK".

If this fixes the issue, it is a general IMAP 'feature', unrelated to Dovecot,
I believe.

HTH


IMAP folders showing no messages in Office 365 Outlook

2019-08-08 Thread Andrew Bernard via dovecot
I'm new to Dovecot. Using Dovecot IMAP with Postfix, everything works 
fine using Thunderbird. But with the same setup, no messages show in 
IMAP folders for user accounts created in Outlook, accessing exactly the 
same server as the accounts in Thunderbird.


Dovecot version 2.3.7.1.

Is there any configuration required that is special to support Office 
365 Outlook clients? How to debug this?


Andrew




Re: outlook idiocy - IMAP folders with /

2018-10-02 Thread Sami Ketola


> On 2 Oct 2018, at 15.28, Jerry  wrote:
>> 
> 
> Nobody is going to stop using Outlook because some *.nix user has gotten his
> shorts up in a knot. Now, I did ask this question on a MS Outlook Tech Forum.
> One of the first responses I got was to ask exactly what Dovecot's response
> was to the attempt to create this folder; i.e., what error message or code
> was returned by Dovecot. I don't have the answer to that. If someone can
> supply me with the complete and accurate return code I will post that and see
> what transpires.
> 

A NO [CANNOT] Character not allowed in mailbox name: '/' (0.001 + 0.000 secs).

Sami



Re: outlook idiocy - IMAP folders with /

2018-10-02 Thread Helmut K. C. Tessarek
On 2018-10-02 16:02, Timo Sirainen wrote:
> No, that's not how the listescape plugin works. You can't change the 
> filesystem separator with or without listescape plugin. It's always "." with 
> Maildir++.

This exactly my point. This fact is nowhere stated in the documentation.

I'm actually not talking about the plugin at all. (I'm very sorry that
I've replied to your listescape reply, my bad.)

The documentation only mentions that the separator can be changed by
setting the `separator` option. But it doesn't explain what it actually
does and why one wanted to do so in the first place.

e.g. Someone uses the default. Then changes it to something else. What
happens then? (you answered it already partly - clients might be confused).

But if the filesystem always used the . for Maildir, why would somebody
want to change the separator (without the plugin)?

Cheers,
  K. C.

-- 
regards Helmut K. C. Tessarek  KeyID 0x172380A011EF4944
Key fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944

/*
   Thou shalt not follow the NULL pointer for chaos and madness
   await thee at its end.
*/



signature.asc
Description: OpenPGP digital signature


Re: outlook idiocy - IMAP folders with /

2018-10-02 Thread Timo Sirainen
On 2 Oct 2018, at 22.52, Helmut K. C. Tessarek  wrote:
> 
> On 2018-10-01 04:07, Timo Sirainen wrote:
>> 
>> https://wiki2.dovecot.org/Plugins/Listescape maybe?
> 
> It should be mentioned somehow that one can't just change the hierarchy
> separator on the fly (without manual changes to the fs).
> 
> If you used . as the separator, it would look this in the filesystem:
> .testfolder.sub1
> Now you change the separator to $.
> Your mail client will see the existing folders as .testfolder.sub1
> instead of:
> 
> testfolder
>   sub1

No, that's not how the listescape plugin works. You can't change the filesystem 
separator with or without listescape plugin. It's always "." with Maildir++. 
You can change the namespace's visible separator to e.g. "$" which allows you 
to start using "." in the folder names with listescape. But using "." will be 
encoded as \2e (or something) in the filesystem.

Changing the namespace separator can have other problems though. Clients 
generally don't like it much, and may redownload all mails in subfolders if 
it's changed. Some clients may become even more confused.



signature.asc
Description: Message signed with OpenPGP


Re: outlook idiocy - IMAP folders with /

2018-10-02 Thread Helmut K. C. Tessarek
On 2018-10-01 04:07, Timo Sirainen wrote:
> 
> https://wiki2.dovecot.org/Plugins/Listescape maybe?

It should be mentioned somehow that one can't just change the hierarchy
separator on the fly (without manual changes to the fs).

If you used . as the separator, it would look this in the filesystem:
.testfolder.sub1
Now you change the separator to $.
Your mail client will see the existing folders as .testfolder.sub1
instead of:

testfolder
   sub1

Cheers,
  K. C.

-- 
regards Helmut K. C. Tessarek  KeyID 0x172380A011EF4944
Key fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944

/*
   Thou shalt not follow the NULL pointer for chaos and madness
   await thee at its end.
*/



signature.asc
Description: OpenPGP digital signature


Re: outlook idiocy - IMAP folders with /

2018-10-02 Thread Jerry
>On Tue, Oct 2, 2018 at 09:59, Wojciech Puchar  wrote:
>>>
>>> As I have no control over their minds, hands, and client software, I wish
>>> I could enforce the policy from the server, returning an error message to
>>> the client.
>>>
>>> On its turn, this requires the client to listen to such server messages,
>>> operated by a smarter user.
>>>
>>> At the end of the day, it feels like we are re-discovering the wheel, as
>>> such problems should have been addressed and solved long ago by an RFC.
>>>
>>> Listescape is a welcome patch. Let see if it works. I just have to select
>>> a character that no user could type and still practical for the
>>> filesystem to use...
>>>
>>>
>>> On Mon, Oct 1, 2018 at 10:07, Timo Sirainen  wrote:
>>> On 28 Sep 2018, at 16.44, Wojciech Puchar  wrote:
>>>
>>> user attempts to create folders with / dovecot naturally cannot create it
>>> so it returns error but outlook of course "create" it and keep data in
>>> local store only. data is lost when you remove local store .pst file.
>>>
>>> The question is - can dovecot be configured so it will automatically
>>> replace slash in name with something else?
>>>
>>>
>>> https://wiki2.dovecot.org/Plugins/Listescape maybe?

>>
>> the problem with pseudomail pseudoprogram outlook is that it simply
>> ignores error and shows folder created, then even allow to store messages
>> in it (store it locally in temporary file).
>>
>> When file is deleted messages are lost.
>>

>On Tue, 02 Oct 2018 11:29:40 +, Rupert Gallagher stated:

>I think we need a public compliance test, similar to html and ssl, then
>people would start questioning the quality of their own client, and migrate
>to better ones. When Micro$oft will eventually feel the pinch, then they
>will start fixing their $hit. People have the power! (I like that song.)

Nobody is going to stop using Outlook because some *.nix user has gotten his
shorts up in a knot. Now, I did ask this question on a MS Outlook Tech Forum.
One of the first responses I got was to ask exactly what Dovecot's response
was to the attempt to create this folder; i.e., what error message or code
was returned by Dovecot. I don't have the answer to that. If someone can
supply me with the complete and accurate return code I will post that and see
what transpires.

By the way, could we please do away with the "TOP POSTING" on this thread. It
seems rather counter productive to be bitching about the behavior of MS
Outlook while a poster posts in an unsatisfactory manner.

-- 
Jerry


Re: outlook idiocy - IMAP folders with /

2018-10-02 Thread Rupert Gallagher
I think we need a public compliance test, similar to html and ssl, then people 
would start questioning the quality of their own client, and migrate to better 
ones. When Micro$oft will eventually feel the pinch, then they will start 
fixing their $hit. People have the power! (I like that song.)

On Tue, Oct 2, 2018 at 09:59, Wojciech Puchar  wrote:

>>
>> As I have no control over their minds, hands, and client software, I wish I 
>> could enforce the policy from the server, returning an
>> error message to the client.
>>
>> On its turn, this requires the client to listen to such server messages, 
>> operated by a smarter user.
>
> the problem with pseudomail pseudoprogram outlook is that it simply
> ignores error and shows folder created, then even allow to store messages
> in it (store it locally in temporary file).
>
> When file is deleted messages are lost.
>
>>
>> At the end of the day, it feels like we are re-discovering the wheel, as 
>> such problems should have been addressed and solved long
>> ago by an RFC.
>>
>> Listescape is a welcome patch. Let see if it works. I just have to select a 
>> character that no user could type and still practical
>> for the filesystem to use...
>>
>>
>> On Mon, Oct 1, 2018 at 10:07, Timo Sirainen  wrote:
>> On 28 Sep 2018, at 16.44, Wojciech Puchar  wrote:
>>
>> user attempts to create folders with / dovecot naturally cannot create it so 
>> it returns error but outlook of
>> course "create" it and keep data in local store only. data is lost when you 
>> remove local store .pst file.
>>
>> The question is - can dovecot be configured so it will automatically replace 
>> slash in name with something
>> else?
>>
>>
>> https://wiki2.dovecot.org/Plugins/Listescape maybe?
>>
>>
>>

Re: outlook idiocy - IMAP folders with /

2018-10-02 Thread Wojciech Puchar


As I have no control over their minds, hands, and client software, I wish I 
could enforce the policy from the server, returning an
error message to the client. 

On its turn, this requires the client to listen to such server messages, 
operated by a smarter user. 


the problem with pseudomail pseudoprogram outlook is that it simply 
ignores error and shows folder created, then even allow to store messages 
in it (store it locally in temporary file).


When file is deleted messages are lost.




At the end of the day, it feels like we are re-discovering the wheel, as such 
problems should have been addressed and solved long
ago by an RFC. 

Listescape is a welcome patch. Let see if it works. I just have to select a 
character that no user could type and still practical
for the filesystem to use...


On Mon, Oct 1, 2018 at 10:07, Timo Sirainen  wrote:
  On 28 Sep 2018, at 16.44, Wojciech Puchar  wrote:

user attempts to create folders with / dovecot naturally cannot 
create it so it returns error but outlook of
course "create" it and keep data in local store only. data is lost 
when you remove local store .pst file.

The question is - can dovecot be configured so it will 
automatically replace slash in name with something
else?


https://wiki2.dovecot.org/Plugins/Listescape maybe?




Re: outlook idiocy - IMAP folders with /

2018-10-02 Thread Wojciech Puchar

this seems to form properly.

thank you very much

On Mon, 1 Oct 2018, Timo Sirainen wrote:


On 28 Sep 2018, at 16.44, Wojciech Puchar  wrote:

  user attempts to create folders with / dovecot naturally cannot create it 
so it returns error but outlook of course
  "create" it and keep data in local store only. data is lost when you 
remove local store .pst file.

  The question is - can dovecot be configured so it will automatically 
replace slash in name with something else?


https://wiki2.dovecot.org/Plugins/Listescape maybe?




Re: outlook idiocy - IMAP folders with /

2018-10-02 Thread Wojciech Puchar


The question is - can dovecot be configured so it will automatically
replace slash in name with something else?


And how would this help? Outlook would still go ahead and create the folder 
with / in it, and dovecot would create a folder with, say - in it and now you'd 
have two folders.

Aki



right


Re: outlook idiocy - IMAP folders with /

2018-10-01 Thread Rupert Gallagher
I tell users to limit the folder characters to /0-9a-zA-Z_/, because anything 
else may upset a mail client or server.

As I have no control over their minds, hands, and client software, I wish I 
could enforce the policy from the server, returning an error message to the 
client.

On its turn, this requires the client to listen to such server messages, 
operated by a smarter user.

At the end of the day, it feels like we are re-discovering the wheel, as such 
problems should have been addressed and solved long ago by an RFC.

Listescape is a welcome patch. Let see if it works. I just have to select a 
character that no user could type and still practical for the filesystem to 
use...

On Mon, Oct 1, 2018 at 10:07, Timo Sirainen  wrote:

> On 28 Sep 2018, at 16.44, Wojciech Puchar  wrote:
>
>> user attempts to create folders with / dovecot naturally cannot create it so 
>> it returns error but outlook of course "create" it and keep data in local 
>> store only. data is lost when you remove local store .pst file.
>>
>> The question is - can dovecot be configured so it will automatically replace 
>> slash in name with something else?
>
> https://wiki2.dovecot.org/Plugins/Listescape maybe?

Re: outlook idiocy - IMAP folders with /

2018-10-01 Thread Timo Sirainen
On 28 Sep 2018, at 16.44, Wojciech Puchar  wrote:
> 
> user attempts to create folders with / dovecot naturally cannot create it so 
> it returns error but outlook of course "create" it and keep data in local 
> store only. data is lost when you remove local store .pst file.
> 
> The question is - can dovecot be configured so it will automatically replace 
> slash in name with something else?

https://wiki2.dovecot.org/Plugins/Listescape 
 maybe?



Re: outlook idiocy - IMAP folders with /

2018-09-29 Thread Rupert Gallagher
Sorry Aki, you are right.

On Sat, Sep 29, 2018 at 09:59, Aki Tuomi  wrote:

>> On 29 September 2018 at 10:05 Rupert Gallagher  wrote:
>>
>>
>> +1
>>
>> A similar problem occurs with "."
>>
>> Sent from ProtonMail Mobile
>>
>> On Fri, Sep 28, 2018 at 15:44, Wojciech Puchar  wrote:
>>
>> > user attempts to create folders with /
>> > dovecot naturally cannot create it so it returns error but outlook of
>> > course "create" it and keep data in local store only. data is lost when
>> > you remove local store .pst file.
>> >
>> > The question is - can dovecot be configured so it will automatically
>> > replace slash in name with something else?
>
> And how would this help? Outlook would still go ahead and create the folder 
> with / in it, and dovecot would create a folder with, say - in it and now 
> you'd have two folders.
>
> Aki

Re: outlook idiocy - IMAP folders with /

2018-09-29 Thread Aki Tuomi


> On 29 September 2018 at 10:05 Rupert Gallagher  wrote:
> 
> 
> +1
> 
> A similar problem occurs with "."
> 
> Sent from ProtonMail Mobile
> 
> On Fri, Sep 28, 2018 at 15:44, Wojciech Puchar  wrote:
> 
> > user attempts to create folders with /
> > dovecot naturally cannot create it so it returns error but outlook of
> > course "create" it and keep data in local store only. data is lost when
> > you remove local store .pst file.
> >
> > The question is - can dovecot be configured so it will automatically
> > replace slash in name with something else?

And how would this help? Outlook would still go ahead and create the folder 
with / in it, and dovecot would create a folder with, say - in it and now you'd 
have two folders.

Aki


Re: outlook idiocy - IMAP folders with /

2018-09-29 Thread Rupert Gallagher
+1

A similar problem occurs with "."

Sent from ProtonMail Mobile

On Fri, Sep 28, 2018 at 15:44, Wojciech Puchar  wrote:

> user attempts to create folders with /
> dovecot naturally cannot create it so it returns error but outlook of
> course "create" it and keep data in local store only. data is lost when
> you remove local store .pst file.
>
> The question is - can dovecot be configured so it will automatically
> replace slash in name with something else?

outlook idiocy - IMAP folders with /

2018-09-28 Thread Wojciech Puchar
user attempts to create folders with / 
dovecot naturally cannot create it so it returns error but outlook of 
course "create" it and keep data in local store only. data is lost when 
you remove local store .pst file.


The question is - can dovecot be configured so it will automatically 
replace slash in name with something else?


Re: extra IMAP folders: how to make all clients use the same Sent folder?

2018-03-07 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 28 Feb 2018, Stanislaw Findeisen wrote:


I have just setup IMAP with Maildir, but unfortunately some clients
create their own folders instead of using those specified in
15-mailboxes.conf . What could be the reason?


Because the clients do so.


Here's what it looks like:


B list "" *
* LIST (\HasNoChildren \Sent) "." "Sent Messages"
* LIST (\HasNoChildren) "." Gesendet
* LIST (\HasNoChildren) "." Entw
* LIST (\HasNoChildren \Trash) "." Trash
* LIST (\HasNoChildren) "." Papierkorb
* LIST (\HasNoChildren \Drafts) "." Drafts
* LIST (\HasNoChildren \Sent) "." Sent
* LIST (\HasNoChildren) "." Ausgang
* LIST (\HasNoChildren \Junk) "." Junk
* LIST (\HasNoChildren) "." INBOX
B OK List completed.


Here for example "Gesendet" (meaning "Sent" in German) is a folder
created by some Android client app. This app uses it to store its sent
mail, while another client uses the Sent folder.


Yeah. If the blue traffic sign with the bicycle on it tags the left road, 
many bicycles will choose this way, but some still choose the right road 
with the blue traffic sign with the pedestrian on it.


The "\Sent" is a hint for client, which way to go. Either force your users 
to use another client, re-configure their client manuelly, or - sometimes 
- - the mail client needs to refresh its configuration.



Also, is it correct that all those folders (both pre-made and extra) get
created directly in the user's maildir, alongside cur, new, tmp and
Dovecot index files? Shouldn't there be any subdir?


Yes. What kind of subdir do you expect?

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEVAwUBWp++r8QnQQNheMxiAQKA+gf9FbHKK8aOvmK2wMKw7KCG2M/tIP/jG3th
5aGdiEzWAoiU9RNlAhW+7I8mzRknnmdoUI5wOGNLUdvlXxbYm0MBUuL8JJufNOCl
7eJ15/J03MWgPMKdANs2TePZNyNEtvkLxKNQJbYw4QY1AtaUXS1brPa8/qaIiHmo
Nts9UWs1c/to1MzMPjWbBjkmlQ6ftKs8q6UkhQ+xv1YdfqD9ObV3xWIJHzWiUDFL
zU7SnpwEm3m8Vj+z47NVFvtDDSk23CarFx3XnVXH56ThFPZU5VXqfsNxdwkY7gRz
3hs3dicwWNLf87jtTDL9o2d0cYj3KqZvgmmMAOapoY/dnq0U993mAA==
=NbrQ
-END PGP SIGNATURE-


extra IMAP folders: how to make all clients use the same Sent folder?

2018-02-27 Thread Stanislaw Findeisen
Dear All

I have just setup IMAP with Maildir, but unfortunately some clients
create their own folders instead of using those specified in
15-mailboxes.conf . What could be the reason?

Here's what it looks like:

> B list "" *
> * LIST (\HasNoChildren \Sent) "." "Sent Messages"
> * LIST (\HasNoChildren) "." Gesendet
> * LIST (\HasNoChildren) "." Entw
> * LIST (\HasNoChildren \Trash) "." Trash
> * LIST (\HasNoChildren) "." Papierkorb
> * LIST (\HasNoChildren \Drafts) "." Drafts
> * LIST (\HasNoChildren \Sent) "." Sent
> * LIST (\HasNoChildren) "." Ausgang
> * LIST (\HasNoChildren \Junk) "." Junk
> * LIST (\HasNoChildren) "." INBOX
> B OK List completed.

Here for example "Gesendet" (meaning "Sent" in German) is a folder
created by some Android client app. This app uses it to store its sent
mail, while another client uses the Sent folder.

Also, is it correct that all those folders (both pre-made and extra) get
created directly in the user's maildir, alongside cur, new, tmp and
Dovecot index files? Shouldn't there be any subdir?

> # dovecot --version
> 2.2.13

Thanks!
Stanisław



signature.asc
Description: OpenPGP digital signature


Re: Dynamic autoexpunge for IMAP folders

2017-01-18 Thread Thorsten Hater
Excellent, that works for me. Actually, I add one more setting to be on the
safe side regarding IMAP capitalisation rules (or non-rules).

namespace/inbox/mailbox=bla namespace/inbox/mailbox/bla/name=Bla
namespace/inbox/mailbox/bla/autoexpunge=6h

Thanks a lot.

On Wed, Jan 18, 2017 at 2:01 AM, Timo Sirainen  wrote:

> On 17 Jan 2017, at 13.36, Thorsten Hater  wrote:
> >
> > So, returning from the LDAP userdb does not change situation.
> > As I said, I would to set folder names dynamicaly, without setting
> > up a mailbox in advance.
> > Here the problem is discussed
> >
> > http://www.dovecot.org/list/dovecot/2013-August/092023.html
> >
> > but no solution is found apart from defining the namespace in the
> > static config, see here
> >
> > http://www.dovecot.org/list/dovecot/2013-August/092053.html
> >
> > As I do not know what folders the user might to configure for
> > autoexpunge, I cannot put the folders into the config.
>
> You need to list what mailboxes exist:
>
> namespace/inbox/mailbox=foo bar
> namespace/inbox/mailbox/foo/autoexpunge=6h
> namespace/inbox/mailbox/bar/autoexpunge=6h
>
> If there are spaces, they need escaping. I think for spaces it was:
>
> namespace/inbox/mailbox=Sent\_Messages
>
> >
> > Thorsten
> >
> > On Tue, Jan 17, 2017 at 12:14 PM, Thomas Leuxner 
> wrote:
> >
> >> * Thorsten Hater  2017.01.17 12:04:
> >>
> >>> userdb {
> >>>   driver = static
> >>>   args   = namespace/inbox/mailbox/Bla/autoexpunge=6h
> >>> }
> >>
> >> I'm almost sure that 'driver = static' contradicts the concept of userdb
> >> overrides:
> >>
> >> http://wiki.dovecot.org/UserDatabase/ExtraFields
> >>
> >> If you can't go with 'passwd-file' style settings, you may able to
> achieve
> >> this globaly with:
> >>
> >> protocol imap {
> >>  namespace inbox {
> >>location =
> >>mailbox Blah {
> >>  autoexpunge = 6h
> >>}
> >>prefix =
> >>  }
> >> }
> >>
> >> In any case this is then a global setting rather than one being returned
> >> on a per-user basis.
> >>
>
>


Re: Dynamic autoexpunge for IMAP folders

2017-01-17 Thread Timo Sirainen
On 17 Jan 2017, at 13.36, Thorsten Hater  wrote:
> 
> So, returning from the LDAP userdb does not change situation.
> As I said, I would to set folder names dynamicaly, without setting
> up a mailbox in advance.
> Here the problem is discussed
> 
> http://www.dovecot.org/list/dovecot/2013-August/092023.html
> 
> but no solution is found apart from defining the namespace in the
> static config, see here
> 
> http://www.dovecot.org/list/dovecot/2013-August/092053.html
> 
> As I do not know what folders the user might to configure for
> autoexpunge, I cannot put the folders into the config.

You need to list what mailboxes exist:

namespace/inbox/mailbox=foo bar
namespace/inbox/mailbox/foo/autoexpunge=6h
namespace/inbox/mailbox/bar/autoexpunge=6h

If there are spaces, they need escaping. I think for spaces it was:

namespace/inbox/mailbox=Sent\_Messages

> 
> Thorsten
> 
> On Tue, Jan 17, 2017 at 12:14 PM, Thomas Leuxner  wrote:
> 
>> * Thorsten Hater  2017.01.17 12:04:
>> 
>>> userdb {
>>>   driver = static
>>>   args   = namespace/inbox/mailbox/Bla/autoexpunge=6h
>>> }
>> 
>> I'm almost sure that 'driver = static' contradicts the concept of userdb
>> overrides:
>> 
>> http://wiki.dovecot.org/UserDatabase/ExtraFields
>> 
>> If you can't go with 'passwd-file' style settings, you may able to achieve
>> this globaly with:
>> 
>> protocol imap {
>>  namespace inbox {
>>location =
>>mailbox Blah {
>>  autoexpunge = 6h
>>}
>>prefix =
>>  }
>> }
>> 
>> In any case this is then a global setting rather than one being returned
>> on a per-user basis.
>> 


Re: Dynamic autoexpunge for IMAP folders

2017-01-17 Thread Thorsten Hater
So, returning from the LDAP userdb does not change situation.
As I said, I would to set folder names dynamicaly, without setting
up a mailbox in advance.
Here the problem is discussed

http://www.dovecot.org/list/dovecot/2013-August/092023.html

but no solution is found apart from defining the namespace in the
static config, see here

http://www.dovecot.org/list/dovecot/2013-August/092053.html

As I do not know what folders the user might to configure for
autoexpunge, I cannot put the folders into the config.

Thorsten

On Tue, Jan 17, 2017 at 12:14 PM, Thomas Leuxner  wrote:

> * Thorsten Hater  2017.01.17 12:04:
>
> > userdb {
> >driver = static
> >args   = namespace/inbox/mailbox/Bla/autoexpunge=6h
> > }
>
> I'm almost sure that 'driver = static' contradicts the concept of userdb
> overrides:
>
> http://wiki.dovecot.org/UserDatabase/ExtraFields
>
> If you can't go with 'passwd-file' style settings, you may able to achieve
> this globaly with:
>
> protocol imap {
>   namespace inbox {
> location =
> mailbox Blah {
>   autoexpunge = 6h
> }
> prefix =
>   }
> }
>
> In any case this is then a global setting rather than one being returned
> on a per-user basis.
>


Re: Dynamic autoexpunge for IMAP folders

2017-01-17 Thread Thomas Leuxner
* Thorsten Hater  2017.01.17 12:04:

> userdb {
>driver = static
>args   = namespace/inbox/mailbox/Bla/autoexpunge=6h
> }

I'm almost sure that 'driver = static' contradicts the concept of userdb 
overrides:

http://wiki.dovecot.org/UserDatabase/ExtraFields

If you can't go with 'passwd-file' style settings, you may able to achieve this 
globaly with:

protocol imap {
  namespace inbox {
location = 
mailbox Blah {
  autoexpunge = 6h
}
prefix = 
  }
}

In any case this is then a global setting rather than one being returned on a 
per-user basis.


signature.asc
Description: Digital signature


Re: Dynamic autoexpunge for IMAP folders

2017-01-17 Thread Thorsten Hater
I know, but it is not present in the string returned by the userdb,
which is set up for testing

userdb {
   driver = static
   args   = namespace/inbox/mailbox/Bla/autoexpunge=6h
}

On Tue, Jan 17, 2017 at 11:03 AM, Thomas Leuxner  wrote:

> * Thorsten Hater  2017.01.17 10:57:
>
> > Unfortunately, this yields the same problem
> >
> > Debug: Unknown userdb
> > setting: plugin/userdb_namespace/inbox/mailbox/Bla/autoexpunge=6h
>
> > > userdb_namespace/inbox/mailbox/Bla/autoexpunge=6h
>
> 'plugin' is not part of the userdb override. It is literally as above.
>


Re: Dynamic autoexpunge for IMAP folders

2017-01-17 Thread Thomas Leuxner
* Thorsten Hater  2017.01.17 10:57:

> Unfortunately, this yields the same problem
> 
> Debug: Unknown userdb
> setting: plugin/userdb_namespace/inbox/mailbox/Bla/autoexpunge=6h

> > userdb_namespace/inbox/mailbox/Bla/autoexpunge=6h

'plugin' is not part of the userdb override. It is literally as above.


signature.asc
Description: Digital signature


Re: Dynamic autoexpunge for IMAP folders

2017-01-17 Thread Thorsten Hater
Unfortunately, this yields the same problem

Debug: Unknown userdb
setting: plugin/userdb_namespace/inbox/mailbox/Bla/autoexpunge=6h

Thorsten

On Tue, Jan 17, 2017 at 10:16 AM, Thomas Leuxner  wrote:

> * Thorsten Hater  2017.01.17 09:40:
>
> > namespace/inbox/mailbox/Bla/autoexpunge=6h
> >
> > from a userdb, which results in
> >
> > Debug: Unknown userdb setting:
> > plugin/namespace/inbox/mailbox/Bla/autoexpunge=6h
>
> userdb_namespace/inbox/mailbox/Bla/autoexpunge=6h
>
> Regards
> Thomas
>


Re: Dynamic autoexpunge for IMAP folders

2017-01-17 Thread Thomas Leuxner
* Thorsten Hater  2017.01.17 09:40:

> namespace/inbox/mailbox/Bla/autoexpunge=6h
> 
> from a userdb, which results in
> 
> Debug: Unknown userdb setting:
> plugin/namespace/inbox/mailbox/Bla/autoexpunge=6h

userdb_namespace/inbox/mailbox/Bla/autoexpunge=6h

Regards
Thomas


signature.asc
Description: Digital signature


Dynamic autoexpunge for IMAP folders

2017-01-17 Thread Thorsten Hater
Dear all,

is there a way to allow users to set up something like autoexpunge
on an individual IMAP folder basis?

The idea I implemented does not seem to work, namely returning

namespace/inbox/mailbox/Bla/autoexpunge=6h

from a userdb, which results in

Debug: Unknown userdb setting:
plugin/namespace/inbox/mailbox/Bla/autoexpunge=6h

>From older questions on the mailing list I gather that the mailbox Bla
needs to be set up in the config before I can override its fields. If there
is a way around this, I would gladly use this.

Another solution that comes to mind would be to use a table-driven cron
job, but
I would prefer the cleanup to be triggered at delivering and/or moving mail.

Best regards,
  Thorsten


Re: Backing up and Importing IMAP folders

2016-11-08 Thread Jerry
On Sat, 22 Oct 2016 05:16:07 -0400, Jerry stated:

>On Thu, 20 Oct 2016 20:36:35 +0300, Konstantin Khomoutov stated:
>
>>On Thu, 20 Oct 2016 16:57:45 +0300 (EEST)
>>Aki Tuomi  wrote:
>>
>>[...]  
>>> > Alternatively you can use `dsync` to perform backup with a native
>>> > Dovecot tool.  It's able to sync mailboxes of any Dovecot user --
>>> > including synchronizing a mailbox to an empty (yet) spool.
>>> > You'll need to do a bit of shell scripting which would spin around
>>> > calling `doveadm user *` and feeding its output to something like
>>> > 
>>> >   while read user; do \
>>> > dest="/var/backup/dovecot/$user";
>>> > mkdir -p "$dest" && chown vmail:vmail "$dest" \
>>> >   && chmod 0755 "$dest"
>>> > dsync -u "$user" backup "maildir:$dest" \
>>> >   done
>>> > 
>>> > Note that you will only need this if you don't want to shut down
>>> > Dovecot to copy its mail spool out.
>>> 
>>> You can also use doveadm backup -A maildir:%u/
>>
>>Could you please elaborate?
>>
>>I have a typical "virtual users" setup where I do have
>>
>>  mail_home = /var/local/mail/%Ln
>>  mail_location = maildir:~/mail
>>
>>and everything is stored with uid=vmail / gid=vmail (much like
>>described in the wiki, that is).
>>
>>I'd like to use a single call to `doveadm backup -A ...` to back up
>>the whole /var/local/mail/* to another location
>>(say, /var/backups/dovecot/) so that is has the same structure, just
>>synchronized with the spool. (The purpose is to then backup the
>>replica off-site).
>>
>>I tried to call
>>
>>  doveadm backup -A maildir:/var/backups/dovecot/%u
>>
>>and it created a directory "/var/backups/dovecot/%u" (with literal
>>"%u", that is), created what appeared to be a single mailbox structure
>>under it and after a while scared a heck out of me with a series of
>>error messages reading
>>
>>dsync(user1): Error: Mailbox INBOX sync: mailbox_delete failed: INBOX
>>can't be deleted.
>>dsync(user2): Error: Mailbox INBOX sync: mailbox_delete failed: INBOX
>>can't be deleted.
>>...
>>
>>for each existing user.
>>
>>It appears that it luckily failed to delete anything in the source
>>directory (though I have no idea what it actually tried to do).
>>
>>Reading the doveadm-backup(1) multiple times still failed to shed a
>>light for me on how to actually backup the whole maildir hierarchy for
>>all existing users.
>>
>>So, the question: how do I really should go about backing up the whole
>>mailbox hierarchy in the case of virtual users?  
>
>I am experiencing the same problem as Konstantin. Is this a bug or
>expected behavior.

Has anyone looked into this?


Re: Backing up and Importing IMAP folders

2016-10-22 Thread Aki Tuomi

> On October 22, 2016 at 12:16 PM Jerry  wrote:
> 
> 
> On Thu, 20 Oct 2016 20:36:35 +0300, Konstantin Khomoutov stated:
> 
> >On Thu, 20 Oct 2016 16:57:45 +0300 (EEST)
> >Aki Tuomi  wrote:
> >
> >[...]
> >> > Alternatively you can use `dsync` to perform backup with a native
> >> > Dovecot tool.  It's able to sync mailboxes of any Dovecot user --
> >> > including synchronizing a mailbox to an empty (yet) spool.
> >> > You'll need to do a bit of shell scripting which would spin around
> >> > calling `doveadm user *` and feeding its output to something like
> >> > 
> >> >   while read user; do \
> >> > dest="/var/backup/dovecot/$user";
> >> > mkdir -p "$dest" && chown vmail:vmail "$dest" \
> >> >   && chmod 0755 "$dest"
> >> > dsync -u "$user" backup "maildir:$dest" \
> >> >   done
> >> > 
> >> > Note that you will only need this if you don't want to shut down
> >> > Dovecot to copy its mail spool out.  
> >> 
> >> You can also use doveadm backup -A maildir:%u/  
> >
> >Could you please elaborate?
> >
> >I have a typical "virtual users" setup where I do have
> >
> >  mail_home = /var/local/mail/%Ln
> >  mail_location = maildir:~/mail
> >
> >and everything is stored with uid=vmail / gid=vmail (much like
> >described in the wiki, that is).
> >
> >I'd like to use a single call to `doveadm backup -A ...` to back up the
> >whole /var/local/mail/* to another location
> >(say, /var/backups/dovecot/) so that is has the same structure, just
> >synchronized with the spool. (The purpose is to then backup the
> >replica off-site).
> >
> >I tried to call
> >
> >  doveadm backup -A maildir:/var/backups/dovecot/%u
> >
> >and it created a directory "/var/backups/dovecot/%u" (with literal
> >"%u", that is), created what appeared to be a single mailbox structure
> >under it and after a while scared a heck out of me with a series of
> >error messages reading
> >
> >dsync(user1): Error: Mailbox INBOX sync: mailbox_delete failed: INBOX
> >can't be deleted.
> >dsync(user2): Error: Mailbox INBOX sync: mailbox_delete failed: INBOX
> >can't be deleted.
> >...
> >
> >for each existing user.
> >
> >It appears that it luckily failed to delete anything in the source
> >directory (though I have no idea what it actually tried to do).
> >
> >Reading the doveadm-backup(1) multiple times still failed to shed a
> >light for me on how to actually backup the whole maildir hierarchy for
> >all existing users.
> >
> >So, the question: how do I really should go about backing up the whole
> >mailbox hierarchy in the case of virtual users?
> 
> I am experiencing the same problem as Konstantin. Is this s bug or
> expected behavior.
> 
> -- 
> Jerry

I think it's not exactly a bug. But I think it should be expanded. I'll see if 
we can get that sorted. 

Aki


Re: Backing up and Importing IMAP folders

2016-10-22 Thread Jerry
On Thu, 20 Oct 2016 20:36:35 +0300, Konstantin Khomoutov stated:

>On Thu, 20 Oct 2016 16:57:45 +0300 (EEST)
>Aki Tuomi  wrote:
>
>[...]
>> > Alternatively you can use `dsync` to perform backup with a native
>> > Dovecot tool.  It's able to sync mailboxes of any Dovecot user --
>> > including synchronizing a mailbox to an empty (yet) spool.
>> > You'll need to do a bit of shell scripting which would spin around
>> > calling `doveadm user *` and feeding its output to something like
>> > 
>> >   while read user; do \
>> > dest="/var/backup/dovecot/$user";
>> > mkdir -p "$dest" && chown vmail:vmail "$dest" \
>> >   && chmod 0755 "$dest"
>> > dsync -u "$user" backup "maildir:$dest" \
>> >   done
>> > 
>> > Note that you will only need this if you don't want to shut down
>> > Dovecot to copy its mail spool out.  
>> 
>> You can also use doveadm backup -A maildir:%u/  
>
>Could you please elaborate?
>
>I have a typical "virtual users" setup where I do have
>
>  mail_home = /var/local/mail/%Ln
>  mail_location = maildir:~/mail
>
>and everything is stored with uid=vmail / gid=vmail (much like
>described in the wiki, that is).
>
>I'd like to use a single call to `doveadm backup -A ...` to back up the
>whole /var/local/mail/* to another location
>(say, /var/backups/dovecot/) so that is has the same structure, just
>synchronized with the spool. (The purpose is to then backup the
>replica off-site).
>
>I tried to call
>
>  doveadm backup -A maildir:/var/backups/dovecot/%u
>
>and it created a directory "/var/backups/dovecot/%u" (with literal
>"%u", that is), created what appeared to be a single mailbox structure
>under it and after a while scared a heck out of me with a series of
>error messages reading
>
>dsync(user1): Error: Mailbox INBOX sync: mailbox_delete failed: INBOX
>can't be deleted.
>dsync(user2): Error: Mailbox INBOX sync: mailbox_delete failed: INBOX
>can't be deleted.
>...
>
>for each existing user.
>
>It appears that it luckily failed to delete anything in the source
>directory (though I have no idea what it actually tried to do).
>
>Reading the doveadm-backup(1) multiple times still failed to shed a
>light for me on how to actually backup the whole maildir hierarchy for
>all existing users.
>
>So, the question: how do I really should go about backing up the whole
>mailbox hierarchy in the case of virtual users?

I am experiencing the same problem as Konstantin. Is this s bug or
expected behavior.

-- 
Jerry


Re: Backing up and Importing IMAP folders

2016-10-20 Thread Konstantin Khomoutov
On Thu, 20 Oct 2016 16:57:45 +0300 (EEST)
Aki Tuomi  wrote:

[...]
> > Alternatively you can use `dsync` to perform backup with a native
> > Dovecot tool.  It's able to sync mailboxes of any Dovecot user --
> > including synchronizing a mailbox to an empty (yet) spool.
> > You'll need to do a bit of shell scripting which would spin around
> > calling `doveadm user *` and feeding its output to something like
> > 
> >   while read user; do \
> > dest="/var/backup/dovecot/$user";
> > mkdir -p "$dest" && chown vmail:vmail "$dest" \
> >   && chmod 0755 "$dest"
> > dsync -u "$user" backup "maildir:$dest" \
> >   done
> > 
> > Note that you will only need this if you don't want to shut down
> > Dovecot to copy its mail spool out.
> 
> You can also use doveadm backup -A maildir:%u/

Could you please elaborate?

I have a typical "virtual users" setup where I do have

  mail_home = /var/local/mail/%Ln
  mail_location = maildir:~/mail

and everything is stored with uid=vmail / gid=vmail (much like
described in the wiki, that is).

I'd like to use a single call to `doveadm backup -A ...` to back up the
whole /var/local/mail/* to another location (say, /var/backups/dovecot/)
so that is has the same structure, just synchronized with the spool.
(The purpose is to then backup the replica off-site).

I tried to call

  doveadm backup -A maildir:/var/backups/dovecot/%u

and it created a directory "/var/backups/dovecot/%u" (with literal
"%u", that is), created what appeared to be a single mailbox structure
under it and after a while scared a heck out of me with a series of
error messages reading

dsync(user1): Error: Mailbox INBOX sync: mailbox_delete failed: INBOX
can't be deleted.
dsync(user2): Error: Mailbox INBOX sync: mailbox_delete failed: INBOX
can't be deleted.
...

for each existing user.

It appears that it luckily failed to delete anything in the source
directory (though I have no idea what it actually tried to do).

Reading the doveadm-backup(1) multiple times still failed to shed a
light for me on how to actually backup the whole maildir hierarchy for
all existing users.

So, the question: how do I really should go about backing up the whole
mailbox hierarchy in the case of virtual users?


Re: Backing up and Importing IMAP folders

2016-10-20 Thread Konstantin Khomoutov
On Thu, 20 Oct 2016 17:38:31 +0300 (EEST)
Aki Tuomi  wrote:

[...]
> > > > Alternatively you can use `dsync` to perform backup with a
> > > > native Dovecot tool.  It's able to sync mailboxes of any
> > > > Dovecot user -- including synchronizing a mailbox to an empty
> > > > (yet) spool. You'll need to do a bit of shell scripting which
> > > > would spin around calling `doveadm user *` and feeding its
> > > > output to something like
> > > > 
> > > >   while read user; do \
> > > > dest="/var/backup/dovecot/$user";
> > > > mkdir -p "$dest" && chown vmail:vmail "$dest" \
> > > >   && chmod 0755 "$dest"
> > > > dsync -u "$user" backup "maildir:$dest" \
> > > >   done
> > > > 
> > > > Note that you will only need this if you don't want to shut down
> > > > Dovecot to copy its mail spool out.
> > > 
> > > You can also use doveadm backup -A maildir:%u/
> > 
> > Looks like `doveadm` of my Dovecot 2.2 (Debian 8.0 Jessie) does not
> > support the "backup" subcommand.  Is it a past-2.2 addition?
> 
> We aren't past 2.2 yet. But it should work with dsync -A backup as
> well I guess.

Oh, that's a documentation problem: the manual page doveadm(1) does not
mention the word "backup" at all while running the command actually
tells it's supported:

  $ doveadm backup -A
  doveadm backup [-u |-A] [-S ] [-dfR] [-l ]
  [-r ] [-m ] [-n  | -N] [-x ]
  [-s ] 

Good to know, thanks!


Re: Backing up and Importing IMAP folders

2016-10-20 Thread Aki Tuomi

> On October 20, 2016 at 5:11 PM Konstantin Khomoutov 
>  wrote:
> 
> 
> On Thu, 20 Oct 2016 16:57:45 +0300 (EEST)
> Aki Tuomi  wrote:
> 
> [...]
> > > Alternatively you can use `dsync` to perform backup with a native
> > > Dovecot tool.  It's able to sync mailboxes of any Dovecot user --
> > > including synchronizing a mailbox to an empty (yet) spool.
> > > You'll need to do a bit of shell scripting which would spin around
> > > calling `doveadm user *` and feeding its output to something like
> > > 
> > >   while read user; do \
> > > dest="/var/backup/dovecot/$user";
> > > mkdir -p "$dest" && chown vmail:vmail "$dest" \
> > >   && chmod 0755 "$dest"
> > > dsync -u "$user" backup "maildir:$dest" \
> > >   done
> > > 
> > > Note that you will only need this if you don't want to shut down
> > > Dovecot to copy its mail spool out.
> > 
> > You can also use doveadm backup -A maildir:%u/
> 
> Looks like `doveadm` of my Dovecot 2.2 (Debian 8.0 Jessie) does not
> support the "backup" subcommand.  Is it a past-2.2 addition?

We aren't past 2.2 yet. But it should work with dsync -A backup as well I guess.

Aki


Re: Backing up and Importing IMAP folders

2016-10-20 Thread Konstantin Khomoutov
On Thu, 20 Oct 2016 16:57:45 +0300 (EEST)
Aki Tuomi  wrote:

[...]
> > Alternatively you can use `dsync` to perform backup with a native
> > Dovecot tool.  It's able to sync mailboxes of any Dovecot user --
> > including synchronizing a mailbox to an empty (yet) spool.
> > You'll need to do a bit of shell scripting which would spin around
> > calling `doveadm user *` and feeding its output to something like
> > 
> >   while read user; do \
> > dest="/var/backup/dovecot/$user";
> > mkdir -p "$dest" && chown vmail:vmail "$dest" \
> >   && chmod 0755 "$dest"
> > dsync -u "$user" backup "maildir:$dest" \
> >   done
> > 
> > Note that you will only need this if you don't want to shut down
> > Dovecot to copy its mail spool out.
> 
> You can also use doveadm backup -A maildir:%u/

Looks like `doveadm` of my Dovecot 2.2 (Debian 8.0 Jessie) does not
support the "backup" subcommand.  Is it a past-2.2 addition?


Re: Backing up and Importing IMAP folders

2016-10-20 Thread Aki Tuomi

> On October 20, 2016 at 4:45 PM Konstantin Khomoutov 
> <flatw...@users.sourceforge.net> wrote:
> 
> 
> On Thu, 20 Oct 2016 09:18:12 -0400
> Jerry <je...@seibercom.net> wrote:
> 
> > I am running Dovecot with Postfix on a FreeBSD machine. There are
> > problems with the drive and I cannot depend on it. Dovecot saves all
> > mail in IMAP format. I want to back up the mail folders, install a new
> > HD, install the latest FreeBSD OS and then reinstall my programs.
> > Reinstalling Dovecot is simple, but how do I reinstall the IMAP
> > folders? Can Dovecot backup the folders onto a CD and then import them
> > when I reinstall it? My mail is kept under “/var/mail/vmail”. Should I
> > just back up that entire directory structure and then restore it
> > later?
> 
> That should work (just make sure Dovecot is not running to not have a
> race between your backup software and the IMAP server and clients).
> 
> Alternatively you can use `dsync` to perform backup with a native
> Dovecot tool.  It's able to sync mailboxes of any Dovecot user --
> including synchronizing a mailbox to an empty (yet) spool.
> You'll need to do a bit of shell scripting which would spin around
> calling `doveadm user *` and feeding its output to something like
> 
>   while read user; do \
> dest="/var/backup/dovecot/$user";
> mkdir -p "$dest" && chown vmail:vmail "$dest" \
>   && chmod 0755 "$dest"
> dsync -u "$user" backup "maildir:$dest" \
>   done
> 
> Note that you will only need this if you don't want to shut down
> Dovecot to copy its mail spool out.

You can also use doveadm backup -A maildir:%u/

Aki


Re: Backing up and Importing IMAP folders

2016-10-20 Thread Konstantin Khomoutov
On Thu, 20 Oct 2016 09:18:12 -0400
Jerry <je...@seibercom.net> wrote:

> I am running Dovecot with Postfix on a FreeBSD machine. There are
> problems with the drive and I cannot depend on it. Dovecot saves all
> mail in IMAP format. I want to back up the mail folders, install a new
> HD, install the latest FreeBSD OS and then reinstall my programs.
> Reinstalling Dovecot is simple, but how do I reinstall the IMAP
> folders? Can Dovecot backup the folders onto a CD and then import them
> when I reinstall it? My mail is kept under “/var/mail/vmail”. Should I
> just back up that entire directory structure and then restore it
> later?

That should work (just make sure Dovecot is not running to not have a
race between your backup software and the IMAP server and clients).

Alternatively you can use `dsync` to perform backup with a native
Dovecot tool.  It's able to sync mailboxes of any Dovecot user --
including synchronizing a mailbox to an empty (yet) spool.
You'll need to do a bit of shell scripting which would spin around
calling `doveadm user *` and feeding its output to something like

  while read user; do \
dest="/var/backup/dovecot/$user";
mkdir -p "$dest" && chown vmail:vmail "$dest" \
  && chmod 0755 "$dest"
dsync -u "$user" backup "maildir:$dest" \
  done

Note that you will only need this if you don't want to shut down
Dovecot to copy its mail spool out.


Backing up and Importing IMAP folders

2016-10-20 Thread Jerry
I am running Dovecot with Postfix on a FreeBSD machine. There are
problems with the drive and I cannot depend on it. Dovecot saves all
mail in IMAP format. I want to back up the mail folders, install a new
HD, install the latest FreeBSD OS and then reinstall my programs.
Reinstalling Dovecot is simple, but how do I reinstall the IMAP
folders? Can Dovecot backup the folders onto a CD and then import them
when I reinstall it? My mail is kept under “/var/mail/vmail”. Should I
just back up that entire directory structure and then restore it later?

Thanks!

-- 
Jerry


Re: Messages lost from imap folders

2015-09-19 Thread Nikolaos Milas

Anyone? No suggestions whatsoever?

Nick

On 16/9/2015 2:52 μμ, Nikolaos Milas wrote:


Hello,

We have one user who is complaining that he has lost mails from 3 imap 
folders, administered through squirrelmail.


The folders suddenly appeared unregistered, and once manually 
registered they were empty.


Has anyone observed something like this?

We are running two servers (as VMs) with Dovecot v2.2.18, synced 
(two-way) using dsync. The configurations follow.


Can you please help me understand what may have gone wrong?

Can I try to find actions regarding these folders in the logs? What 
should I search for?


Could this be an issue involving dsync? How can I trace back dsync 
activity in detail?


Server configs follow (I have only altered the real domain name and 
the login greeting.)


Thanks in advance,
Nick

- 


SERVER 1
- 



protocols = imap pop3

login_greeting = Hello World!

mail_location = maildir:~/Maildir/
mail_gid = 500
mail_uid = 500

auth_mechanisms = plain login
auth_username_format = %Lu

auth_verbose = yes
auth_debug = no
mail_debug = no

disable_plaintext_auth = no

mail_plugins = quota notify replication

protocol imap {
  imap_client_workarounds = "delay-newmail"
  mail_plugins = quota imap_quota notify replication
}

protocol pop3 {
  mail_max_userip_connections = 3
  mail_plugins = quota notify replication
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = %08Xu%08Xv
}

protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  info_log_path =
  log_path =
  mail_plugins = quota notify replication
  postmaster_address = sysad...@example.com
  sendmail_path = /usr/lib/sendmail
}

userdb {
  args = /etc/dovecot/dovecot-usrdb-ldap.conf
  driver = ldap
}

passdb {
  args = /etc/dovecot/dovecot-passdb-ldap.conf
  driver = ldap
}

dsync_remote_cmd = ssh -l root vmail1.example.com doveadm dsync-server 
-u%u

replication_dsync_parameters = -d -N -l 30 -U

plugin {
  mail_replica = remote:vm...@vmail1.example.com
}

plugin {
  quota = maildir:User quota
  quota_rule = *:storage=5G
  quota_rule2 = Trash:storage=+3%%
  quota_warning = storage=75%% quota-warning 75 %u
  quota_warning2 = storage=90%% quota-warning 90 %u
}

service quota-warning {
  executable = script /opt/mail1.sh
  user = vmail
  unix_listener quota-warning {
user = vmail
  }
}

service aggregator {
  fifo_listener replication-notify-fifo {
user = vmail
  }
  unix_listener replication-notify {
user = vmail
  }
}

service replicator {
   unix_listener replicator-doveadm {
 mode = 0600
   }
}

service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-master {
group = vmail
mode = 0660
user = vmail
  }
  user = root
}

service imap-login {
  service_count = 1
  vsz_limit = 64 M
}

service pop3-login {
  service_count = 1
  vsz_limit = 64 M
}

service replicator {
  process_min_avail = 1
}

service imap {
  executable = imap postlogin
}
service pop3 {
  executable = pop3 postlogin
}

service postlogin {
  executable = script-login -d rawlog
  unix_listener postlogin {
  }
}

ssl_ca = - 


SERVER 2
- 



protocols = imap pop3

login_greeting = Hello World!

mail_location = maildir:~/Maildir/
mail_gid = 5000
mail_uid = 5000

auth_mechanisms = plain login
auth_username_format = %Lu
auth_verbose = yes
disable_plaintext_auth = no

mail_plugins = quota notify replication

protocol imap {
  imap_client_workarounds = "delay-newmail  "
  mail_plugins = quota imap_quota notify replication
}

protocol pop3 {
  mail_max_userip_connections = 3
  mail_plugins = quota notify replication
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = %08Xu%08Xv
}

protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  info_log_path =
  log_path =
  mail_plugins = quota notify replication
  postmaster_address = sysad...@example.com
  sendmail_path = /usr/lib/sendmail
}

userdb {
  args = /etc/dovecot/dovecot-usrdb-ldap.conf
  driver = ldap
}

passdb {
  args = /etc/dovecot/dovecot-passdb-ldap.conf
  driver = ldap
}

dsync_remote_cmd = ssh -l root vmail.example.com doveadm dsync-server 
-u%u

replication_dsync_parameters = -d -N -l 30 -U

plugin {
  mail_replica = remote:vm...@vmail.example.com
}

plugin {
  quota = maildir:User quota
  quota_rule = *:storage=5G
  quota_rule2 = Trash:storage=+3%%
  quota_warning = storage=75%% quota-warning 75 %u
  quota_warning2 = storage=90%% quota-warning 90 %u
}

service quota-warning {
  executable = script /opt/mail1.sh
  user = vmail
  unix_listener quota-warning {
user = vmail
  }
}

service aggregator {
  fifo_

Messages lost from imap folders

2015-09-16 Thread Nikolaos Milas

Hello,

We have one user who is complaining that he has lost mails from 3 imap 
folders, administered through squirrelmail.


The folders suddenly appeared unregistered, and once manually registered 
they were empty.


Has anyone observed something like this?

We are running two servers (as VMs) with Dovecot v2.2.18, synced 
(two-way) using dsync. The configurations follow.


Can you please help me understand what may have gone wrong?

Can I try to find actions regarding these folders in the logs? What 
should I search for?


Could this be an issue involving dsync? How can I trace back dsync 
activity in detail?


Server configs follow (I have only altered the real domain name and the 
login greeting.)


Thanks in advance,
Nick

-
SERVER 1
-

protocols = imap pop3

login_greeting = Hello World!

mail_location = maildir:~/Maildir/
mail_gid = 500
mail_uid = 500

auth_mechanisms = plain login
auth_username_format = %Lu

auth_verbose = yes
auth_debug = no
mail_debug = no

disable_plaintext_auth = no

mail_plugins = quota notify replication

protocol imap {
  imap_client_workarounds = "delay-newmail"
  mail_plugins = quota imap_quota notify replication
}

protocol pop3 {
  mail_max_userip_connections = 3
  mail_plugins = quota notify replication
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = %08Xu%08Xv
}

protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  info_log_path =
  log_path =
  mail_plugins = quota notify replication
  postmaster_address = sysad...@example.com
  sendmail_path = /usr/lib/sendmail
}

userdb {
  args = /etc/dovecot/dovecot-usrdb-ldap.conf
  driver = ldap
}

passdb {
  args = /etc/dovecot/dovecot-passdb-ldap.conf
  driver = ldap
}

dsync_remote_cmd = ssh -l root vmail1.example.com doveadm dsync-server -u%u
replication_dsync_parameters = -d -N -l 30 -U

plugin {
  mail_replica = remote:vm...@vmail1.example.com
}

plugin {
  quota = maildir:User quota
  quota_rule = *:storage=5G
  quota_rule2 = Trash:storage=+3%%
  quota_warning = storage=75%% quota-warning 75 %u
  quota_warning2 = storage=90%% quota-warning 90 %u
}

service quota-warning {
  executable = script /opt/mail1.sh
  user = vmail
  unix_listener quota-warning {
user = vmail
  }
}

service aggregator {
  fifo_listener replication-notify-fifo {
user = vmail
  }
  unix_listener replication-notify {
user = vmail
  }
}

service replicator {
   unix_listener replicator-doveadm {
 mode = 0600
   }
}

service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-master {
group = vmail
mode = 0660
user = vmail
  }
  user = root
}

service imap-login {
  service_count = 1
  vsz_limit = 64 M
}

service pop3-login {
  service_count = 1
  vsz_limit = 64 M
}

service replicator {
  process_min_avail = 1
}

service imap {
  executable = imap postlogin
}
service pop3 {
  executable = pop3 postlogin
}

service postlogin {
  executable = script-login -d rawlog
  unix_listener postlogin {
  }
}

ssl_ca = 

Re: Does Dovecot allow different clients to subscribe different subsets of IMAP folders?

2015-06-04 Thread Daniel Tröder
Hi Steve,

for some reason I didn't get you message though the mailing list (my ml
settings?), but only directly. For the sake of completeness I'm replying
here - I hope that's OK.

Shared mailboxes are really easy to implement. Just enable the namespace
(type = shared) in /etc/dovecot/conf.d/10-mail.conf

http://wiki2.dovecot.org/Namespaces
http://wiki2.dovecot.org/SharedMailboxes/Shared

You may want to share index files, so you'll have the same [un]read
flags on all devices. Simply do _not_ configure INDEXPVT, or configure
it to a common directory.

If you wish to share keywords so you'll have the same
important/red/star flags on all accounts, do _not_ configure
pre-user CONTROL, or configure it to a common directory.

I think this should work:

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

You'll have to configure ACLs too.

http://wiki2.dovecot.org/ACL

/etc/dovecot/conf.d/90-acl.conf
plugin {
  acl_shared_dict = file:/var/lib/dovecot/shared-mailboxes
}
plugin {
  # Without global ACLs:
  acl = vfile
}

10-mail.conf: mail_plugins = $mail_plugins acl quota
20-imap.conf: mail_plugins = $mail_plugins imap_acl imap_quota

Then you can get/set ACLs with:

doveadm acl get -u mob...@mail.com shared/m...@mail.com   --- INBOX
doveadm acl set -A shared/m...@mail.com mob...@mail.com lookup read ...
doveadm acl get -u mob...@mail.com shared/m...@mail.com

doveadm acl set -A shared/m...@mail.com mob...@mail.com/Spam lookup read ...

You'll have to find a way to do this for all your mailboxes in some
shell script or with python or whatever.

Good luck
Daniel

Am 04.06.2015 um 16:43 schrieb Steve:
 Hi Daniel,
 
 Hmm - I'm happy to use different 'user names' to log into Dovecot... as
 long as each of these logins can still subscribe to the same universe of
 folders I have available at present.  I can envision using steve_mobile
 and steve_desktop as logins, as long as these still provide access to
 the same mailboxes as I have in steve's Maildir folder.
 
 I'm guessing that this would mean I can't/shouldn't use PAM for Dovecot
 authentication? I don't really want to create 'dummy' (shell-account)
 users on my server... but, I guess, it would be OK if I were to use
 some other authentication mechanism, and pointed all these Dovecot-only
 logins to the same Maildir folder.
 
 By any chance, is there a 'howto' detailing a suitable sample
 configuration for such a setup?
 
 BTW - I would definitely want to be able to change subscriptions from
 any device...  I just want independent subscriptions for my
 tablet/phone/desktop/VM clients - as I use email in different ways from
 these different environments.
 
 On 04/06/2015 15:24, Daniel Tröder wrote:
 Hi Steve,

 I don't think the IMAP protocol has the concept of a user agent. So
 there is no way for an IMAP server to distinguish between client
 programs.

 You could use POP and poll different mailboxes - but your clients
 probably don't support that. So you'll have to use different users.

 But that give you a cool solution: Use shared mailboxes.

 You could share all mailboxes of you main user to all the device-users
 and then use the clients to subscribe only to those mailboxes that are
 of interest.

 That way you can change what a client sees using the client program,
 without logging into the server as root. Especially nice, when you are
 traveling and decide you need to read a mailbox with your mobile you
 hadn't though about before.

 Greetings
 Daniel

 

-- 
Daniel Tröder
Open Source Software Engineer

Univention GmbH
be open
Mary-Somerville-Str.1
28359 Bremen
Tel.: +49 421 22232-91
Fax : +49 421 22232-99

troe...@univention.de
http://www.univention.de

Geschäftsführer: Peter H. Ganten
HRB 20755 Amtsgericht Bremen
Steuer-Nr.: 71-597-02876



signature.asc
Description: OpenPGP digital signature


Re: Does Dovecot allow different clients to subscribe different subsets of IMAP folders?

2015-06-04 Thread b-dovecot . org
Hi Steve,

I don't know if dovecot can use different 'subscriptions' but you can create 
different accounts and then link (ln -s) the relevant folders in each 
respective maildir.

Cheers,
B

On Thu, Jun 04, 2015 at 01:40:57PM +0100, Steve wrote:
 I have a working Dovecot IMAP server (v. 2.2.9) where I have a single
 user but a lot of folders (over 800 in total, hierarchically
 arranged, about 50 of which are in active use.)
 
 I have multiple clients (including k9Mail on Android and Thunderbird
 on Linux and Windows). These clients all present a consistent
 subscription to a single subset of the available folders .
 
 What I'd like to be able to do is (somehow) allow different devices
 (different email clients) to subscribe to a different subset of
 folders. For example, I may want K9mail on my phone to be subscribed
 only to my main Inbox - but for Thunderbird on Windows to also be
 subscribed to active mailing-list folders.
 
 Does Dovecot support such a mode of operation? If so, how do I
 configure it? If not, what options are there to achieve the desired
 end result - i.e. different devices/IMAP clients subscribed to
 different subsets of the universe of folders available to a single
 user.
 
 Mandatory details:
 Version : 2.2.9
 Configuration: See http://paste.ubuntu.com/11564807/


Re: Does Dovecot allow different clients to subscribe different subsets of IMAP folders?

2015-06-04 Thread Daniel Tröder
Hi Steve,

I don't think the IMAP protocol has the concept of a user agent. So
there is no way for an IMAP server to distinguish between client programs.

You could use POP and poll different mailboxes - but your clients
probably don't support that. So you'll have to use different users.

But that give you a cool solution: Use shared mailboxes.

You could share all mailboxes of you main user to all the device-users
and then use the clients to subscribe only to those mailboxes that are
of interest.

That way you can change what a client sees using the client program,
without logging into the server as root. Especially nice, when you are
traveling and decide you need to read a mailbox with your mobile you
hadn't though about before.

Greetings
Daniel


Am 04.06.2015 um 14:40 schrieb Steve:
 I have a working Dovecot IMAP server (v. 2.2.9) where I have a single
 user but a lot of folders (over 800 in total, hierarchically arranged,
 about 50 of which are in active use.)
 
 I have multiple clients (including k9Mail on Android and Thunderbird on
 Linux and Windows). These clients all present a consistent subscription
 to a single subset of the available folders .
 
 What I'd like to be able to do is (somehow) allow different devices
 (different email clients) to subscribe to a different subset of folders.
 For example, I may want K9mail on my phone to be subscribed only to my
 main Inbox - but for Thunderbird on Windows to also be subscribed to
 active mailing-list folders.
 
 Does Dovecot support such a mode of operation? If so, how do I configure
 it? If not, what options are there to achieve the desired end result -
 i.e. different devices/IMAP clients subscribed to different subsets of
 the universe of folders available to a single user.
 
 Mandatory details:
 Version : 2.2.9
 Configuration: See http://paste.ubuntu.com/11564807/



signature.asc
Description: OpenPGP digital signature


Re: Does Dovecot allow different clients to subscribe different subsets of IMAP folders?

2015-06-04 Thread Steve

Hi Daniel,

Hmm - I'm happy to use different 'user names' to log into Dovecot... as 
long as each of these logins can still subscribe to the same universe of 
folders I have available at present.  I can envision using steve_mobile 
and steve_desktop as logins, as long as these still provide access to 
the same mailboxes as I have in steve's Maildir folder.


I'm guessing that this would mean I can't/shouldn't use PAM for Dovecot 
authentication? I don't really want to create 'dummy' (shell-account) 
users on my server... but, I guess, it would be OK if I were to use 
some other authentication mechanism, and pointed all these Dovecot-only 
logins to the same Maildir folder.


By any chance, is there a 'howto' detailing a suitable sample 
configuration for such a setup?


BTW - I would definitely want to be able to change subscriptions from 
any device...  I just want independent subscriptions for my 
tablet/phone/desktop/VM clients - as I use email in different ways from 
these different environments.


On 04/06/2015 15:24, Daniel Tröder wrote:

Hi Steve,

I don't think the IMAP protocol has the concept of a user agent. So
there is no way for an IMAP server to distinguish between client programs.

You could use POP and poll different mailboxes - but your clients
probably don't support that. So you'll have to use different users.

But that give you a cool solution: Use shared mailboxes.

You could share all mailboxes of you main user to all the device-users
and then use the clients to subscribe only to those mailboxes that are
of interest.

That way you can change what a client sees using the client program,
without logging into the server as root. Especially nice, when you are
traveling and decide you need to read a mailbox with your mobile you
hadn't though about before.

Greetings
Daniel



Does Dovecot allow different clients to subscribe different subsets of IMAP folders?

2015-06-04 Thread Steve
I have a working Dovecot IMAP server (v. 2.2.9) where I have a single 
user but a lot of folders (over 800 in total, hierarchically arranged, 
about 50 of which are in active use.)


I have multiple clients (including k9Mail on Android and Thunderbird on 
Linux and Windows). These clients all present a consistent subscription 
to a single subset of the available folders .


What I'd like to be able to do is (somehow) allow different devices 
(different email clients) to subscribe to a different subset of folders. 
For example, I may want K9mail on my phone to be subscribed only to my 
main Inbox - but for Thunderbird on Windows to also be subscribed to 
active mailing-list folders.


Does Dovecot support such a mode of operation? If so, how do I configure 
it? If not, what options are there to achieve the desired end result - 
i.e. different devices/IMAP clients subscribed to different subsets of 
the universe of folders available to a single user.


Mandatory details:
Version : 2.2.9
Configuration: See http://paste.ubuntu.com/11564807/


Re: Creating IMAP folders/subfolders with Thunderbird

2015-05-29 Thread Alex JOST

Am 26.05.2015 um 03:38 schrieb Alex Regan:

Hi,

I have dovecot-2.2.15 on fedora21 with Thunderbird and having some
difficulty creating subfolders and deleting folders.

Creating subfolders results in a folder at the root with a caret instead
of a slash called folder^subfolder with an entry in .subscriptions with
that name, instead of a new folder under the directory.

I'm also unable to delete any folders. The command from within
Thunderbird is just completely ignored.

Any idea what's happening here?

Thanks,
Alex


This seems to be a bug in Thunderbird:
https://bugzilla.mozilla.org/show_bug.cgi?id=773579

--
Alex JOST


Re: Creating IMAP folders/subfolders with Thunderbird

2015-05-29 Thread Alex Regan

Hi,

On 05/29/2015 06:17 AM, Alex JOST wrote:

Am 26.05.2015 um 03:38 schrieb Alex Regan:

Hi,

I have dovecot-2.2.15 on fedora21 with Thunderbird and having some
difficulty creating subfolders and deleting folders.

Creating subfolders results in a folder at the root with a caret instead
of a slash called folder^subfolder with an entry in .subscriptions with
that name, instead of a new folder under the directory.

I'm also unable to delete any folders. The command from within
Thunderbird is just completely ignored.

Any idea what's happening here?

Thanks,
Alex


This seems to be a bug in Thunderbird:
https://bugzilla.mozilla.org/show_bug.cgi?id=773579


Wow, that sucks. Open since 2012. Thanks for the info.

Thanks,
Alex


Creating IMAP folders/subfolders with Thunderbird

2015-05-25 Thread Alex Regan

Hi,

I have dovecot-2.2.15 on fedora21 with Thunderbird and having some 
difficulty creating subfolders and deleting folders.


Creating subfolders results in a folder at the root with a caret instead 
of a slash called folder^subfolder with an entry in .subscriptions with 
that name, instead of a new folder under the directory.


I'm also unable to delete any folders. The command from within 
Thunderbird is just completely ignored.


Any idea what's happening here?

Thanks,
Alex


sdbox and IMAP folders

2014-12-08 Thread Jeff Larsen
We have just migrated from cyrus-imap to dovecot 2.2.9 on Ubuntu. By
default, all our user's manually created folders appear at the same
folder level as INBOX (i.e., they are next to INBOX, and not inside
INBOX in a typical tree view of the folders).

But on Dovecot, users are able to create new folders either parallel
to INBOX or as subfolders within INBOX, which I think is going to lead
to confusion for our users, especially when working from the limited
UI of a smartphone client where folder hierarchy is not as easy to
visualize.

With cyrus, this behavior depended on the client setting for IMAP
server directory as it is called in Thunderbird. If the setting was
given the value INBOX, then all folders were parallel to INBOX and
you could not create any folder that would appear in the tree inside
INBOX. With the setting empty, then all folders appeared as subfolders
of INBOX. It was all or nothing.

When the mail accounts were migrated to dovecot, the existing
top-level user folders were created in dovecot at the same level as
INBOX. We did nothing intentional to get this result. We just used
cyrus2dovecot to export to maildir, then doveadm sync to convert to
the final sdbox.

With dovecot, when IMAP server directory is empty, we get the
original folder tree with all folders parallel to inbox, but users are
also able to create subfolders inside INBOX . We are using sdbox
storage and the folder heirarchy as seen in the client tree (parallel
folders and subfolders) is also reflected in the server's local file
system.

If we change the IMAP server directory setting on the client while
using dovecot, then all the folders that were previously at the same
level as INBOX become inaccessible, so that's not a viable option.

So, my question is this: Can I replicate the cyrus behavior where
INBOX subfolders are an all-or-nothing option? Or are we stuck with
users (having questionable file management skills in the first place)
getting lost between INBOX subfolders and top-level folders.

Thanks,

Jeff

root:~# doveconf -n
# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.13.0-40-generic x86_64 Ubuntu 14.04.1 LTS
auth_mechanisms = plain login
auth_verbose = yes
listen = *
mail_location = sdbox:%h:LAYOUT=fs:ALT=/var/alt-vmail/%n
mail_plugins =  quota
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 {
  inbox = yes
  location =
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox Sent Messages {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix =
  separator = /
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  quota = dict:%n::file:%h/dovecot-quota
  quota_grace = 10%%
  quota_rule = *:storage=100M
  quota_rule2 = Trash:storage=+20M
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols =  imap sieve
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
  }
  unix_listener auth-userdb {
mode = 0666
  }
}
service imap-login {
  inet_listener imap {
address = localhost
port = 143
  }
  inet_listener imaps {
port = 0
  }
}
service managesieve-login {
  inet_listener sieve {
address = localhost
port = 4190
  }
}
ssl = required
ssl_cert = /etc/ssl/certs/mail..com.crt
ssl_key = /etc/ssl/private/mail..com.key
userdb {
  args = username_format=%n /etc/dovecot/qec-quota-override
  default_fields = uid=vmail gid=vmail home=/var/vmail/%n
  driver = passwd-file
}
userdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  default_fields = uid=vmail gid=vmail home=/var/vmail/%n
  driver = ldap
}
protocol lda {
  mail_plugins =  quota sieve
}
protocol imap {
  mail_plugins =  quota imap_quota
}


Re: Is atomic MOVING of messages between IMAP folders possible?

2014-08-07 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Quoting Greg Sullivan greg.sulli...@sullivang.net:


I was gobsmacked when I discovered that duplicates could easily occur!


move is not atomic in a filesystem either. Under circumstances it has to 
be implemented by cp  rm. Unless you protect the move's source by 
locking - as Timo suggested with the message at Tue, 5 Aug 2014 21:19:46 - 
the same duplication can occur.


In your reply you've wrote: Heaven FORBID that I should ask for entire 
conversation moves to be atomic as well. (which is really what I want) 
Actually you want to use database-like transactions for IMAP commands or 
sessions.


Actually, what should happen _during_ the MOVE, if another client queries 
for the source message or launches commands on it? Now, for a short period 
of time the copy takes the message is available at the source location 
only, then it disappears if the move was successful.
IMHO, you could write a plugin that monitors or wraps MOVE commands and 
denies second simultaneous move attempts. In a way, that plugin would do 
the locking Timo suggested as a server-side implementation.
How many simultaneous MOVE do you expect? Maybe you could lock the source 
mailbox wholly during a move.


- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUBU+Mp13z1H7kL/d9rAQLiAAgAqryldRY7xyLxhULj+nmABbspsXsauip5
KNGYx1lPmTh1JqhvGZ/1mxn80ImidXa2U3poa8ltHPthjHW1NvqsDCMFXTzpUC36
l6zIP7VOEwMSLAq0/KmsbvJIh13h9IiZRzG3zZDO7AaDyxru171qctuEwOKO3EWp
W4kicYne3fAj/FXEI4+Dnm7a6cJabIRL2DTzkU33JC0S+/seq/8ZXj9XO99ocwJV
86xjdtaD90H3akIA1G7/Q1Ielw5tEPGMD7Ye4RF+ra1DYOsj9RYXisVqNhYLDh84
qUsBPXm7Ap4rgp07iar10ex3UYQbGEq0VR9bxUxna4IMS67EtBwLpQ==
=7Rkz
-END PGP SIGNATURE-


Re: Re: Is atomic MOVING of messages between IMAP folders possible?

2014-08-06 Thread Greg Sullivan
Jochen,
I don't have any in-depth knowledge of the IMAP protocol. I'm just saying
that given that IMAP is designed for concurrent access from multiple
clients, I would have expected it to behave much better when more than one
person attempts to move a message, that's all. I was gobsmacked when I
discovered that duplicates could easily occur!

Quote from the IMAP wikipedia page:
Internet Message Access Protocol (IMAP) is a protocol for e-mail retrieval
and storage developed by Mark Crispin in 1986 at Stanford University as an
alternative to POP. IMAP unlike POP, specifically allows multiple clients
simultaneously connected to the same mailbox, and through flags stored on
the server, different clients accessing the same mailbox at the same or
different times can detect state changes made by other clients.

Regards,
Greg.


On 6 August 2014 04:00, Jochen Bern jochen.b...@linworks.de wrote:

 On -10.01.-28163 20:59, Greg Sullivan wrote:
  I must say I am extremely disappointed that intra-account moves are not
  atomic. As far as I can tell, IMAP was designed to allow shared access,
 so
  in my opinion this operation should be atomic.  Heaven FORBID that I
 should
  ask for entire conversation moves to be atomic as well. (which is really
  what I want)

 How would it be of any use to the passive client that the *operation* is
 atomic when (as far as I can see, which admittedly mightn't be much)
 there is no way defined in the IMAP protocol to atomically *notify* it
 of said change?

 IMAP IDLE, for example, may inform it that one message disappeared from
 mailbox X and one popped up in mailbox Y - not that these two are
 actually the same message, still have the same set of flags set, etc..
 That's for the client to find out by specific requests - which already
 breaks the atomicity and allows for a race condition between clients.

 Regards,
 J. Bern
 --
 *NEU* - NEC IT-Infrastruktur-Produkte im http://www.linworks-shop.de/:
 Server--Storage--Virtualisierung--Management SW--Passion for Performance
 Jochen Bern, Systemingenieur --- LINworks GmbH http://www.LINworks.de/
 Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
 PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27
 Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
 Unternehmenssitz Weiterstadt, Geschäftsführer Metin Dogan, Oliver Michel



Re: Is atomic MOVING of messages between IMAP folders possible?

2014-08-06 Thread Reindl Harald


Am 06.08.2014 um 12:15 schrieb Greg Sullivan:
 Jochen,
 I don't have any in-depth knowledge of the IMAP protocol. I'm just saying
 that given that IMAP is designed for concurrent access from multiple
 clients, I would have expected it to behave much better when more than one
 person attempts to move a message, that's all. I was gobsmacked when I
 discovered that duplicates could easily occur!
 
 Quote from the IMAP wikipedia page:
 Internet Message Access Protocol (IMAP) is a protocol for e-mail retrieval
 and storage developed by Mark Crispin in 1986 at Stanford University as an
 alternative to POP. IMAP unlike POP, specifically allows multiple clients
 simultaneously connected to the same mailbox, and through flags stored on
 the server, different clients accessing the same mailbox at the same or
 different times can detect state changes made by other clients.

that's the theory

can detect - when and how in case of concurrency
things are not that easy because you have anyways
network latency as part of the game

 On 6 August 2014 04:00, Jochen Bern jochen.b...@linworks.de wrote:
 
 On -10.01.-28163 20:59, Greg Sullivan wrote:
 I must say I am extremely disappointed that intra-account moves are not
 atomic. As far as I can tell, IMAP was designed to allow shared access,
 so
 in my opinion this operation should be atomic.  Heaven FORBID that I
 should
 ask for entire conversation moves to be atomic as well. (which is really
 what I want)

 How would it be of any use to the passive client that the *operation* is
 atomic when (as far as I can see, which admittedly mightn't be much)
 there is no way defined in the IMAP protocol to atomically *notify* it
 of said change?

 IMAP IDLE, for example, may inform it that one message disappeared from
 mailbox X and one popped up in mailbox Y - not that these two are
 actually the same message, still have the same set of flags set, etc..
 That's for the client to find out by specific requests - which already
 breaks the atomicity and allows for a race condition between clients.



signature.asc
Description: OpenPGP digital signature


Re: Is atomic MOVING of messages between IMAP folders possible?

2014-08-06 Thread Ed W

On 05/08/2014 17:29, Greg Sullivan wrote:

That's promising that it should be doable. (yes, all I want is for the move
to only occur once - duplicate messages is not a move at all)  I'll
forward your suggestions to the Thunderbird  Postbox teams.

In the meantime I'll continue to evaluate helpdesk systems and
collaborative inbox products.

Greg.



I agree with the goal though.  I have extremely simple needs for a 
helpdesk/CMS type system, and some plugins to Thunderbird would be quite 
satisfactory for my needs


Really I need:
- Enhanced addressbook, possibly reading via vcard from my main business 
system (bring in customer details and links to their orders on main system)
- Ability to force breaking and rejoin of specific message threading 
(because customers find an old invoice and hit reply to it to send us a 
support request + other customers who send you 15 emails (without 
hitting reply to trigger threading) to describe a single problem).  Note 
I believe this requires rewriting the message, so it couldn't be atomic 
with current IMAP?
- Enhanced use of flags to mark whether thread needs further input or is 
closed


Nice to have would be:
- Logging these state changes to somewhere else so that you can get 
statistics (can probably be done by polling the state of the IMAP server 
though?)
- Atomic locking of threads so that we don't get two people answer 
something. Could be handled through use of flags perhaps?


Thunderbird is helpful in that in theory all one needs to do is write 
the above in javascript and drop appropriate display buttons on the 
email inbox, so even if some external lock manager is needed to 
arbitrate access, then this is no great problem.  In practice I lack the 
time to work on this, but I'm vaguely interested to find out if there is 
a way to hire plugin developers for Thunderbird?


Good luck

Ed W


Re: Is atomic MOVING of messages between IMAP folders possible?

2014-08-06 Thread Michael M Slusarz

Quoting Greg Sullivan greg.sulli...@sullivang.net:


I was gobsmacked when I discovered that duplicates could easily occur!

Quote from the IMAP wikipedia page:
Internet Message Access Protocol (IMAP) is a protocol for e-mail retrieval
and storage developed by Mark Crispin in 1986 at Stanford University as an
alternative to POP. IMAP unlike POP, specifically allows multiple clients
simultaneously connected to the same mailbox, and through flags stored on
the server, different clients accessing the same mailbox at the same or
different times can detect state changes made by other clients.


Disagree.  I'm not gobsmacked due to the fact that IMAP was designed  
to ensure that no unintentional DESTRUCTIVE actions take place.  I'd  
be gobsmacked if it was the opposite - preferring duplicate  
prevention over message loss.


What's worse:

1. Concurrent users where one accidentally deletes (i.e. EXPUNGE) a  
message due to inconsistent mailbox state between the two sessions.
2. Concurrent users where one accidentally creates a duplicate message  
during a move operation by the other user.


1 is worse.  (Although 1 becomes mostly irrelevant once UIDs are used  
and UIDPLUS is available.)  But 2, in real-world practice, simply  
doesn't happen enough to make it a critical issue.


michael


Re: Is atomic MOVING of messages between IMAP folders possible?

2014-08-05 Thread Greg Sullivan
Thanks Timo, and no, I can't (easily) change the code of the client.

I must say I am extremely disappointed that intra-account moves are not
atomic. As far as I can tell, IMAP was designed to allow shared access, so
in my opinion this operation should be atomic.  Heaven FORBID that I should
ask for entire conversation moves to be atomic as well. (which is really
what I want)

Looks like a bloatware - sorry - helpdesk system - is what I will need to
use.

Greg.


On 4 August 2014 22:44, Timo Sirainen t...@iki.fi wrote:

 On 04 Aug 2014, at 14:12, Greg Sullivan greg.sulli...@sullivang.net
 wrote:

  Yes, both client and server support IMAP MOVE, and both also support
  CONDSTORE.
 
  I have tried both with and without CONDSTORE enabled in the client, with
  the same result.

 With CONDSTORE I was thinking you could do it something like:

 1 FETCH 1 (FLAGS MODSEQ)
 * 1 FLAGS () MODSEQ 12345
 2 STORE (UNCHANGEDSINCE 12345) 1 +FLAGS $AtomicMove
 3 MOVE 1 elsewhere

 If another client attempts the same, either 1 will return $AtomicMove in
 flags - abort or 2 will fail with NO. But you should still handle failures
 if the client/connection dies between 2 and 3 or 3 fails for some reason.

 But, of course if you can't change the client code to do this then it
 doesn't help.

  I am very confident IMAP MOVE is actually being invoked, because
  intra-account moves occur extremely rapidly. (much faster than
  inter-account moves, which of course is a copy  delete)

 Inter-account physically copies the data (FETCH + APPEND + EXPUNGE).
 Alternative to MOVE is COPY + EXPUNGE, which is just as fast as MOVE.
 Dovecot actually implements MOVE by internally doing a COPY + EXPUNGE.




Re: Is atomic MOVING of messages between IMAP folders possible?

2014-08-05 Thread Timo Sirainen
Note that MOVE isn't atomic even between moving within one user's folders. The 
MOVE RFC itself also doesn't say anything about it ever having to be atomic. 
Although if by atomicity you mean that you simply want to make sure that the 
same source mail can't be MOVEd twice, that would be doable with some work I 
think. Even for full conversations (without partial failures).

On 05 Aug 2014, at 13:19, Greg Sullivan greg.sulli...@sullivang.net wrote:

 Thanks Timo, and no, I can't (easily) change the code of the client.
 
 I must say I am extremely disappointed that intra-account moves are not
 atomic. As far as I can tell, IMAP was designed to allow shared access, so
 in my opinion this operation should be atomic.  Heaven FORBID that I should
 ask for entire conversation moves to be atomic as well. (which is really
 what I want)
 
 Looks like a bloatware - sorry - helpdesk system - is what I will need to
 use.
 
 Greg.
 
 
 On 4 August 2014 22:44, Timo Sirainen t...@iki.fi wrote:
 
 On 04 Aug 2014, at 14:12, Greg Sullivan greg.sulli...@sullivang.net
 wrote:
 
 Yes, both client and server support IMAP MOVE, and both also support
 CONDSTORE.
 
 I have tried both with and without CONDSTORE enabled in the client, with
 the same result.
 
 With CONDSTORE I was thinking you could do it something like:
 
 1 FETCH 1 (FLAGS MODSEQ)
 * 1 FLAGS () MODSEQ 12345
 2 STORE (UNCHANGEDSINCE 12345) 1 +FLAGS $AtomicMove
 3 MOVE 1 elsewhere
 
 If another client attempts the same, either 1 will return $AtomicMove in
 flags - abort or 2 will fail with NO. But you should still handle failures
 if the client/connection dies between 2 and 3 or 3 fails for some reason.
 
 But, of course if you can't change the client code to do this then it
 doesn't help.
 
 I am very confident IMAP MOVE is actually being invoked, because
 intra-account moves occur extremely rapidly. (much faster than
 inter-account moves, which of course is a copy  delete)
 
 Inter-account physically copies the data (FETCH + APPEND + EXPUNGE).
 Alternative to MOVE is COPY + EXPUNGE, which is just as fast as MOVE.
 Dovecot actually implements MOVE by internally doing a COPY + EXPUNGE.
 
 


Re: Is atomic MOVING of messages between IMAP folders possible?

2014-08-05 Thread Greg Sullivan
That's promising that it should be doable. (yes, all I want is for the move
to only occur once - duplicate messages is not a move at all)  I'll
forward your suggestions to the Thunderbird  Postbox teams.

In the meantime I'll continue to evaluate helpdesk systems and
collaborative inbox products.

Greg.
On 06/08/2014 2:11 am, Timo Sirainen t...@iki.fi wrote:

 Note that MOVE isn't atomic even between moving within one user's folders.
 The MOVE RFC itself also doesn't say anything about it ever having to be
 atomic. Although if by atomicity you mean that you simply want to make sure
 that the same source mail can't be MOVEd twice, that would be doable with
 some work I think. Even for full conversations (without partial failures).

 On 05 Aug 2014, at 13:19, Greg Sullivan greg.sulli...@sullivang.net
 wrote:

  Thanks Timo, and no, I can't (easily) change the code of the client.
 
  I must say I am extremely disappointed that intra-account moves are not
  atomic. As far as I can tell, IMAP was designed to allow shared access,
 so
  in my opinion this operation should be atomic.  Heaven FORBID that I
 should
  ask for entire conversation moves to be atomic as well. (which is really
  what I want)
 
  Looks like a bloatware - sorry - helpdesk system - is what I will need to
  use.
 
  Greg.
 
 
  On 4 August 2014 22:44, Timo Sirainen t...@iki.fi wrote:
 
  On 04 Aug 2014, at 14:12, Greg Sullivan greg.sulli...@sullivang.net
  wrote:
 
  Yes, both client and server support IMAP MOVE, and both also support
  CONDSTORE.
 
  I have tried both with and without CONDSTORE enabled in the client,
 with
  the same result.
 
  With CONDSTORE I was thinking you could do it something like:
 
  1 FETCH 1 (FLAGS MODSEQ)
  * 1 FLAGS () MODSEQ 12345
  2 STORE (UNCHANGEDSINCE 12345) 1 +FLAGS $AtomicMove
  3 MOVE 1 elsewhere
 
  If another client attempts the same, either 1 will return $AtomicMove in
  flags - abort or 2 will fail with NO. But you should still handle
 failures
  if the client/connection dies between 2 and 3 or 3 fails for some
 reason.
 
  But, of course if you can't change the client code to do this then it
  doesn't help.
 
  I am very confident IMAP MOVE is actually being invoked, because
  intra-account moves occur extremely rapidly. (much faster than
  inter-account moves, which of course is a copy  delete)
 
  Inter-account physically copies the data (FETCH + APPEND + EXPUNGE).
  Alternative to MOVE is COPY + EXPUNGE, which is just as fast as MOVE.
  Dovecot actually implements MOVE by internally doing a COPY + EXPUNGE.
 
 




Re: Re: Is atomic MOVING of messages between IMAP folders possible?

2014-08-05 Thread Jochen Bern
On -10.01.-28163 20:59, Greg Sullivan wrote:
 I must say I am extremely disappointed that intra-account moves are not
 atomic. As far as I can tell, IMAP was designed to allow shared access, so
 in my opinion this operation should be atomic.  Heaven FORBID that I should
 ask for entire conversation moves to be atomic as well. (which is really
 what I want)

How would it be of any use to the passive client that the *operation* is
atomic when (as far as I can see, which admittedly mightn't be much)
there is no way defined in the IMAP protocol to atomically *notify* it
of said change?

IMAP IDLE, for example, may inform it that one message disappeared from
mailbox X and one popped up in mailbox Y - not that these two are
actually the same message, still have the same set of flags set, etc..
That's for the client to find out by specific requests - which already
breaks the atomicity and allows for a race condition between clients.

Regards,
J. Bern
-- 
*NEU* - NEC IT-Infrastruktur-Produkte im http://www.linworks-shop.de/:
Server--Storage--Virtualisierung--Management SW--Passion for Performance
Jochen Bern, Systemingenieur --- LINworks GmbH http://www.LINworks.de/
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Geschäftsführer Metin Dogan, Oliver Michel


Is atomic MOVING of messages between IMAP folders possible?

2014-08-04 Thread Greg Sullivan
I would like to use a shared IMAP account, with multiple users accessing it
simultaneously.  The users would take ownership of messages by first
attempting to MOVE the messages from the Inbox,  into their private IMAP
folder, still within the same account. Now, since there will be multiple
users competing for the same messages, I naturally want only ONE of the
simultaneous moves to be successful at a time.

So far, this isn't working. If I do the move from two clients,
simultaneously, the messages can go to *both *destination folders -
duplicates can result.

Is it possible to configure Dovecot and/or an IMAP client to behave the way
I want it to? If the answer to this is YES, then I'll offer my config
details. If the answer is NO, the next question is - do any email systems
at all behave the way I want? (I tried a hosted Exchange/OWA service - it
has the same problem)

Thanks  regards,
Greg.


Re: Is atomic MOVING of messages between IMAP folders possible?

2014-08-04 Thread Timo Sirainen
On 04 Aug 2014, at 10:44, Greg Sullivan greg.sulli...@sullivang.net wrote:

 I would like to use a shared IMAP account, with multiple users accessing it
 simultaneously.  The users would take ownership of messages by first
 attempting to MOVE the messages from the Inbox,  into their private IMAP
 folder, still within the same account. Now, since there will be multiple
 users competing for the same messages, I naturally want only ONE of the
 simultaneous moves to be successful at a time.
 
 So far, this isn't working. If I do the move from two clients,
 simultaneously, the messages can go to *both *destination folders -
 duplicates can result.
 
 Is it possible to configure Dovecot and/or an IMAP client to behave the way
 I want it to? If the answer to this is YES, then I'll offer my config
 details. If the answer is NO, the next question is - do any email systems
 at all behave the way I want? (I tried a hosted Exchange/OWA service - it
 has the same problem)

Dovecot doesn't even attempt to do atomic MOVEs. I don't think any server will. 
If you can change the client code, you could use CONDSTORE instead, which does 
give atomic STOREs.


Re: Is atomic MOVING of messages between IMAP folders possible?

2014-08-04 Thread Reindl Harald


Am 04.08.2014 um 14:00 schrieb Timo Sirainen:
 On 04 Aug 2014, at 10:44, Greg Sullivan greg.sulli...@sullivang.net wrote:
 
 I would like to use a shared IMAP account, with multiple users accessing it
 simultaneously.  The users would take ownership of messages by first
 attempting to MOVE the messages from the Inbox,  into their private IMAP
 folder, still within the same account. Now, since there will be multiple
 users competing for the same messages, I naturally want only ONE of the
 simultaneous moves to be successful at a time.

 So far, this isn't working. If I do the move from two clients,
 simultaneously, the messages can go to *both *destination folders -
 duplicates can result.

 Is it possible to configure Dovecot and/or an IMAP client to behave the way
 I want it to? If the answer to this is YES, then I'll offer my config
 details. If the answer is NO, the next question is - do any email systems
 at all behave the way I want? (I tried a hosted Exchange/OWA service - it
 has the same problem)
 
 Dovecot doesn't even attempt to do atomic MOVEs. I don't think any server 
 will. If you can change the client code, you could use CONDSTORE instead, 
 which does give atomic STOREs.

Internet Message Access Protocol (IMAP) - MOVE Extension
http://tools.ietf.org/html/rfc6851

well, both, client and server would need to support it
rely on that is unlikely for many years



signature.asc
Description: OpenPGP digital signature


Re: Is atomic MOVING of messages between IMAP folders possible?

2014-08-04 Thread Greg Sullivan
Yes, both client and server support IMAP MOVE, and both also support
CONDSTORE.

I have tried both with and without CONDSTORE enabled in the client, with
the same result.

I am very confident IMAP MOVE is actually being invoked, because
intra-account moves occur extremely rapidly. (much faster than
inter-account moves, which of course is a copy  delete)

Thanks so far.

Client is Postbox  Thunderbird on Windows. (I realise Postbox is based on
Thunderbird)

Greg.




On 4 August 2014 22:03, Reindl Harald h.rei...@thelounge.net wrote:



 Am 04.08.2014 um 14:00 schrieb Timo Sirainen:
  On 04 Aug 2014, at 10:44, Greg Sullivan greg.sulli...@sullivang.net
 wrote:
 
  I would like to use a shared IMAP account, with multiple users
 accessing it
  simultaneously.  The users would take ownership of messages by first
  attempting to MOVE the messages from the Inbox,  into their private IMAP
  folder, still within the same account. Now, since there will be multiple
  users competing for the same messages, I naturally want only ONE of the
  simultaneous moves to be successful at a time.
 
  So far, this isn't working. If I do the move from two clients,
  simultaneously, the messages can go to *both *destination folders -
  duplicates can result.
 
  Is it possible to configure Dovecot and/or an IMAP client to behave the
 way
  I want it to? If the answer to this is YES, then I'll offer my config
  details. If the answer is NO, the next question is - do any email
 systems
  at all behave the way I want? (I tried a hosted Exchange/OWA service -
 it
  has the same problem)
 
  Dovecot doesn't even attempt to do atomic MOVEs. I don't think any
 server will. If you can change the client code, you could use CONDSTORE
 instead, which does give atomic STOREs.

 Internet Message Access Protocol (IMAP) - MOVE Extension
 http://tools.ietf.org/html/rfc6851

 well, both, client and server would need to support it
 rely on that is unlikely for many years




Re: Is atomic MOVING of messages between IMAP folders possible?

2014-08-04 Thread Timo Sirainen
On 04 Aug 2014, at 14:12, Greg Sullivan greg.sulli...@sullivang.net wrote:

 Yes, both client and server support IMAP MOVE, and both also support
 CONDSTORE.
 
 I have tried both with and without CONDSTORE enabled in the client, with
 the same result.

With CONDSTORE I was thinking you could do it something like:

1 FETCH 1 (FLAGS MODSEQ)
* 1 FLAGS () MODSEQ 12345
2 STORE (UNCHANGEDSINCE 12345) 1 +FLAGS $AtomicMove
3 MOVE 1 elsewhere

If another client attempts the same, either 1 will return $AtomicMove in flags 
- abort or 2 will fail with NO. But you should still handle failures if the 
client/connection dies between 2 and 3 or 3 fails for some reason.

But, of course if you can't change the client code to do this then it doesn't 
help.

 I am very confident IMAP MOVE is actually being invoked, because
 intra-account moves occur extremely rapidly. (much faster than
 inter-account moves, which of course is a copy  delete)

Inter-account physically copies the data (FETCH + APPEND + EXPUNGE). 
Alternative to MOVE is COPY + EXPUNGE, which is just as fast as MOVE. Dovecot 
actually implements MOVE by internally doing a COPY + EXPUNGE.


Re: [Dovecot] IMAP folders sort order

2013-03-01 Thread Valery V. Sedletski

 But I tried to create a fresh account in Dovecot (not migrated from  
 Courier), and it
 still shows a intermixed folder order:

 a list  *
 * LIST (\HasNoChildren) / Spam
 * LIST (\HasNoChildren) / Sent
 * LIST (\HasNoChildren) / Drafts
 * LIST (\HasNoChildren) / Trash
 * LIST (\HasNoChildren) / INBOX
 * LIST (\HasNoChildren) / Pub
 a OK List completed.

Why does this matter?  IMAP does NOT enforce any sort of required
sorting order, and no IMAP client can assume a sort order.  So
enforcing a sort order on the server is just a waste of resources.


Just a cosmetic problem, of course. Some IMAP clients do sort folders,
others do not, so they show different folder sort order in Dovecot, if
migrated from Courier (Courier seems to sort folders, so that the system
ones appear first). We just needed a seamless migration.

FWIW, this is completely legal IMAP output also (albeit inefficient):

a list  *
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Sent
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Drafts
* LIST (\HasNoChildren) / Trash
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / INBOX
* LIST (\HasNoChildren) / Pub
a OK List completed.


So, it is legal to even list each folder several times?

michael

WBR,
valerius




Re: [Dovecot] IMAP folders sort order

2013-03-01 Thread José Celestino
On Sex, 2013-03-01 at 13:01 +, Valery V. Sedletski wrote:
 
 So, it is legal to even list each folder several times?
 

http://www.dovecot.org/imap-client-coding-howto.html

LIST reply is very loosely defined. It may be very much out of order.
It may even contain duplicates.





Re: [Dovecot] IMAP folders sort order

2013-03-01 Thread Michael M Slusarz

Quoting Valery V. Sedletski valer...@afterlogic.com:



But I tried to create a fresh account in Dovecot (not migrated from
Courier), and it
still shows a intermixed folder order:

a list  *
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Sent
* LIST (\HasNoChildren) / Drafts
* LIST (\HasNoChildren) / Trash
* LIST (\HasNoChildren) / INBOX
* LIST (\HasNoChildren) / Pub
a OK List completed.


Why does this matter?  IMAP does NOT enforce any sort of required
sorting order, and no IMAP client can assume a sort order.  So
enforcing a sort order on the server is just a waste of resources.



Just a cosmetic problem, of course. Some IMAP clients do sort folders,
others do not, so they show different folder sort order in Dovecot, if
migrated from Courier (Courier seems to sort folders, so that the system
ones appear first). We just needed a seamless migration.


Still don't see the relevance to a migration though.  If you have  
software that assumes that mailboxes are listed in some sort of order,  
that is just broken software.



FWIW, this is completely legal IMAP output also (albeit inefficient):

a list  *
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Sent
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Drafts
* LIST (\HasNoChildren) / Trash
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / INBOX
* LIST (\HasNoChildren) / Pub
a OK List completed.



So, it is legal to even list each folder several times?


Sure.  Just like this is legal IMAP:

a FETCH 1 (UID)
* 2 FETCH (UID 100)
* 3 FETCH (FLAGS (\Seen))
* 1 FETCH (UID 50)
* 1 FETCH (UID 50)
* 1 FETCH (UID 50)
* 2 FETCH (UID 100)
a OK FETCH complete

Once again: not efficient, but perfectly acceptable.

michael



[Dovecot] IMAP folders sort order

2013-02-28 Thread Valery V. Sedletski
Hi all

We migrated our IMAP server from Courier to Dovecot. The minor problem
appeared: Dovecot LIST command
now shows mailbox listing in some weird order. (I suppose, it is filesystem
directory order) Previously, with Courier,
it was sorted, i.e., the INBOX was the first, followed by other system
folders. This is not a problem with our webmail,
because it sorts folders by its own. But with some IMAP clients, we have
folders intermixed.

Is there a way to influence the folder sort order in Dovecot?

WBR,
valery



Re: [Dovecot] IMAP folders sort order

2013-02-28 Thread Robert Schetterer
Am 28.02.2013 14:54, schrieb Valery V. Sedletski:
 Hi all
 
 We migrated our IMAP server from Courier to Dovecot. The minor problem
 appeared: Dovecot LIST command
 now shows mailbox listing in some weird order. (I suppose, it is filesystem
 directory order) Previously, with Courier,
 it was sorted, i.e., the INBOX was the first, followed by other system
 folders. This is not a problem with our webmail, 
 because it sorts folders by its own. But with some IMAP clients, we have
 folders intermixed.
 
 Is there a way to influence the folder sort order in Dovecot?
 
 WBR,
 valery
 
 

comming from courier it may be a namespace problem

http://wiki2.dovecot.org/Migration/Courier

Dovecot configuration

Courier by default uses INBOX. as the IMAP namespace for private
mailboxes. If you want a transparent migration, you'll need to configure
Dovecot to use a namespace with INBOX. prefix as well.

mail_location = maildir:~/Maildir

namespace {
  prefix = INBOX.
  separator = .
  inbox = yes
}


Best Regards
MfG Robert Schetterer

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer
Aufsichtsratsvorsitzender: Joerg Heidrich


Re: [Dovecot] IMAP folders sort order

2013-02-28 Thread Valery V. Sedletski

 Is there a way to influence the folder sort order in Dovecot?

 WBR,
 valery



comming from courier it may be a namespace problem

http://wiki2.dovecot.org/Migration/Courier

Dovecot configuration

Courier by default uses INBOX. as the IMAP namespace for private
mailboxes. If you want a transparent migration, you'll need to configure
Dovecot to use a namespace with INBOX. prefix as well.

mail_location = maildir:~/Maildir

namespace {
  prefix = INBOX.
  separator = .
  inbox = yes
}


Yes, I knew about that. In Courier, we had 'INBOX.' namespace prefix and '.' as 
a separator.
Now we have empty prefix and a '/' as a separator.  So, the settings are as 
follows:

namespace {
  location = maildir:/usr/mailsuite/data/%d/%n
  type = private
  separator = /
  prefix =
  inbox = yes
}

But I used the courier-dovecot-migrate.pl script from Timo, as recommended. 
Where might be the
traces of Courier (namespace settings etc.) remained? It seems that Courier and 
Dovecot use separate
sets of files in user mailbox. Maybe, the migrate script expects the settings 
to be prefix = 'INBOX.' and
separator = '.', what we don't want, so, we must modify the migrate script to 
change namespace settings
when migrating?

WBR,
valery




Re: [Dovecot] IMAP folders sort order

2013-02-28 Thread Robert Schetterer
Am 28.02.2013 15:57, schrieb Valery V. Sedletski:

 Is there a way to influence the folder sort order in Dovecot?

 WBR,
 valery



 comming from courier it may be a namespace problem

 http://wiki2.dovecot.org/Migration/Courier

 Dovecot configuration

 Courier by default uses INBOX. as the IMAP namespace for private
 mailboxes. If you want a transparent migration, you'll need to configure
 Dovecot to use a namespace with INBOX. prefix as well.

 mail_location = maildir:~/Maildir

 namespace {
  prefix = INBOX.
  separator = .
  inbox = yes
 }

 
 Yes, I knew about that. In Courier, we had 'INBOX.' namespace prefix and '.' 
 as a separator. 
 Now we have empty prefix and a '/' as a separator.  So, the settings are as 
 follows:
 
 namespace {
   location = maildir:/usr/mailsuite/data/%d/%n
   type = private
   separator = /
   prefix =
   inbox = yes
 }
 
 But I used the courier-dovecot-migrate.pl script from Timo, as recommended. 
 Where might be the 
 traces of Courier (namespace settings etc.) remained? It seems that Courier 
 and Dovecot use separate
 sets of files in user mailbox. Maybe, the migrate script expects the settings 
 to be prefix = 'INBOX.' and
 separator = '.', what we don't want, so, we must modify the migrate script to 
 change namespace settings
 when migrating?


however what you used at migrate, some from your old clients may not
update their folder searchlist to/at new namespace, or have fixed prefix
setup etc, i didnt remember exactly but i think you can have both
namespace setups somehow for stay compatible with old clients
try search list and wiki


 
 WBR,
 valery
 
 



Best Regards
MfG Robert Schetterer

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer
Aufsichtsratsvorsitzender: Joerg Heidrich


Re: [Dovecot] IMAP folders sort order

2013-02-28 Thread Valery V. Sedletski

however what you used at migrate, some from your old clients may not
update their folder searchlist to/at new namespace, or have fixed prefix
setup etc, i didnt remember exactly but i think you can have both
namespace setups somehow for stay compatible with old clients
try search list and wiki



Yes, thanks -- I'll look into wiki...

But I tried to create a fresh account in Dovecot (not migrated from Courier), 
and it
still shows a intermixed folder order:

a list  *
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Sent
* LIST (\HasNoChildren) / Drafts
* LIST (\HasNoChildren) / Trash
* LIST (\HasNoChildren) / INBOX
* LIST (\HasNoChildren) / Pub
a OK List completed.

So, it is not a migration problem -- note that it is the LIST command output,
so it is not got influenced by some IMAP client folder searchlist/mask or its
namespace settings (like in Thunderbird)

WBR,
valery




Re: [Dovecot] IMAP folders sort order

2013-02-28 Thread Michael M Slusarz

Quoting Valery V. Sedletski valer...@afterlogic.com:



however what you used at migrate, some from your old clients may not
update their folder searchlist to/at new namespace, or have fixed prefix
setup etc, i didnt remember exactly but i think you can have both
namespace setups somehow for stay compatible with old clients
try search list and wiki




Yes, thanks -- I'll look into wiki...

But I tried to create a fresh account in Dovecot (not migrated from  
Courier), and it

still shows a intermixed folder order:

a list  *
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Sent
* LIST (\HasNoChildren) / Drafts
* LIST (\HasNoChildren) / Trash
* LIST (\HasNoChildren) / INBOX
* LIST (\HasNoChildren) / Pub
a OK List completed.


Why does this matter?  IMAP does NOT enforce any sort of required  
sorting order, and no IMAP client can assume a sort order.  So  
enforcing a sort order on the server is just a waste of resources.


FWIW, this is completely legal IMAP output also (albeit inefficient):

a list  *
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Sent
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Drafts
* LIST (\HasNoChildren) / Trash
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / Spam
* LIST (\HasNoChildren) / INBOX
* LIST (\HasNoChildren) / Pub
a OK List completed.

michael



Re: [Dovecot] saving to imap folders and namespace settings

2013-02-06 Thread Gustavo Sansone

El 2013-02-05 12:10, Gustavo Sansone escribió:

El 2013-02-05 0:09, Timo Sirainen escribió:

On Tue, 2013-01-29 at 16:29 -0200, Gustavo Sansone wrote:

hello everyone, i'm new to this list
im running dovecot as imap+pop (2.1.12) and roundcube (0.8.4) as
client.

having problems on saving to imap folders, with errors on some 
accounts


my folder structure is as follow:

/home/user/.maildir
/home/user/.maildir/.Drafts
/home/user/.maildir/.Junk
/home/user/.maildir/.Sent
/home/user/.maildir/.Trash
/home/user/.maildir/.Archives
/home/user/.maildir/.Archives.2010
...

i'm very confused with the namespace settings. i don't understand 
what

is the correct way to configure it.
don't need public or shared folders.


Easiest to use the default namespace settings. There you wouldn't 
have

any namespace prefix.


if i just remove the namespace 'INBOX.' , on 10-mail.conf then there
is something that creates new Send and Draft folders into my maildir
folder like this INBOX.Send and INBOX.Drafts. and Roundcube shows me
these new folders under INBOX (screenshot attached).
can't figure out why it happens.

sorry, forgot to mention that when INBOX.Send and INBOX.Drafts are 
created, Roundcube subscribe to these folders as special folders. the 
screenshot was taken after i added INBOX. prefix again to 10-mail.conf


another important thing (i guess), is when installed dovecot, i 
migrated from Courier following the wiki2 documentation.



on dovecot.log i can see this error with my account (and all the
others), but it seems to work ok using roundcube:
imap(gsansone): Error: autocreate: No namespace found for mailbox: 
Junk


In your current setup you have namespace prefix=INBOX. so the 
mailbox

name would be INBOX.Junk.


with a few accounts, i have this on roundcube log:
IMAP Error: Could not save message in Drafts in
/var/www/localhost/htdocs/mail/program/steps/mail/sendmail.inc
with error on saving to imap folder in roundcube UI


Roundcube also isn't configured to have INBOX. prefix. Sounds like 
you

should just remove it.


Re: [Dovecot] saving to imap folders and namespace settings

2013-02-06 Thread Timo Sirainen
On 5.2.2013, at 16.10, Gustavo Sansone gsans...@eumus.edu.uy wrote:

 i'm very confused with the namespace settings. i don't understand what
 is the correct way to configure it.
 don't need public or shared folders.
 
 Easiest to use the default namespace settings. There you wouldn't have
 any namespace prefix.
 
 if i just remove the namespace 'INBOX.' , on 10-mail.conf then there is 
 something that creates new Send and Draft folders into my maildir folder like 
 this INBOX.Send and INBOX.Drafts. and Roundcube shows me these new folders 
 under INBOX (screenshot attached).
 can't figure out why it happens.

Because different clients you're using have been configured to use different 
namespace settings. This is unfortunately how IMAP protocol still works. From 
Dovecot's side either set the prefix to INBOX. or to empty, and from all of the 
clients' sides make sure they use the matching configuration.



Re: [Dovecot] saving to imap folders and namespace settings

2013-02-04 Thread Timo Sirainen
On Tue, 2013-01-29 at 16:29 -0200, Gustavo Sansone wrote:
 hello everyone, i'm new to this list
 im running dovecot as imap+pop (2.1.12) and roundcube (0.8.4) as 
 client.
 
 having problems on saving to imap folders, with errors on some accounts
 
 my folder structure is as follow:
 
 /home/user/.maildir
 /home/user/.maildir/.Drafts
 /home/user/.maildir/.Junk
 /home/user/.maildir/.Sent
 /home/user/.maildir/.Trash
 /home/user/.maildir/.Archives
 /home/user/.maildir/.Archives.2010
 ...
 
 i'm very confused with the namespace settings. i don't understand what 
 is the correct way to configure it.
 don't need public or shared folders.

Easiest to use the default namespace settings. There you wouldn't have
any namespace prefix.

 on dovecot.log i can see this error with my account (and all the 
 others), but it seems to work ok using roundcube:
 imap(gsansone): Error: autocreate: No namespace found for mailbox: Junk

In your current setup you have namespace prefix=INBOX. so the mailbox
name would be INBOX.Junk.

 with a few accounts, i have this on roundcube log:
 IMAP Error: Could not save message in Drafts in 
 /var/www/localhost/htdocs/mail/program/steps/mail/sendmail.inc
 with error on saving to imap folder in roundcube UI

Roundcube also isn't configured to have INBOX. prefix. Sounds like you
should just remove it.




[Dovecot] saving to imap folders and namespace settings

2013-01-29 Thread Gustavo Sansone

hello everyone, i'm new to this list
im running dovecot as imap+pop (2.1.12) and roundcube (0.8.4) as 
client.


having problems on saving to imap folders, with errors on some accounts

my folder structure is as follow:

/home/user/.maildir
/home/user/.maildir/.Drafts
/home/user/.maildir/.Junk
/home/user/.maildir/.Sent
/home/user/.maildir/.Trash
/home/user/.maildir/.Archives
/home/user/.maildir/.Archives.2010
...

i'm very confused with the namespace settings. i don't understand what 
is the correct way to configure it.

don't need public or shared folders.

on dovecot.log i can see this error with my account (and all the 
others), but it seems to work ok using roundcube:

imap(gsansone): Error: autocreate: No namespace found for mailbox: Junk

with a few accounts, i have this on roundcube log:
IMAP Error: Could not save message in Drafts in 
/var/www/localhost/htdocs/mail/program/steps/mail/sendmail.inc

with error on saving to imap folder in roundcube UI

send you attached the output of 'dovecot -n' and the roundcube 
configuration related to folders.


does anyone have any suggestion?

thanks in advance.


--
G. Sansone# 2.1.12: /etc/dovecot/dovecot.conf
managesieve(root): Warning: sieve: ignored unknown extension 'spamtestpl' while 
configuring available extensions
# OS: Linux 3.1.6-gentoo x86_64 Gentoo Base System release 2.1 
auth_mechanisms = plain login
auth_verbose = yes
base_dir = /var/run/dovecot/
disable_plaintext_auth = no
hostname = eumus.edu.uy
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
listen = *
log_path = /var/log/dovecot/dovecot.log
mail_location = maildir:~/.maildir
mail_plugins = quota
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 spamtest 
imapflags notify
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox Sent Messages {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix = INBOX.
  separator = .
}
passdb {
  driver = shadow
}
plugin {
  autocreate = Sent
  autocreate2 = Drafts
  autocreate3 = Junk
  autocreate4 = Trash
  autosubscribe = Sent
  autosubscribe2 = Drafts
  autosubscribe3 = Junk
  autosubscribe4 = Trash
  quota = maildir:User quota
  quota_rule = *:storage=4G
  sieve = ~/.dovecot.sieve
  sieve_default = /etc/dovecot/sieve/move-spam.sieve
  sieve_dir = ~/sieve
  sieve_extensions = +notify +imapflags +spamtest +spamtestpl
  sieve_global_dir = /etc/dovecot/sieve
}
postmaster_address = postmas...@eumus.edu.uy
protocols = imap pop3 lmtp sieve
sendmail_path = /var/qmail/bin/sendmail
service imap-login {
  inet_listener imap {
port = 143
  }
  inet_listener imaps {
port = 993
ssl = yes
  }
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
  service_count = 1
  vsz_limit = 64 M
}
service pop3-login {
  inet_listener pop3 {
port = 110
  }
  inet_listener pop3s {
port = 995
ssl = yes
  }
}
ssl_cert = /var/qmail/control/servercert.pem
ssl_key = /var/qmail/control/servercert.pem
userdb {
  driver = passwd
}
protocol lmtp {
  mail_plugins = quota sieve
}
protocol lda {
  mail_plugins = quota sieve quota autocreate
}
protocol imap {
  mail_plugins = quota imap_quota autocreate
}
protocol pop3 {
  mail_plugins = quota
}

// store draft message is this mailbox
// leave blank if draft messages should not be stored
// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
$rcmail_config['drafts_mbox'] = 'Drafts';

// store spam messages in this mailbox
// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
$rcmail_config['junk_mbox'] = 'Junk';

// store sent message is this mailbox
// leave blank if sent messages should not be stored
// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
$rcmail_config['sent_mbox'] = 'Sent';

// move messages to this folder when deleting them
// leave blank if they should be deleted directly
// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
$rcmail_config['trash_mbox'] = 'Trash';

// display these folders separately in the mailbox list.
// these folders will also be displayed with localized names
// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
$rcmail_config['default_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 
'Trash');

// automatically create the above listed default folders on first login
$rcmail_config['create_default_folders'] = true;



Re: [Dovecot] iPhone and custom imap folders problem

2012-02-27 Thread Jacek Osiecki

On Fri, 24 Feb 2012, Miha Vrhovnik wrote:


Adam Szpakowski a...@3a.pl wrote on 24.2.2012 17:46:02:

On 24.02.2012 15:47, Charles Marcus wrote:

On 2012-02-24 9:22 AM, Przemysław.Orzechowski
przemek.orzechow...@makolab.pl wrote:

Im using Dovecot 1.0.10

Very old - an upgrade would likeley fix your problems...

A client of mine using iPhone1 has the same problem on Dovecot 2.0.15.
Only inbox is synced automatically.

So the solution is simple go bug Apple.
Oh yeah. they say if something isn't implemented on Apple platform or it
doesn't work, then you don't need it, because their devs know what's 
best for their users.


Exactly, no hope here :(
What's even more annoying, apple doesn't put those idiotic limitations on 
Exchange accounts - seems they like Microsoft more than free solutions :)


Greetings,
--
Jacek Osiecki jos...@ceti.pl GG:3828944
I don't want something I need. I want something I want.

[Dovecot] iPhone and custom imap folders problem

2012-02-24 Thread Przemysław.Orzechowski

Hi 

Im using Dovecot 1.0.10 and everything seems work ok except one client
He is accessing his mailbox using iPhone 
There are several custom folders created and mail is directed to them
using procmail
The problem is iPhone mail app only sees changes in INBOX and when new
mail arrives to other folders it will not see it unlers user accesses this
particular folder
Is there some kind of workaround for this?

Im quite sure its iPhones fault as all other email clients are workin
perfectly fine.


Re: [Dovecot] iPhone and custom imap folders problem

2012-02-24 Thread Charles Marcus
On 2012-02-24 9:22 AM, Przemysław.Orzechowski 
przemek.orzechow...@makolab.pl wrote:

Im using Dovecot 1.0.10


Very old - an upgrade would likeley fix your problems...

--

Best regards,

Charles Marcus
I.T. Director
Media Brokers International, Inc.
678.514.6200 x224 | 678.514.6299 fax


Re: [Dovecot] iPhone and custom imap folders problem

2012-02-24 Thread Gregory Finch
On 2012-02-24 6:22 AM, Przemysław.Orzechowski wrote:
 Hi 

 Im using Dovecot 1.0.10 and everything seems work ok except one client
 He is accessing his mailbox using iPhone 
 There are several custom folders created and mail is directed to them
 using procmail
 The problem is iPhone mail app only sees changes in INBOX and when new
 mail arrives to other folders it will not see it unlers user accesses this
 particular folder
 Is there some kind of workaround for this?

 Im quite sure its iPhones fault as all other email clients are workin
 perfectly fine.

As far as I know, that is a limitation of the iPhone mail client: it
only IDLEs on the currently selected folder, and it only checks the
currently selected folder for new messages. You will not see new mail
for the other folders unless you select them.

-Greg



signature.asc
Description: OpenPGP digital signature


Re: [Dovecot] iPhone and custom imap folders problem

2012-02-24 Thread Adam Szpakowski

On 24.02.2012 15:47, Charles Marcus wrote:
On 2012-02-24 9:22 AM, Przemysław.Orzechowski 
przemek.orzechow...@makolab.pl wrote:

Im using Dovecot 1.0.10

Very old - an upgrade would likeley fix your problems...
A client of mine using iPhone1 has the same problem on Dovecot 2.0.15. 
Only inbox is synced automatically.


--
Adam Szpakowski


Re: [Dovecot] iPhone and custom imap folders problem

2012-02-24 Thread Miha Vrhovnik

Adam Szpakowski a...@3a.pl wrote on 24.2.2012 17:46:02:

On 24.02.2012 15:47, Charles Marcus wrote:
 On 2012-02-24 9:22 AM, Przemysław.Orzechowski
 przemek.orzechow...@makolab.pl wrote:
 Im using Dovecot 1.0.10
 Very old - an upgrade would likeley fix your problems...
A client of mine using iPhone1 has the same problem on Dovecot 2.0.15.
Only inbox is synced automatically.

--
Adam Szpakowski

So the solution is simple go bug Apple.
Oh yeah. they say if something isn't implemented on Apple platform or it 
doesn't work, then you don't need it, because their devs know what's best for 
their users.

Regards,
M


Re: [Dovecot] How to serve a subset of IMAP folders for hand held devices.

2011-12-29 Thread Timo Sirainen
On 29.12.2011, at 14.07, Charles Marcus wrote:

 It would be cool if the concept of 'Master User' could be expanded on to 
 provide access to only certain other accounts, as opposed to full domains (or 
 maybe it does alreaqdy and I just don't understand it well enough yet).
 
 For example, we have Sales Assistants in our offices, where each assistant 
 may assist up to 3 or 4 different Sales reps. It would be nice to be able to 
 give the Assistant read-only access to the Sales Reps emails without having 
 to set up shared folders for each one...

It's kind of possible, but perhaps not super easy.. Basically you can use 
%{login_user}, %{login_username} and %{login_domain} variables to figure out if 
the master user login should be accepted. With SQL you could use these to 
create a table that has allowed masteruser - login_username mappings.



Re: [Dovecot] How to serve a subset of IMAP folders for hand held devices.

2011-12-29 Thread Charles Marcus

On 2011-12-28 5:05 PM, David Pottage da...@electric-spoon.com wrote:

Secondly creating a second account makes the authentication on the
server a lot more complex. Either I need two OS level accounts on
the sever, and find ways to keep them in sync, or I need to create a
custom authentication method on dovecot or PAM so that when it
receives a user-name matching some pattern, it will check the
password against a different account.


It would be cool if the concept of 'Master User' could be expanded on to 
provide access to only certain other accounts, as opposed to full 
domains (or maybe it does alreaqdy and I just don't understand it well 
enough yet).


For example, we have Sales Assistants in our offices, where each 
assistant may assist up to 3 or 4 different Sales reps. It would be nice 
to be able to give the Assistant read-only access to the Sales Reps 
emails without having to set up shared folders for each one...


--

Best regards,

Charles


Re: [Dovecot] How to serve a subset of IMAP folders for hand held devices.

2011-12-29 Thread David Pottage
On 28/12/11 22:12, Stan Hoeppner wrote:
 It's a smart phone. Have you considering simply running a webmail server? 
I considered it for about 10 seconds.

Webmail is much less efficent than IMAP both for the server and the
client. I run SquirrelMail on (on Apache) my server, and it consumes far
more CPU and RAM than Dovecot. It is also much slower in most operations
compared with IMAP. Though I have not measured it, I suspect the
bandwidth consumption is much higher because of HTML mark-up and images.

In any case, webmail would not solve the problem of too many folders
being displayed. I would get just as long a list, with a hard to use
scrollbar, but rendered as html instead of in a menu.

-- 
David Pottage



Re: [Dovecot] How to serve a subset of IMAP folders for hand held devices.

2011-12-29 Thread David Pottage
On 28/12/11 22:21, Rick Romero wrote:

 Quoting David Pottage da...@electric-spoon.com:
 Firstly I wanted to retain the option to switch to the full version of
 my mail folders if I needed to access something urgently. My smart-phone
 based email client allows me to change the port number of an existing
 email account, but will not allow me to change the user-name without
 creating a whole new account and re-downloading everything.

 I read back through the thread, and I don't see why you're not using
 IMAP subscriptions - did I overlook it?

If you mean subscriptions on the smartphone client, I was not using them
because the first IMAP client I was using (native email on a Palm Pre)
did not support them.

I have since switched to an Android phone and started using K9, but I
still find it helpful to filter the list of folders that that K9 sees as
I don't want a huge list with an unmanageable scrollbar, and many of the
folders are archive folders that will never contain anything current, so
it makes no sense to make them accessible except through a desktop client.

I am not saying my solution is the only possible solution but I do think
it is worth recording in the Wiki as others may find my approach useful.

-- 
David Pottage



Re: [Dovecot] How to serve a subset of IMAP folders for hand held devices.

2011-12-29 Thread Knute Johnson

On 12/29/2011 2:02 PM, David Pottage wrote:

On 28/12/11 22:21, Rick Romero wrote:


Quoting David Pottageda...@electric-spoon.com:

Firstly I wanted to retain the option to switch to the full version of
my mail folders if I needed to access something urgently. My smart-phone
based email client allows me to change the port number of an existing
email account, but will not allow me to change the user-name without
creating a whole new account and re-downloading everything.


I read back through the thread, and I don't see why you're not using
IMAP subscriptions - did I overlook it?


If you mean subscriptions on the smartphone client, I was not using them
because the first IMAP client I was using (native email on a Palm Pre)
did not support them.

I have since switched to an Android phone and started using K9, but I
still find it helpful to filter the list of folders that that K9 sees as
I don't want a huge list with an unmanageable scrollbar, and many of the
folders are archive folders that will never contain anything current, so
it makes no sense to make them accessible except through a desktop client.

I am not saying my solution is the only possible solution but I do think
it is worth recording in the Wiki as others may find my approach useful.



My wife has an Android phone running K-9 and she is able to not display 
most of the hundreds of folders that she has.  I haven't seen any 
drawbacks to that technique on her phone.  Well maybe if she got rid of 
about a 1000 emails out of her INBOX it would help :-).


--

Knute Johnson
knute2...@knutejohnson.com


Re: [Dovecot] How to serve a subset of IMAP folders for hand held devices.

2011-12-29 Thread Knute Johnson

On 12/29/2011 2:02 PM, David Pottage wrote:

On 28/12/11 22:21, Rick Romero wrote:


Quoting David Pottageda...@electric-spoon.com:

Firstly I wanted to retain the option to switch to the full version of
my mail folders if I needed to access something urgently. My smart-phone
based email client allows me to change the port number of an existing
email account, but will not allow me to change the user-name without
creating a whole new account and re-downloading everything.


I read back through the thread, and I don't see why you're not using
IMAP subscriptions - did I overlook it?


If you mean subscriptions on the smartphone client, I was not using them
because the first IMAP client I was using (native email on a Palm Pre)
did not support them.

I have since switched to an Android phone and started using K9, but I
still find it helpful to filter the list of folders that that K9 sees as
I don't want a huge list with an unmanageable scrollbar, and many of the
folders are archive folders that will never contain anything current, so
it makes no sense to make them accessible except through a desktop client.

I am not saying my solution is the only possible solution but I do think
it is worth recording in the Wiki as others may find my approach useful.



My wife has an Android phone running K-9 and she is able to not display 
most of the hundreds of folders that she has.  I haven't seen any 
drawbacks to that technique on her phone.  Well maybe if she got rid of 
about a 1000 emails out of her INBOX it would help .


--


Knute Johnson


[Dovecot] How to serve a subset of IMAP folders for hand held devices.

2011-12-28 Thread David Pottage

Hello

I am currently running dovecot 1.2.15 on my home server. I have over 200
folders in personal email account, and I have found that my smart-phone
does not work well trying to display that many folders.

I solved the problem by creating a second instance of dovecot running on
a non standard port, and configured it to serve only a subset my email
folders, so that way the email client on my smartphone works well and I
can read the emails I am interested in on the move.

The process of configuring two instances of dovecot on the same machine
serving different views of the same mailbox was faily complex, so I
think it would be worth documenting the process in an FAQ or suchlike
for other users.

I thought a good place to write up my method would be in the HowTo
section of the Dovecot Wiki. Is that a good idea? Can I request an
account to edit the Wiki, or should I send a draft text to an editor?
Are there any Dovecot experts here who can review my methods and suggest
improvements?

-- David Pottage



Re: [Dovecot] How to serve a subset of IMAP folders for hand held devices.

2011-12-28 Thread Andraž 'ruskie' Levstik
:2011-12-28T10:26:David Pottage:

 I am currently running dovecot 1.2.15 on my home server. I have over 200
 folders in personal email account, and I have found that my smart-phone
 does not work well trying to display that many folders.
 
 I solved the problem by creating a second instance of dovecot running on
 a non standard port, and configured it to serve only a subset my email
 folders, so that way the email client on my smartphone works well and I
 can read the emails I am interested in on the move.

Here's a simple improvement.
Create a new email user and symlink just those folders you want to see
into it.

That way you don't need 2 instances just two different users and you use
one on mobile the other elsewhere ;)

Using virtual folders could be helpful as well. I have a New mails one
which shows me all new emails in all folders which helps in a lot of
places.

-- 
Andraž 'ruskie' Levstik
Source Mage GNU/Linux Games/Xorg grimoire guru
Re-Alpine Coordinator http://sourceforge.net/projects/re-alpine/
Geek/Hacker/Tinker

Knowledge is important, knowledge you know is priceless. Share the knowledge, 
build a better future for everyone.

Re: [Dovecot] How to serve a subset of IMAP folders for hand held devices.

2011-12-28 Thread David Pottage
On 28/12/11 10:39, Andraž 'ruskie' Levstik wrote:
 :2011-12-28T10:26:David Pottage:

 I solved the problem by creating a second instance of dovecot running on
 a non standard port, and configured it to serve only a subset my email
 folders, so that way the email client on my smartphone works well and I
 can read the emails I am interested in on the move.
 Here's a simple improvement.
 Create a new email user and symlink just those folders you want to see
 into it.
I considered that option but decided against it for two reasons.

Firstly I wanted to retain the option to switch to the full version of
my mail folders if I needed to access something urgently. My smart-phone
based email client allows me to change the port number of an existing
email account, but will not allow me to change the user-name without
creating a whole new account and re-downloading everything.

Secondly creating a second account makes the authentication on the
server a lot more complex. Either I need two OS level accounts on the
sever, and find ways to keep them in sync, or I need to create a custom
authentication method on dovecot or PAM so that when it receives a
user-name matching some pattern, it will check the password against a
different account.

In short, I think a second server with a separate configuration is more
scalable. I don't think it consumes much more resource compared with one
server.

 Using virtual folders could be helpful as well. I have a New mails one
 which shows me all new emails in all folders which helps in a lot of
 places.
Could you provide a link to documentation about virtual folders.

-- 
David Pottage



Re: [Dovecot] How to serve a subset of IMAP folders for hand held devices.

2011-12-28 Thread Stan Hoeppner
On 12/28/2011 4:05 PM, David Pottage wrote:

 Firstly I wanted to retain the option to switch to the full version of
 my mail folders if I needed to access something urgently. My smart-phone
 based email client allows me to change the port number of an existing
 email account, but will not allow me to change the user-name without
 creating a whole new account and re-downloading everything.
 
 Secondly creating a second account makes the authentication on the
 server a lot more complex. Either I need two OS level accounts on the
 sever, and find ways to keep them in sync, or I need to create a custom
 authentication method on dovecot or PAM so that when it receives a
 user-name matching some pattern, it will check the password against a
 different account.
 
 In short, I think a second server with a separate configuration is more
 scalable. I don't think it consumes much more resource compared with one
 server.

It's a smart phone.  Have you considering simply running a webmail server?

-- 
Stan


  1   2   3   >