phacility/phabricator · warning · PhabricatorMetaMTAReceivedMailProcessingException

err:empty

err:empty

Error message

Your message does not contain any body text or attachments, so this server can not do anything useful with it. Make sure comment text appears at the top of your message: quoted replies, inline text, and signatures are discarded and ignored.

What it means

dropEmptyMail() throws when the cleaned body (getCleanTextBody()) has no text and there are no attachments: there is literally nothing for any receiver to act on. The status distinguishes direct mail (exactly one To, zero CC → STATUS_EMPTY, user gets the helpful error email) from multi-recipient mail (STATUS_EMPTY_IGNORED, silently ignored because other humans got the mail). The message text coaches users that Phabricator strips quoted replies, inline text, and signatures — only top-of-message text counts.

Source

Thrown at src/applications/metamta/storage/PhabricatorMetaMTAReceivedMail.php:436

    $attachments = $this->getAttachments();

    if (strlen($body) || $attachments) {
      return;
    }

    // Only send an error email if the user is talking to just Phabricator.
    // We can assume if there is only one "To" address it is a Phabricator
    // address since this code is running and everything.
    $is_direct_mail = (count($this->getToAddresses()) == 1) &&
                      (count($this->getCCAddresses()) == 0);

    if ($is_direct_mail) {
      $status_code = MetaMTAReceivedMailStatus::STATUS_EMPTY;
    } else {
      $status_code = MetaMTAReceivedMailStatus::STATUS_EMPTY_IGNORED;
    }

    throw new PhabricatorMetaMTAReceivedMailProcessingException(
      $status_code,
      pht(
        'Your message does not contain any body text or attachments, so '.
        'this server can not do anything useful with it. Make sure comment '.
        'text appears at the top of your message: quoted replies, inline '.
        'text, and signatures are discarded and ignored.'));
  }

  private function sendExceptionMail(
    Exception $ex,
    PhabricatorUser $viewer = null) {

    // If we've failed to identify a legitimate sender, we don't send them
    // an error message back. We want to avoid sending mail to unverified
    // addresses. See T12491.
    if (!$viewer) {
      return;
    }

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Reply with your comment text at the very top of the message, above the quoted original — Phabricator discards everything from the first quoted line down.
  2. If the content is a file, attach it as a real attachment rather than embedding it in HTML/signature.
  3. If it bounced as STATUS_EMPTY, simply resend with the text at top; the object state is unchanged (nothing was applied).
  4. Admins: for recurring offenders, point users at the 'Reply Instructions' setting so outbound mail explains the top-posting requirement.

Example fix

// before: reply body after cleaning is empty
// "> Alincoln: can you approve D123?"  (everything quoted) -> err:empty

// after: comment text above the quote
// "Approved, thanks!"  
// "> Alinclair: can you approve D123?" -> comment applied
Defensive patterns

Strategy: validation

Validate before calling

// Mirror dropEmptyMail() before ingesting: require non-empty clean body or attachments.
$clean = $body_parser->getCleanTextBody(); // strips quotes/signatures like Phabricator does
if (!strlen(trim($clean)) && !$message->getAttachments()) {
  // reject at the boundary with 'put your comment at the top' guidance
}

Try / catch

try {
  $received_mail->processIncomingMail($sender);
} catch (PhabricatorMetaMTAReceivedMailProcessingException $ex) {
  if ($ex->getStatusCode() === MetaMTAReceivedMailStatus::STATUS_EMPTY) {
    // direct mail bounced: nothing was applied, user can safely resend with top text
    notify_user_about_top_posting();
    return;
  }
  throw $ex;
}

Prevention

When it happens

Trigger: A reply whose entire content lives below the quoted original (everything above the first quote marker was blank), a message containing only an image pasted into a signature/HTML part not extracted as attachment, or an empty mail. With count(getToAddresses())==1 and count(getCCAddresses())==0 the direct-mail variant bounces the error back to the user.

Common situations: Users replying with answers typed inline next to quoted lines; top-posting clients configured to strip everything above a signature delimiter so the clean body ends up empty; mobile clients sending only HTML with the text alternative empty; reply chains where the user wrote only 'Ack' inside the quoted block.

Related errors


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