fix(developers): configure Mailcow API key and fix password2 field
All checks were successful
Build and Deploy / deploy (push) Successful in 18s

Add the Mailcow read/write API key so mailbox provisioning actually
authenticates. Also set password2 to match password as required by
the Mailcow API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-22 00:49:36 +00:00
parent 587467321d
commit 008ca7f65d
2 changed files with 4 additions and 3 deletions

View File

@@ -108,13 +108,14 @@ public class ProvisioningService
try
{
var client = _httpClientFactory.CreateClient("Mailcow");
var tempPassword = Guid.NewGuid().ToString("N")[..16] + "!A1";
var payload = new
{
local_part = username,
domain = "silverlabs.uk",
name = fullName,
password = Guid.NewGuid().ToString("N")[..16] + "!A1", // Temporary password
password2 = "",
password = tempPassword,
password2 = tempPassword,
quota = 1024, // 1GB
active = 1,
force_pw_update = 1

View File

@@ -16,7 +16,7 @@
},
"Mailcow": {
"BaseUrl": "https://mail.silverlined.uk",
"ApiKey": ""
"ApiKey": "2A21AA-47E4E5-46DD62-A650F0-BC7566"
},
"AdminApiKey": "aawb2MHblbfmqdhcS7Xp2/ibQOUbUE1BDoqdJOu0bjM="
}