nextcloud / nextcloud/mail

Give ability to configure provision from occ command

Open
#10,356 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement
Dominant language
JavaScript
Stars
1k
Forks
348
Avg merge
12h 28m
Merged PRs (30d)
91

Description

Is your feature request related to a problem? Please describe.

I try to setup a docker-compose instance of nextcloud based on official image using post-installation scripts.
for the moment everything (core / ldap / contact / calendar) is done except mail provisioning.
there is no easy way to setup provisioning from occ command.

Describe the solution you'd like

like ldap, permit to populate provision table with following commands :

  • occ ldap:create-empty-config
  • occ ldap:set-config <created config id> <param> <value>

which could become for mail :

  • occ mail:provisioning:empty-create (output is created id of oc_mail_provisionings)
  • occ mail:provisioning:set <id> <param> <value>
  • example :
    • occ mail:provisioning:empty-create
      (example return "2" on stdout)
    • occ mail:provisioning:set 2 provisioning_domain domain.tld
    • occ mail:provisioning:set 2 email_template %EMAIL%
    • occ mail:provisioning:set 2 imap_user %EMAIL%
    • occ mail:provisioning:set 2 imap_host imap.domain.tld
Describe alternatives you've considered

I build an instance with cron and add mariadb client to insert configuration I need.
But this is a bad solution to add tools in instance just for initial setup.

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the existing occ ldap:create-empty-config and occ ldap:set-config commands with the requested mail:provisioning:empty-create and mail:provisioning:set commands. Check how the oc_mail_provisionings table is populated and how provisioning_domain, email_template, imap_user, and imap_host are represented. Done means mail provisioning can be created and configured through occ without a separate database client.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, php
Domain
backend, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.