quarkusio/quarkus · error · ConfigurationException
Must provide the selector.
Error message
Must provide the selector.
What it means
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.
Source
Thrown at extensions/mailer/runtime/src/main/java/io/quarkus/mailer/runtime/Mailers.java:179
try {
return CredentialsProviderFinder.find(beanName);
} catch (Exception e) {
throw new ConfigurationException("Unable to find credentials provider for the mailer " + mailerName + ".", e);
}
}
private io.vertx.ext.mail.DKIMSignOptions toVertxDkimSignOptions(DkimSignOptionsConfig optionsConfig) {
DKIMSignOptions vertxDkimOptions = new io.vertx.ext.mail.DKIMSignOptions();
String sdid = optionsConfig.sdid()
.orElseThrow(() -> {
throw new ConfigurationException("Must provide the Signing Domain Identifier (sdid).");
});
vertxDkimOptions.setSdid(sdid);
String selector = optionsConfig.selector()
.orElseThrow(() -> {
throw new ConfigurationException("Must provide the selector.");
});
vertxDkimOptions.setSelector(selector);
if (optionsConfig.auid().isPresent()) {
vertxDkimOptions.setAuid(optionsConfig.auid().get());
}
if (optionsConfig.bodyLimit().isPresent()) {
int bodyLimit = optionsConfig.bodyLimit().getAsInt();
vertxDkimOptions.setBodyLimit(bodyLimit);
}
if (optionsConfig.expireTime().isPresent()) {
long expireTime = optionsConfig.expireTime().getAsLong();
vertxDkimOptions.setExpireTime(expireTime);
}
if (optionsConfig.bodyCanonAlgo().isPresent()) {View on GitHub (pinned to e1c734241f)
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.
Example fix
// before quarkus.mailer.dkim.sdid=example.com quarkus.mailer.dkim.private-key=classpath:dkim.pem // after quarkus.mailer.dkim.sdid=example.com quarkus.mailer.dkim.selector=mail quarkus.mailer.dkim.private-key=classpath:dkim.pem
Defensive patterns
Strategy: validation
Validate before calling
if (ConfigProvider.getConfig().getOptionalValue("quarkus.mailer.dkim.sdid", String.class).isPresent()
&& ConfigProvider.getConfig().getOptionalValue("quarkus.mailer.dkim.selector", String.class).isEmpty()) {
throw new IllegalStateException("dkim configured but quarkus.mailer.dkim.selector is missing");
} Try / catch
try {
mailer.send(mail).await().indefinitely();
} catch (ConfigurationException e) {
if (e.getMessage().contains("selector")) {
LOG.error("Set quarkus.mailer.dkim.selector to match <selector>._domainkey.<sdid>", e);
}
throw e;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Must provide the Signing Domain Identifier (sdid).
- Unable to find credentials provider for the mailer {{mailerN
- The "From" header must always be included to the list of hea
- Unable to find the TLS configuration {{name}} for the mailer
- Unable to find top command. Ensure you have a @CommandDefini
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/182286817e4cb18f.
Report an issue: GitHub.