Skip to content

Commit 8c5effd

Browse files
feat: jmap support - initial
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
1 parent 95442ad commit 8c5effd

27 files changed

Lines changed: 1745 additions & 147 deletions

.github/workflows/test.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ permissions:
77
contents: read
88

99
env:
10-
E2E_NODE_VERSION: "20" # TODO: Extract automatically using another action
10+
E2E_NODE_VERSION: "20"
11+
STALWART_PWD: "secretpassword"
1112

1213
jobs:
1314
unit-tests:
@@ -94,7 +95,7 @@ jobs:
9495
cache: 'redis'
9596
name: ${{ matrix.nextcloud-versions }} w/ php${{ matrix.php-versions }}-${{ matrix.db }}-${{ matrix.cache }} integration tests ${{ matrix.coverage && '(coverage)' || ''}}
9697
services:
97-
mail-service:
98+
mail-dovecot-service:
9899
image: ghcr.io/christophwurst/docker-imap-devel:latest
99100
env:
100101
MAILNAME: mail.domain.tld
@@ -105,6 +106,15 @@ jobs:
105106
- 143:143
106107
- 993:993
107108
- 4190:4190
109+
mail-stalwart-service:
110+
image: stalwartlabs/stalwart:v0.15.5
111+
env:
112+
STALWART_ADMIN_PASSWORD: ${{ env.STALWART_PWD }}
113+
ports:
114+
- 10080:8080
115+
- 10025:25
116+
- 10143:143
117+
- 10993:993
108118
mariadb-service:
109119
image: ghcr.io/nextcloud/continuous-integration-mariadb-11.4:latest
110120
env:
@@ -142,6 +152,16 @@ jobs:
142152
ports:
143153
- 6379:6379
144154
steps:
155+
- name: Create domain and account in Stalwart
156+
run: |
157+
curl -sf -X POST http://localhost:10080/api/principal \
158+
-u "admin:${{ env.STALWART_PWD }}" \
159+
-H 'Content-Type: application/json' \
160+
-d '{"type":"domain","name":"example.com"}'
161+
curl -sf -X POST http://localhost:10080/api/principal \
162+
-u "admin:${{ env.STALWART_PWD }}" \
163+
-H 'Content-Type: application/json' \
164+
-d '{"type":"individual","name":"user@example.com","secrets":["mypassword"],"emails":["user@example.com"],"roles":["user"]}'
145165
- name: Set up Nextcloud env
146166
uses: nextcloud/setup-server-action@34b73d5b0e3633f83a52227d00cc2a6c41d01d9a # v1.0.0
147167
with:

appinfo/info.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The rating depends on the installed text processing backend. See [the rating ove
3434
3535
Learn more about the Nextcloud Ethical AI Rating [in our blog](https://nextcloud.com/blog/nextcloud-ethical-ai-rating/).
3636
]]></description>
37-
<version>5.8.0-dev.2</version>
37+
<version>5.8.0-dev.3</version>
3838
<licence>agpl</licence>
3939
<author homepage="https://github.com/ChristophWurst">Christoph Wurst</author>
4040
<author homepage="https://github.com/GretaD">GretaD</author>
@@ -79,14 +79,15 @@ Learn more about the Nextcloud Ethical AI Rating [in our blog](https://nextcloud
7979
<commands>
8080
<command>OCA\Mail\Command\AddMissingTags</command>
8181
<command>OCA\Mail\Command\CleanUp</command>
82-
<command>OCA\Mail\Command\CreateAccount</command>
82+
<command>OCA\Mail\Command\CreateImapAccount</command>
83+
<command>OCA\Mail\Command\CreateJmapAccount</command>
8384
<command>OCA\Mail\Command\CreateTagMigrationJobEntry</command>
8485
<command>OCA\Mail\Command\DebugAccount</command>
8586
<command>OCA\Mail\Command\DeleteAccount</command>
86-
<command>OCA\Mail\Command\DiagnoseAccount</command>
8787
<command>OCA\Mail\Command\ExportAccount</command>
8888
<command>OCA\Mail\Command\ExportAccountThreads</command>
8989
<command>OCA\Mail\Command\PredictImportance</command>
90+
<command>OCA\Mail\Command\TestAccount</command>
9091
<command>OCA\Mail\Command\SyncAccount</command>
9192
<command>OCA\Mail\Command\Thread</command>
9293
<command>OCA\Mail\Command\TrainAccount</command>

composer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
"optimize-autoloader": true,
1212
"autoloader-suffix": "Mail"
1313
},
14+
"repositories": [
15+
{
16+
"type": "vcs",
17+
"url": "https://github.com/sebastiankrupinski/jmap-client-php"
18+
}
19+
],
1420
"require": {
1521
"php": ">=8.1 <=8.4",
1622
"ext-openssl": "*",
@@ -43,6 +49,7 @@
4349
"psr/log": "^3.0.2",
4450
"rubix/ml": "2.5.3",
4551
"sabberworm/php-css-parser": "^8.9.0",
52+
"sebastiankrupinski/jmap-client-php": "dev-main",
4653
"wamania/php-stemmer": "4.0 as 3.0",
4754
"youthweb/urllinker": "^2.1.0"
4855
},

0 commit comments

Comments
 (0)