mailcow / mailcow-dockerized

mailcow: dockerized - 🐮 + 🐋 = 💕
https://mailcow.email
GNU General Public License v3.0
8.64k stars 1.16k forks source link

Set recovery_email while Creating a mailbox via API #6072

Open mostafa0017 opened 1 week ago

mostafa0017 commented 1 week ago

Summary

Currently, If I sent a get request to get a mailbox I receive:

[
    {
        "username": "test@example.com",
        "active": 1,
        "active_int": 1,
        "domain": "example.com",
        "name": "Joe Doe",
        "local_part": "test",
        "quota": 0,
        "messages": 31,
        "attributes": {
            "force_pw_update": "0",
            "tls_enforce_in": "1",
            "tls_enforce_out": "1",
            "sogo_access": "0",
            "imap_access": "1",
            "pop3_access": "1",
            "smtp_access": "1",
            "sieve_access": "1",
            "relayhost": "0",
            "passwd_update": "2024-09-03 15:31:39",
            "mailbox_format": "maildir:",
            "quarantine_notification": "hourly",
            "quarantine_category": "reject",
            "recovery_email": "recovery@fortest.com"
        },
        "custom_attributes": [],
        "quota_used": 121623,
        "percent_in_use": "- ",
        "created": "2024-09-01 12:56:24",
        "modified": "2024-09-05 14:19:00",
        "percent_class": "info",
        "last_imap_login": 1725969402,
        "last_smtp_login": 1725959252,
        "last_pop3_login": 0,
        "max_new_quota": 9269411840,
        "spam_aliases": 0,
        "pushover_active": 0,
        "rl": false,
        "rl_scope": "domain",
        "is_relayed": 0,
        "tags": [
            "Staff"
        ]
    }
]

So I wanted to use recovery_email in a POST request to create a mailbox, but sadly this value is ignored if I tried and a mailbox gets created without it.

Motivation

It would benefit all the API users by adding another value to be set while creating a mailbox.

Additional context

No response

DerLinkman commented 1 week ago

Is there no endpoint in the API @FreddleSpl0it?