Page MenuHomekolab.org

Create default folders in imap
ClosedPublic

Authored by mollekopf on Jan 31 2023, 2:53 PM.

Diff Detail

Repository
rK kolab
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mollekopf requested review of this revision.Jan 31 2023, 2:53 PM
mollekopf created this revision.
mollekopf updated this revision to Diff 11536.Jan 31 2023, 4:46 PM

Create the folders authenticated as user so we can subscribe and set private metadata

mollekopf added a reviewer: Restricted Project.Jan 31 2023, 4:47 PM
mollekopf updated this revision to Diff 11542.Jan 31 2023, 7:49 PM

Cleanup, also crate default folders if the inbox already exists (maybe autocreated by cyrus-imap?).

Regarding the configuration; I don't think it makes sense to attempt to stuff this into the environment, so I would rely on the overlay config mechanism and add the imap.php config file to the overlays where we want to change that configuration.

mollekopf updated this revision to Diff 11554.Feb 1 2023, 10:31 AM

Make it possible to completely disable the default folders mechanism

Harbormaster completed remote builds in B41380: Diff 11536.
Harbormaster completed remote builds in B41383: Diff 11542.
Harbormaster completed remote builds in B41395: Diff 11554.
machniak requested changes to this revision.Feb 6 2023, 3:35 PM
machniak added a subscriber: machniak.

The default set of folders will not make always sense. How do you disable the feature, or redefine the set? Replacing the while imap.php file is not the best option.

src/app/Backends/IMAP.php
470

I'd remove that info() call.

538

Missing parameters.

540

@return without s.

550

"Failed to create mailbox Trash" might not be very helpful in log if there's no context. I'd remove this error() call. Exception should get logged with some context.

This revision now requires changes to proceed.Feb 6 2023, 3:35 PM

By default, you should also create the Archive folder.

Currently, it's only created when you attempt to Archive a folder in the webclient.

mollekopf updated this revision to Diff 11617.Feb 10 2023, 12:30 PM
mollekopf marked 3 inline comments as done.

Fixed comments

machniak requested changes to this revision.Mon, Feb 27, 3:02 PM

We either use the same set of default folders as in https://git.kolab.org/diffusion/P/browse/master/conf/kolab.conf$65 or make the list empty by default.

This revision now requires changes to proceed.Mon, Feb 27, 3:02 PM
This revision was not accepted when it landed; it landed in state Needs Revision.Sat, Mar 4, 3:31 PM
Closed by commit rKd16279cce742: Create default folders in imap (authored by Christian Mollekopf <mollekopf@apheleia-it.ch>). · Explain Why
This revision was automatically updated to reflect the committed changes.