theonedev/onedev · error · ExplicitException
No account found with verified email address:
Error message
No account found with verified email address:
What it means
OneDev's inbound mail handler processes reply-to emails by matching the sender's address to a OneDev account. When the 'from' address does not correspond to any account that has that email address marked as verified, an ExplicitException is thrown so the mail is rejected with a clear reason instead of being silently attributed to the wrong user.
Source
Thrown at server-core/src/main/java/io/onedev/server/mail/DefaultMailService.java:557
String template = StringUtils.join(settingService.getEmailTemplates().getPullRequestNotificationUnsubscribed(), "\n");
Map<String, Object> bindings = new HashMap<>();
bindings.put("pullRequest", involvedPullRequest);
String htmlBody = EmailTemplates.evalTemplate(true, template, bindings);
String textBody = EmailTemplates.evalTemplate(false, template, bindings);
var threadingReferences = getThreadingReferences(UUID.randomUUID().toString(), getMessageId(message));
sendMailAsync(newArrayList(fromInternetAddress.getAddress()), newArrayList(), newArrayList(),
subject, htmlBody, textBody, null, null, threadingReferences);
} else {
if (!SecurityUtils.canReadCode(involvedPullRequest.getProject())) {
addComment(involvedPullRequest, message, fromInternetAddress, fromUser, receiverInternetAddresses);
} else {
throw new UnauthorizedException("Code read permission required for project: %s"
+ involvedPullRequest.getProject().getPath());
}
}
} else {
throw new ExplicitException("No account found with verified email address: " + fromInternetAddress.getAddress());
}
} else {
throw new ExplicitException("Invalid recipient address: " + parsedReceiverAddress);
}
}
} else {
logger.warn("Ignored recipient '" + parsedReceiverAddress + "' as issue or pull request is processed");
}
} else if (!receiverInternetAddress.equals(fromInternetAddress)) {
involvedInternetAddresses.add(receiverInternetAddress);
}
if (involvedIssue != null) {
for (InternetAddress involvedInternetAddress : involvedInternetAddresses) {
EmailAddress involvedAddressEntity = emailAddressService.findByValue(involvedInternetAddress.getAddress());
if (involvedAddressEntity != null && involvedAddressEntity.isVerified()) {
var involvedUser = involvedAddressEntity.getOwner();
if (SecurityUtils.canAccessProject(involvedUser.asSubject(), involvedIssue.getProject())) {View on GitHub (pinned to d44925c47c)
Solutions
- Ensure the sending user has an OneDev account and that the email used is added to the account and marked verified
- Check mail handler settings to confirm which addresses/domains are allowed to post via email
- Reply from the exact address registered in the OneDev profile
- If the sender should not post via email, ignore the bounce; configure issue/pull mail addresses to only accept from known users
Example fix
// before: replying from unregistered alias dev+bts@corp.example -> posts to issue // after: add dev+bts@corp.example to the OneDev account and verify it, or reply from the primary registered address
Defensive patterns
Strategy: try-catch
Validate before calling
boolean canPost = OneDev.getInstance(UserManager.class).findByEmail(fromAddress) != null;
Type guard
boolean hasVerifiedEmail(Account a, String addr) { return a != null && a.getEmails().stream().anyMatch(e -> e.getValue().equals(addr) && e.isVerified()); } Try / catch
try { mailHandler.handleMessage(message); } catch (ExplicitException e) { log.warn("Mail rejected: " + e.getMessage()); } Prevention
- Keep account emails verified and unique
- Reply from the registered primary address
- Avoid plus-addressing/aliases not registered in OneDev
When it happens
Trigger: An email is sent to a project/issue/pull request mail address; the from address's account lookup by verified email returns null (no account, unverified email, or address mismatch e.g. plus-addressing or different case/domain).
Common situations: Replying to issue notifications from a personal email alias not registered in OneDev; a user registered with a different email than their mail client sends from; email verification never completed; corporate relay rewriting the From address.
Understand the failure class
Background: "User not found", "Invalid user", and "does not exist": what missing-user lookup errors mean across Rocket.Chat, LiteLLM, Phabricator, rustfs, and pnpm — this error's family across 10 libraries.
Related errors
- Invalid recipient address:
- Authentication required
- Unauthenticated
- Not authenticated
- Unable to import build spec (import project: {0}, import rev
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/ff9df09e1a07f2d5.
Report an issue: GitHub.