phacility/phabricator · error · Exception

No configured mail receiver can accept mail to '%s'.

Error message

No configured mail receiver can accept mail to '%s'.

What it means

receive-test iterates every configured mail receiver and asks canAcceptMail($pseudomail, $to); none accepted, so there is no route for that destination. The address is not configured as any application's email, and/or the monogram/object is not handled by any receiver - inbound mail to it would be silently undeliverable, which is exactly what the workflow reports.

Source

Thrown at src/applications/metamta/management/PhabricatorMailManagementReceiveTestWorkflow.php:146

        ->setAncestorClass('PhabricatorMailReceiver')
        ->setFilterMethod('isEnabled')
        ->execute();

      $receiver = null;
      foreach ($receivers as $possible_receiver) {
        $possible_receiver = id(clone $possible_receiver)
          ->setViewer($viewer)
          ->setSender($user);

        if (!$possible_receiver->canAcceptMail($pseudomail, $target)) {
          continue;
        }
        $receiver = $possible_receiver;
        break;
      }

      if (!$receiver) {
        throw new Exception(
          pht("No configured mail receiver can accept mail to '%s'.", $to));
      }

      if (!($receiver instanceof PhabricatorObjectMailReceiver)) {
        $class = get_class($receiver);
        throw new Exception(
          pht(
            "Receiver '%s' accepts mail to '%s', but is not a ".
            "subclass of PhabricatorObjectMailReceiver.",
            $class,
            $to));
      }

      $object = $receiver->loadMailReceiverObject($to, $user);
      if (!$object) {
        throw new Exception(pht("No such object '%s'!", $to));
      }

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. If --to is an address: create the application email first (application's Email Addresses panel, e.g. Maniphest > Email Addresses) with that exact address, then retry.
  2. If --to is a monogram: use one from an application that accepts inbound mail (e.g. a task T123 or revision D123).
  3. Check that the address domain matches what you actually registered with your mail provider.
  4. Re-run ./bin/mail receive-test after the receiver exists.

Example fix

# before: no application owns this address
./bin/mail receive-test --to reviews@example.com --as alincoln

# after: create the application email (UI: Differential > Email Addresses,
# or MetaMTA application email editor) for reviews@example.com, then
./bin/mail receive-test --to reviews@example.com --as alincoln
Defensive patterns

Strategy: validation

Validate before calling

// Before receive-test, confirm something will accept the destination.
if (strpos($to, '@') !== false) {
  $app_email = id(new PhabricatorMetaMTAApplicationEmailQuery())
    ->setViewer($viewer)
    ->withAddresses(array($to))
    ->executeOne();
  if (!$app_email) {
    // configure the application email first
  }
}

Prevention

When it happens

Trigger: Passing --to an address that matches no PhabricatorMetaMTAApplicationEmail row (inbound addresses never configured, or a different domain), or a monogram for an object type whose application has no mail receiver enabled.

Common situations: Inbound mail not yet set up on a new install; testing an address from a different install or domain; receiver configuration limited to a subset of applications.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/4be6bac3b37371e1. Report an issue: GitHub.