{"record":{"id":"3ac5e152ae0c36bd","repo":"jstedfast/MailKit","slug":"the-imap-server-does-not-support-the-acl-extension","errorCode":null,"errorMessage":"The IMAP server does not support the ACL extension.","messagePattern":"The IMAP server does not support the ACL extension\\.","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"MailKit/Net/Imap/ImapFolder.cs","lineNumber":2322,"sourceCode":"\n\t\t\t\ttoken = await engine.PeekTokenAsync (ic.CancellationToken).ConfigureAwait (false);\n\t\t\t} while (token.Type != ImapTokenType.Eoln);\n\t\t}\n\n\t\tstatic Task UntaggedAclHandler (ImapEngine engine, ImapCommand ic, int index, bool doAsync)\n\t\t{\n\t\t\tif (doAsync)\n\t\t\t\treturn ParseAclAsync (engine, ic);\n\n\t\t\tParseAcl (engine, ic);\n\n\t\t\treturn Task.CompletedTask;\n\t\t}\n\n\t\tImapCommand QueueGetAccessControlListCommand (CancellationToken cancellationToken)\n\t\t{\n\t\t\tif ((Engine.Capabilities & ImapCapabilities.Acl) == 0)\n\t\t\t\tthrow new NotSupportedException (\"The IMAP server does not support the ACL extension.\");\n\n\t\t\tCheckState (false, false);\n\n\t\t\tvar ic = new ImapCommand (Engine, cancellationToken, null, \"GETACL %F\\r\\n\", this);\n\t\t\tic.RegisterUntaggedHandler (\"ACL\", UntaggedAclHandler);\n\t\t\tic.UserData = new AccessControlList ();\n\n\t\t\tEngine.QueueCommand (ic);\n\n\t\t\treturn ic;\n\t\t}\n\n\t\tAccessControlList ProcessGetAccessControlListResponse (ImapCommand ic)\n\t\t{\n\t\t\tProcessResponseCodes (ic, null);\n\n\t\t\tic.ThrowIfNotOk (\"GETACL\");\n","sourceCodeStart":2304,"sourceCodeEnd":2340,"githubUrl":"https://github.com/jstedfast/MailKit/blob/9d3859a7855e3e17582c07fd01972b8e262bf176/MailKit/Net/Imap/ImapFolder.cs#L2304-L2340","documentation":"NotSupportedException thrown by QueueGetAccessControlListCommand when the server does not advertise the ACL extension (RFC 4314). GETACL is therefore unavailable, so GetAccessControlListAsync cannot be performed.","triggerScenarios":"Calling folder.GetAccessControlListAsync() on a server whose ImapCapabilities lacks ImapCapabilities.Acl.","commonSituations":"Many mainstream IMAP servers (e.g. some default Exchange/Outlook.com, Gmail via certain frontends) do not expose IMAP ACL; using a shared-mailbox ACL API against a personal account.","solutions":["Check (client.Capabilities & ImapCapabilities.Acl) before calling ACL APIs","Manage permissions through the server's native admin interface (e.g. Exchange admin center, Gmail delegation settings) instead","Choose/enable an IMAP server with RFC 4314 ACL support (Dovecot, Cyrus) if ACL via IMAP is required","Fallback: handle NotSupportedException gracefully and surface 'permissions not manageable over IMAP' to users"],"exampleFix":"// before\nvar acl = await folder.GetAccessControlListAsync();\n// after\nif ((client.Capabilities & ImapCapabilities.Acl) != 0) {\n    var acl = await folder.GetAccessControlListAsync();\n} else {\n    // manage permissions out-of-band\n}","handlingStrategy":"validation","validationCode":"if ((client.Capabilities & ImapCapabilities.Acl) == 0)\n    return null; // ACL not available on this server","typeGuard":"bool SupportsAcl(IMapClient c) => (c.Capabilities & ImapCapabilities.Acl) != 0;","tryCatchPattern":"try {\n    acl = await folder.GetAccessControlListAsync();\n} catch (NotSupportedException) {\n    acl = null; // handle out-of-band\n}","preventionTips":["Feature-gate ACL UI behind the Acl capability flag","Know your target servers' extension support before coding ACL features","Manage permissions via server admin tooling when IMAP ACL is absent","Centralize capability checks in helper methods"],"tags":["imap","acl","not-supported","capability"],"backgroundTag":"unsupported-operation","analyzedSha":"9d3859a7855e3e17582c07fd01972b8e262bf176","analyzedAt":"2026-09-15T15:46:11.592Z","contentChangedAt":"2026-09-15T15:46:11.592Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}