fix(developers): configure Mailcow API key and fix password2 field
All checks were successful
Build and Deploy / deploy (push) Successful in 18s
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:
@@ -108,13 +108,14 @@ public class ProvisioningService
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var client = _httpClientFactory.CreateClient("Mailcow");
|
var client = _httpClientFactory.CreateClient("Mailcow");
|
||||||
|
var tempPassword = Guid.NewGuid().ToString("N")[..16] + "!A1";
|
||||||
var payload = new
|
var payload = new
|
||||||
{
|
{
|
||||||
local_part = username,
|
local_part = username,
|
||||||
domain = "silverlabs.uk",
|
domain = "silverlabs.uk",
|
||||||
name = fullName,
|
name = fullName,
|
||||||
password = Guid.NewGuid().ToString("N")[..16] + "!A1", // Temporary password
|
password = tempPassword,
|
||||||
password2 = "",
|
password2 = tempPassword,
|
||||||
quota = 1024, // 1GB
|
quota = 1024, // 1GB
|
||||||
active = 1,
|
active = 1,
|
||||||
force_pw_update = 1
|
force_pw_update = 1
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
},
|
},
|
||||||
"Mailcow": {
|
"Mailcow": {
|
||||||
"BaseUrl": "https://mail.silverlined.uk",
|
"BaseUrl": "https://mail.silverlined.uk",
|
||||||
"ApiKey": ""
|
"ApiKey": "2A21AA-47E4E5-46DD62-A650F0-BC7566"
|
||||||
},
|
},
|
||||||
"AdminApiKey": "aawb2MHblbfmqdhcS7Xp2/ibQOUbUE1BDoqdJOu0bjM="
|
"AdminApiKey": "aawb2MHblbfmqdhcS7Xp2/ibQOUbUE1BDoqdJOu0bjM="
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user