Ignore specific subfolders within Maildir?
Consider Dovecot with "mail_location = maildir:~/.maildir".
Is it possible to configure Dovecot to completely ignore directories like ~/.maildir/.foo ? The subdirectory .foo is created by third party software and the name cannot be changed. Because of the leading dot, Dovecot interprets ~/.maildir/.foo as IMAP folder /foo by default, creates the typical subdirectory structure with cur/new/tmp, and exposes ~/.maildir/.foo to IMAP clients.
Not being able to change the name or location of .foo, I would like to tell Dovecot to ignore .foo's presence altogether. So far I have not found documentation about how that can be done (or if it can). Helpful pointers are appreciated.
-Ralph
how about to chown of
~/.maildir/.foo
to an other user than defined as mail_uid / mail_gid in dovecot's config? So dovecot should not "see" this folders. Additional you have to edit in each users mail locations root the subscriptions file and remove the line, pointing to ~/.maildir/.foo
Frank
Am 25.10.2024 um 00:29 schrieb Ralph Seichter via dovecot:
Consider Dovecot with "mail_location = maildir:~/.maildir".
Is it possible to configure Dovecot to completely ignore directories like ~/.maildir/.foo ? The subdirectory .foo is created by third party software and the name cannot be changed. Because of the leading dot, Dovecot interprets ~/.maildir/.foo as IMAP folder /foo by default, creates the typical subdirectory structure with cur/new/tmp, and exposes ~/.maildir/.foo to IMAP clients.
Not being able to change the name or location of .foo, I would like to tell Dovecot to ignore .foo's presence altogether. So far I have not found documentation about how that can be done (or if it can). Helpful pointers are appreciated.
-Ralph
dovecot mailing list --dovecot@dovecot.org To unsubscribe send an email todovecot-leave@dovecot.org
- Frank Kirschner via dovecot:
how about to chown of ~/.maildir/.foo to an other user than defined as mail_uid / mail_gid in dovecot's config?
Directory .foo needs to have the same owner as the parent ~/.maildir . Like the name and location of .foo, this is a restriction imposed by the third party software which creates .foo.
Additional you have to edit in each users mail locations root the subscriptions file and remove the line, pointing to ~/.maildir/.foo
Foo is not mentioned in the subscriptions list, but macOS and iOS MUAs don't care about user subscriptions anyway. Also, in Thunderbird, foo will be listed as one of the folders a user can subscribe to, and nothing is preventing that (or worse, the deletion of foo).
-Ralph
maybe working with hidden namespace:
namespace hidden { prefix = .foo/ separator = / hidden = yes list = no }
plugin { imap_hidden_namespaces = .hidden/* }
Frank
Am 25.10.2024 um 13:18 schrieb Ralph Seichter via dovecot:
- Frank Kirschner via dovecot:
how about to chown of ~/.maildir/.foo to an other user than defined as mail_uid / mail_gid in dovecot's config? Directory .foo needs to have the same owner as the parent ~/.maildir . Like the name and location of .foo, this is a restriction imposed by the third party software which creates .foo.
Additional you have to edit in each users mail locations root the subscriptions file and remove the line, pointing to ~/.maildir/.foo Foo is not mentioned in the subscriptions list, but macOS and iOS MUAs don't care about user subscriptions anyway. Also, in Thunderbird, foo will be listed as one of the folders a user can subscribe to, and nothing is preventing that (or worse, the deletion of foo).
-Ralph
dovecot mailing list --dovecot@dovecot.org To unsubscribe send an email todovecot-leave@dovecot.org
How about just using
LAYOUT=fs
Then Dovecot will not consider .folders are mail folders at all? This does require mailbox format change though.
Frank, I don't think Dovecot has "imap_hidden_namespaces" setting at all, unless it's some 3rd party plugin.
Aki
On 25/10/2024 14:30 EEST Frank Kirschner via dovecot <dovecot@dovecot.org> wrote:
maybe working with hidden namespace:
namespace hidden { prefix = .foo/ separator = / hidden = yes list = no }
plugin { imap_hidden_namespaces = .hidden/* }
Frank
Am 25.10.2024 um 13:18 schrieb Ralph Seichter via dovecot:
- Frank Kirschner via dovecot:
how about to chown of ~/.maildir/.foo to an other user than defined as mail_uid / mail_gid in dovecot's config? Directory .foo needs to have the same owner as the parent ~/.maildir . Like the name and location of .foo, this is a restriction imposed by the third party software which creates .foo.
Additional you have to edit in each users mail locations root the subscriptions file and remove the line, pointing to ~/.maildir/.foo Foo is not mentioned in the subscriptions list, but macOS and iOS MUAs don't care about user subscriptions anyway. Also, in Thunderbird, foo will be listed as one of the folders a user can subscribe to, and nothing is preventing that (or worse, the deletion of foo).
-Ralph
dovecot mailing list --dovecot@dovecot.org To unsubscribe send an email todovecot-leave@dovecot.org
dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org
- Aki Tuomi via dovecot:
How about just using LAYOUT=fs Then Dovecot will not consider .folders are mail folders at all? This does require mailbox format change though.
Interesting idea. I don't want to meddle with the mailbox format though. That seems excessive, and counters my decision to use Maildir instead of one of the more modern storage formats supported by Dovecot. Maildir is understood by a wide range of applications, including the one which is giving me grief at the moment.
-Ralph
On 25/10/2024 17:43 EEST Ralph Seichter via dovecot <dovecot@dovecot.org> wrote: * Aki Tuomi via dovecot: How about just using LAYOUT=fs Then Dovecot will not consider .folders are mail folders at all? This does require mailbox format change though. Interesting idea. I don't want to meddle with the mailbox format though. That seems excessive, and counters my decision to use Maildir instead of one of the more modern storage formats supported by Dovecot. Maildir is understood by a wide range of applications, including the one which is giving me grief at the moment. -Ralph _______________________________________________ dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-leave@dovecot.org Just for clarity I ment Maildir format with FS layout. Maildir++ layout is what you are using now. It just usually is easier to do "mailbox format conversion" than manually moving things around. Aki
- Aki Tuomi via dovecot:
Just for clarity I ment Maildir format with FS layout. Maildir++ layout is what you are using now.
Thanks for clarifying.
The whole situation is uncomfortable. Dovecot is right to expect Maildir folders to adhere to a certain structure and naming conventions, and if some third party application uses directory names which clash with these conventions, that is certainly not Dovecot's fault. It would just be helpful if one could specify
ignore_path_regex = \.foo$
or similar, and have Dovecot look the other way.
-Ralph
participants (3)
-
Aki Tuomi
-
Frank Kirschner
-
Ralph Seichter