Page MenuHomePhorge

[DRAFT] Direct IMAP backend
ClosedPublic

Authored by machniak on Aug 16 2022, 3:10 PM.
Tags
None
Referenced Files
F11584803: D3785.id11072.diff
Thu, Mar 28, 9:32 AM
Unknown Object (File)
Tue, Mar 12, 9:03 PM
Unknown Object (File)
Tue, Mar 12, 7:33 AM
Unknown Object (File)
Fri, Mar 1, 9:30 AM
Unknown Object (File)
Feb 20 2024, 11:41 AM
Unknown Object (File)
Feb 19 2024, 3:39 AM
Unknown Object (File)
Feb 15 2024, 4:12 AM
Unknown Object (File)
Jan 30 2024, 1:28 PM
Subscribers
Restricted Project

Details

Summary

Direct IMAP management - kolabd replacement

Test Plan

./phpunit

Diff Detail

Repository
rK kolab
Branch
dev/direct-imap-backend
Lint
Lint Skipped
Unit
No Test Coverage
Build Status
Buildable 40166
Build 16253: arc lint + arc unit

Event Timeline

machniak created this revision.
  • Fix test regressions
  • More tests and unification
  • Add more job:* commands
  • ACL handling
  • Merge branch 'master' into dev/direct-imap-backend
  • Remove Roundcube user record on user delete
  • Add an option to disable LDAP backend
mollekopf subscribed.

Optional IMAP backend, pass tests with imap backend disabled, fixed IMAP::verifyAccount.

verifyAccount does not throw an exception for me (perhaps because of the httpform auth I'm using).
I ran into issues with just listing all folders because some shared folders shared with anyone were still returned.
Just listing the INBOX also seems less fragile.

src/app/Backends/IMAP.php
439

We throw exceptions on imap errors because worker will handle this as a job failure and try again. If we just return false the job is not retried.

That being said... verifyAccount() (and VerifyJob) is not used anymore in this branch. With app.with_imap introduction we should call IMAP::verifyAccount() (not the job, the job could be removed later) from the CreateJob for "app.with_imap is disabled" case.

src/app/Jobs/SharedFolder/DeleteJob.php
32

This line was important to be there. If the exception below is thrown the status update wouldn't happen, and we don't want that.

src/app/Jobs/User/CreateJob.php
76

It should be app.with_imap here.

src/app/Backends/IMAP.php
439

verifyAccount is currently primarily used in the tests, so let's throw in the job if necessary I propose.
The src/app/Jobs/User/CreateJob.php also before didn't call verifyAccount, so I'm not sure where that should happen?

mollekopf unsubscribed.

Addressed 2 out of 3 comments

src/app/Backends/IMAP.php
439

It was invoked from the observer https://git.kolab.org/source/kolab/browse/master/src/app/Observers/UserObserver.php$69

With this whole refactor I propose to call IMAP::verifyAccount() from the CreateJob.

Call IMAP::verifyAccount from the create job

This revision is now accepted and ready to land.Oct 19 2022, 12:08 PM
This revision was landed with ongoing or failed builds.Oct 20 2022, 11:56 AM
Closed by commit rKbb9264e33104: Direct IMAP backend (authored by machniak, committed by mollekopf). · Explain Why
This revision was automatically updated to reflect the committed changes.