This commit is contained in:
2026-07-15 11:25:21 +07:00
parent e846e2f963
commit ccd8e8eb1b
3 changed files with 20 additions and 1 deletions
+9
View File
@@ -265,6 +265,15 @@ func handleImport(w http.ResponseWriter, r *http.Request) {
"force_pw_update": force,
"tls_enforce_in": "0",
"tls_enforce_out": "0",
// Явно открываем протоколы доступа, а не полагаемся на серверные
// $MAILBOX_DEFAULT_ATTRIBUTES: если админ инстанса переопределил их
// в 0, ящик создаётся «успешно», но логин по IMAP/SMTP не проходит
// (выглядит как «пароль не подходит»). UI mailcow эти галки включает.
"imap_access": "1",
"pop3_access": "1",
"smtp_access": "1",
"sieve_access": "1",
"sogo_access": "1",
}
ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
code, body, err := mcDo(ctx, base, key, "POST", "/api/v1/add/mailbox", payload)