{"record":{"id":"2dfcd9a7bfbe1ed7","repo":"quarkusio/quarkus","slug":"the-from-header-must-always-be-included-to-the-l","errorCode":null,"errorMessage":"The \"From\" header must always be included to the list of headers to sign.","messagePattern":"The \"From\" header must always be included to the list of headers to sign\\.","errorType":"exception","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/mailer/runtime/src/main/java/io/quarkus/mailer/runtime/Mailers.java","lineNumber":221,"sourceCode":"            vertxDkimOptions\n                    .setHeaderCanonAlgo(CanonicalizationAlgorithm.valueOf(optionsConfig.headerCanonAlgo().get().toString()));\n        }\n\n        if (optionsConfig.privateKey().isPresent()) {\n            vertxDkimOptions.setPrivateKey(optionsConfig.privateKey().get());\n        } else if (optionsConfig.privateKeyPath().isPresent()) {\n            vertxDkimOptions.setPrivateKeyPath(optionsConfig.privateKeyPath().get());\n        }\n\n        if (optionsConfig.signatureTimestamp().isPresent()) {\n            vertxDkimOptions.setSignatureTimestamp(optionsConfig.signatureTimestamp().get());\n        }\n\n        if (optionsConfig.signedHeaders().isPresent()) {\n            List<String> headers = optionsConfig.signedHeaders().get();\n\n            if (headers.stream().noneMatch(header -> header.equalsIgnoreCase(\"from\"))) {\n                throw new ConfigurationException(\n                        \"The \\\"From\\\" header must always be included to the list of headers to sign.\");\n            }\n\n            vertxDkimOptions.setSignedHeaders(headers);\n        }\n\n        return vertxDkimOptions;\n    }\n\n    private io.vertx.ext.mail.MailConfig toVertxMailConfig(String name, MailerRuntimeConfig config,\n            TlsConfigurationRegistry tlsRegistry) {\n        io.vertx.ext.mail.MailConfig cfg = new io.vertx.ext.mail.MailConfig();\n        if (config.authMethods().isPresent()) {\n            cfg.setAuthMethods(config.authMethods().get());\n        }\n        cfg.setDisableEsmtp(config.disableEsmtp());\n        cfg.setHostname(config.host());\n        cfg.setKeepAlive(config.keepAlive());","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/mailer/runtime/src/main/java/io/quarkus/mailer/runtime/Mailers.java#L203-L239","documentation":"DKIM signing of a chosen header list must always include the From header per DKIM semantics. If dkim.signed-headers is provided and none of its entries equals \"from\" (case-insensitively), Mailers rejects the configuration with this ConfigurationException.","triggerScenarios":"Configuring quarkus.mailer.dkim.signed-headers as a list that omits From, e.g. signed-headers=to,subject,date, when the mailer config is built.","commonSituations":"Copying a signed-headers list from another provider's docs that excludes From; splitting headers incorrectly so \"From\" ends up outside the list; tooling generating headers alphabetically and dropping From.","solutions":["Add \"from\" to the signed-headers list, e.g. quarkus.mailer.dkim.signed-headers=from,to,subject,date.","Check casing/whitespace of entries — the comparison is case-insensitive but the value must still literally contain \"from\".","If unsure which headers to sign, remove dkim.signed-headers and let the library/Vert.x use defaults."],"exampleFix":"// before\nquarkus.mailer.dkim.signed-headers=to,subject,date\n\n// after\nquarkus.mailer.dkim.signed-headers=from,to,subject,date","handlingStrategy":"validation","validationCode":"List<String> signedHeaders = List.of(\"to\", \"subject\", \"date\"); // from config\nif (signedHeaders.stream().noneMatch(h -> h.equalsIgnoreCase(\"from\"))) {\n    throw new IllegalStateException(\"dkim.signed-headers must include 'from'\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    mailer.send(mail).await().indefinitely();\n} catch (ConfigurationException e) {\n    if (e.getMessage().contains(\"From\\\" header\")) {\n        LOG.error(\"Add 'from' to quarkus.mailer.dkim.signed-headers\", e);\n    }\n    throw e;\n}","preventionTips":["Use the canonical list from,to,subject,date for signed-headers","Add a unit test asserting the configured header list contains 'from'","Avoid hand-editing the header list without re-checking DKIM docs"],"tags":["quarkus","mailer","dkim","configuration","email-headers"],"backgroundTag":"invalid-config-value","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}