{"record":{"id":"b5ebb09a9f3704cf","repo":"phacility/phabricator","slug":"some-specified-messages-do-not-exist-s-b5ebb0","errorCode":null,"errorMessage":"Some specified messages do not exist: %s","messagePattern":"Some specified messages do not exist: (.+?)","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/applications/metamta/management/PhabricatorMailManagementShowInboundWorkflow.php","lineNumber":42,"sourceCode":"    $console = PhutilConsole::getConsole();\n\n    $ids = $args->getArg('id');\n    if (!$ids) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          \"Use the '%s' flag to specify one or more messages to show.\",\n          '--id'));\n    }\n\n    $messages = id(new PhabricatorMetaMTAReceivedMail())->loadAllWhere(\n      'id IN (%Ld)',\n      $ids);\n\n    if ($ids) {\n      $ids = array_fuse($ids);\n      $missing = array_diff_key($ids, $messages);\n      if ($missing) {\n        throw new PhutilArgumentUsageException(\n          pht(\n            'Some specified messages do not exist: %s',\n            implode(', ', array_keys($missing))));\n      }\n    }\n\n    $last_key = last_key($messages);\n    foreach ($messages as $message_key => $message) {\n      $info = array();\n\n      $info[] = pht('PROPERTIES');\n      $info[] = pht('ID: %d', $message->getID());\n      $info[] = pht('Status: %s', $message->getStatus());\n      $info[] = pht('Related PHID: %s', $message->getRelatedPHID());\n      $info[] = pht('Author PHID: %s', $message->getAuthorPHID());\n      $info[] = pht('Message ID Hash: %s', $message->getMessageIDHash());\n\n      if ($message->getMessage()) {","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/metamta/management/PhabricatorMailManagementShowInboundWorkflow.php#L24-L60","documentation":"show-inbound loaded `id IN (...)` against PhabricatorMetaMTAReceivedMail and got back fewer rows than IDs requested; the missing IDs are listed in the exception. Every ID must correspond to an existing received-mail row in the database this install points at.","triggerScenarios":"Passing an outbound mail's ID (PhabricatorMetaMTAMail table) to show-inbound; IDs from old logs after the received-mail table was pruned; querying a different environment's database than the one the mail arrived in; simple typo in the number.","commonSituations":"Confusing inbound vs outbound IDs; stale daemon logs; database switched by configuration or environment variables.","solutions":["Confirm the ID is an inbound (received) mail ID; use `bin/mail show-outbound` for sent mail.","Browse the received-mail list in the web UI to copy a valid ID.","Verify the install points at the intended database and the message still exists."],"exampleFix":"// before\n$ bin/mail show-inbound --id 987\n// Exception: Some specified messages do not exist: 987\n\n// after (987 was an outbound mail)\n$ bin/mail show-outbound --id 987","handlingStrategy":"validation","validationCode":"// Confirm the rows exist before invoking show-inbound:\n$messages = id(new PhabricatorMetaMTAReceivedMail())->loadAllWhere('id IN (%Ld)', $ids);\n$missing = array_diff($ids, mpull($messages, 'getID'));\nif ($missing) {\n  fwrite(STDERR, 'No such received mail: '.implode(', ', $missing).\"\\n\");\n  exit(1);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep inbound and outbound ID spaces separate in notes and scripts.","Pre-check existence with a loadAllWhere query in wrappers.","Copy IDs from the web UI rather than old logs."],"tags":["php","phabricator","cli","record-lookup","mail"],"backgroundTag":"record-not-found","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}