{"record":{"id":"182286817e4cb18f","repo":"quarkusio/quarkus","slug":"must-provide-the-selector","errorCode":null,"errorMessage":"Must provide the selector.","messagePattern":"Must provide the selector\\.","errorType":"exception","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/mailer/runtime/src/main/java/io/quarkus/mailer/runtime/Mailers.java","lineNumber":179,"sourceCode":"        try {\n            return CredentialsProviderFinder.find(beanName);\n        } catch (Exception e) {\n            throw new ConfigurationException(\"Unable to find credentials provider for the mailer \" + mailerName + \".\", e);\n        }\n    }\n\n    private io.vertx.ext.mail.DKIMSignOptions toVertxDkimSignOptions(DkimSignOptionsConfig optionsConfig) {\n        DKIMSignOptions vertxDkimOptions = new io.vertx.ext.mail.DKIMSignOptions();\n\n        String sdid = optionsConfig.sdid()\n                .orElseThrow(() -> {\n                    throw new ConfigurationException(\"Must provide the Signing Domain Identifier (sdid).\");\n                });\n        vertxDkimOptions.setSdid(sdid);\n\n        String selector = optionsConfig.selector()\n                .orElseThrow(() -> {\n                    throw new ConfigurationException(\"Must provide the selector.\");\n                });\n        vertxDkimOptions.setSelector(selector);\n\n        if (optionsConfig.auid().isPresent()) {\n            vertxDkimOptions.setAuid(optionsConfig.auid().get());\n        }\n\n        if (optionsConfig.bodyLimit().isPresent()) {\n            int bodyLimit = optionsConfig.bodyLimit().getAsInt();\n            vertxDkimOptions.setBodyLimit(bodyLimit);\n        }\n\n        if (optionsConfig.expireTime().isPresent()) {\n            long expireTime = optionsConfig.expireTime().getAsLong();\n            vertxDkimOptions.setExpireTime(expireTime);\n        }\n\n        if (optionsConfig.bodyCanonAlgo().isPresent()) {","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/mailer/runtime/src/main/java/io/quarkus/mailer/runtime/Mailers.java#L161-L197","documentation":"Along with sdid, DKIM requires a selector that names the key record (selector._domainkey.<sdid>). toVertxDkimSignOptions throws this ConfigurationException when dkim.selector is missing from the mailer configuration.","triggerScenarios":"Any dkim.* property is configured but quarkus.mailer.dkim.selector (or the named-mailer equivalent) is absent when the mailer config is converted to Vert.x options.","commonSituations":"Setting only sdid and the private key; mistyping the property name (e.g. dkim.selectors); environment-specific config files where one profile omits the selector.","solutions":["Add quarkus.mailer.dkim.selector=<selector> matching the DNS TXT record at <selector>._domainkey.<sdid>.","If DKIM is not intended, remove all quarkus.mailer.dkim.* properties.","Audit all profiles (dev/test/prod) so every environment supplies both sdid and selector."],"exampleFix":"// before\nquarkus.mailer.dkim.sdid=example.com\nquarkus.mailer.dkim.private-key=classpath:dkim.pem\n\n// after\nquarkus.mailer.dkim.sdid=example.com\nquarkus.mailer.dkim.selector=mail\nquarkus.mailer.dkim.private-key=classpath:dkim.pem","handlingStrategy":"validation","validationCode":"if (ConfigProvider.getConfig().getOptionalValue(\"quarkus.mailer.dkim.sdid\", String.class).isPresent()\n        && ConfigProvider.getConfig().getOptionalValue(\"quarkus.mailer.dkim.selector\", String.class).isEmpty()) {\n    throw new IllegalStateException(\"dkim configured but quarkus.mailer.dkim.selector is missing\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    mailer.send(mail).await().indefinitely();\n} catch (ConfigurationException e) {\n    if (e.getMessage().contains(\"selector\")) {\n        LOG.error(\"Set quarkus.mailer.dkim.selector to match <selector>._domainkey.<sdid>\", e);\n    }\n    throw e;\n}","preventionTips":["Pair sdid+selector in every environment's config file","Name the selector after the DNS TXT record you publish","Run a config audit test that loads all profiles"],"tags":["quarkus","mailer","dkim","configuration","startup"],"backgroundTag":"missing-required-config-property","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-15T02:17:10.978Z"}