phacility/phabricator · warning · PhabricatorMetaMTAReceivedMailProcessingException

err:no-public-mail

err:no-public-mail

Error message

This mail is addressed to the public email address of an object ("%s"), but public replies are not enabled on this server. An administrator may have recently disabled this setting, or you may have replied to an old message. Try replying to a more recent message instead.

What it means

Thrown by PhabricatorObjectMailReceiver when an inbound email is addressed to an object's PUBLIC reply address (sender identifier 'public') but the 'metamta.public-replies' configuration setting is disabled on this install. The receiver checks the env config before it will trust a public address, because public addresses are weaker (not bound to one user) and only safe when the administrator opted in. The mail is rejected with STATUS_NO_PUBLIC_MAIL and the sender gets a bounce explaining the cause.

Source

Thrown at src/applications/metamta/receiver/PhabricatorObjectMailReceiver.php:71

          'This mail is addressed to an object ("%s") you do not have '.
          'permission to see: %s',
          $pattern,
          $policy_exception->getMessage()));
    }

    if (!$object) {
      throw new PhabricatorMetaMTAReceivedMailProcessingException(
        MetaMTAReceivedMailStatus::STATUS_NO_SUCH_OBJECT,
        pht(
          'This mail is addressed to an object ("%s"), but that object '.
          'does not exist.',
          $pattern));
    }

    $sender_identifier = $parts['sender'];
    if ($sender_identifier === 'public') {
      if (!PhabricatorEnv::getEnvConfig('metamta.public-replies')) {
        throw new PhabricatorMetaMTAReceivedMailProcessingException(
          MetaMTAReceivedMailStatus::STATUS_NO_PUBLIC_MAIL,
          pht(
            'This mail is addressed to the public email address of an object '.
            '("%s"), but public replies are not enabled on this server. An '.
            'administrator may have recently disabled this setting, or you '.
            'may have replied to an old message. Try replying to a more '.
            'recent message instead.',
            $pattern));
      }
      $check_phid = $object->getPHID();
    } else {
      if ($sender_identifier != $sender->getID()) {
        throw new PhabricatorMetaMTAReceivedMailProcessingException(
          MetaMTAReceivedMailStatus::STATUS_USER_MISMATCH,
          pht(
            'This mail is addressed to the private email address of an object '.
            '("%s"), but you are not the user who is authorized to use the '.
            'address you sent mail to. Each private address is unique to the '.

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Enable the feature: bin/config set metamta.public-replies true --stdin (or edit it in Config > Application Settings > MetaMTA), then have the user reply to a NEWER notification so the address was generated under the current setting.
  2. If public mail must stay off, tell the user to reply to a recent message that carries their own private address instead of the public one.
  3. If you administer the install and want this permanent, communicate the change: old public addresses will keep bouncing with this exact message until users switch threads.
  4. If you are developing a receiver, gate public-address generation on the same config flag so users are never handed addresses that will be rejected later.

Example fix

// before: public replies disabled, old public address bounces
// bin/config set metamta.public-replies false
// user replies to: public+D123+abcdef@phabricator.example -> err:no-public-mail

// after: enable public replies, use fresh addresses
// bin/config set metamta.public-replies true
// user replies to a notification generated AFTER the change
Defensive patterns

Strategy: validation

Validate before calling

// Before issuing/writing a public object address, check the same gate the receiver uses:
$publicOk = PhabricatorEnv::getEnvConfig('metamta.public-replies');
if (!$publicOk) {
  // generate per-user private addresses instead of a 'public' sender identifier
}

Prevention

When it happens

Trigger: A user replies-all or replies to an old notification whose 'To' address encodes sender 'public' (e.g. public+D123+hash@...) while PhabricatorEnv::getEnvConfig('metamta.public-replies') returns false. Specifically: an administrator ran 'config set metamta.public-replies false' (or never enabled it), and a user then mailed an address generated while it was on, or copied a public address from another install/docs.

Common situations: Admin disables public replies after they were enabled (users keep old threads in their mail clients); migrating an install that never set the flag; users forwarding bug-report addresses they found in old emails; copying a public handler address out of documentation into a fresh install where the flag defaults off.

Related errors


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