{"record":{"id":"191950b4ec7e50bc","repo":"phacility/phabricator","slug":"application-email-s-has-an-invalid-default-au","errorCode":null,"errorMessage":"Application email (\"%s\") has an invalid default author (\"%s\").","messagePattern":"Application email \\(\"(.+?)\"\\) has an invalid default author \\(\"(.+?)\"\\)\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/metamta/receiver/PhabricatorApplicationMailReceiver.php","lineNumber":75,"sourceCode":"\n        // You either need to be sending from a real address or be sending to\n        // an address which accepts mail from the public internet.\n\n        if (!$author_phid) {\n          throw new PhabricatorMetaMTAReceivedMailProcessingException(\n            MetaMTAReceivedMailStatus::STATUS_UNKNOWN_SENDER,\n            pht(\n              'You are sending from an unrecognized email address to '.\n              'an address which does not support public email (\"%s\").',\n              (string)$target));\n        }\n\n        $author = id(new PhabricatorPeopleQuery())\n          ->setViewer($viewer)\n          ->withPHIDs(array($author_phid))\n          ->executeOne();\n        if (!$author) {\n          throw new Exception(\n            pht(\n              'Application email (\"%s\") has an invalid default author (\"%s\").',\n              (string)$create_address,\n              $author_phid));\n        }\n      }\n\n      $this\n        ->setApplicationEmail($application_email)\n        ->setAuthor($author);\n\n      return true;\n    }\n\n    return false;\n  }\n\n  private function loadApplicationEmailList() {","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/metamta/receiver/PhabricatorApplicationMailReceiver.php#L57-L93","documentation":"The application email does have a default author PHID, but PhabricatorPeopleQuery could not load a user for it. This is a plain Exception (an internal configuration invariant, not a usage error): the stored default author references a user that no longer exists or is invisible to the loading viewer, so every mail to this address will fail processing.","triggerScenarios":"The default-author user was deleted after being assigned to the application email; the PHID was edited/imported incorrectly; the user exists but is not loadable by the processing viewer.","commonSituations":"Account pruning when staff leave; data imports that preserve application emails but not user rows; manual PHID edits in the database.","solutions":["Edit the application email and reassign the default author to an existing, active user.","Verify the stored PHID resolves: look the user up by PHID in the People application.","Audit other application emails for the same dangling default-author reference."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate the default author resolves before relying on the address:\n$author = id(new PhabricatorPeopleQuery())\n  ->setViewer(PhabricatorUser::getOmnipotentUser())\n  ->withPHIDs(array($application_email->getDefaultAuthorPHID()))\n  ->executeOne();\nif (!$author) {\n  // alert an administrator: dangling default author on this application email\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When deleting users, check for application emails referencing them as default author first.","Re-set the default author after user renames/imports.","Run a periodic audit query comparing stored default-author PHIDs against the user table."],"tags":["php","phabricator","configuration","mail","data-integrity"],"backgroundTag":"dangling-configuration-reference","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}